Pen & Paper

Sci-hub - Research Papers without the Paywalls

29 Feb 2016

Access to research papers behind a paywall is expensive. The cost of Pay-per-view starts at about USD30 and may reach double of this amount for certain publications. Annual subscription fees can run up to millions of dollars for an educational institution. Even Harvard, one of the richest higher education institutions, found the subscription fees unsustainable and openly called for open access. When I was doing my dissertation in one of the less privileged universities which could only afford a very limited list of subscriptions, it was impossible to skim through each and every article that was relevant to my research. Reading only the abstract would perhaps enable me to cite the paper creating the impression that I had read it. It didn’t help my research at all nor did it benefit my learning. To publish behind a paywall seems nonsensical as one of the primary objectives in publishing is to achieve maximum impact by reaching as wide an audience as possible.

Sci-hub to research publications is like Pirate Bay to music. The crucial difference is that Sci-hub steals from publishers such as Elsevier, Wiley, Springer and OUP who have absolutely nothing to do with the research or its findings but Pirate Bay steals from the musicians who create the music. Sci-hub facilitates the creator to reach a wider audience. I do not find it a moral problem to use Sci-hub. It is indispensable to a layperson like myself who is no longer attending schools but still interested in certain research topics.

undefined method "getConverterImpl" (Jekyll)

14 Dec 2015

I use a “markdown” tag to render my “about” page {% markdown %} in this jekyll blog. The ‘about’ page is written in markdown but is seldom changed. It is unnecessary to run it through the jekyll engine to process it every time when a new posting is made. The ‘markdown’ tag is created using the following gem plugin (named with a .rb extension and to be put into a _plugins sub-directory under the jekyll root).

  Jekyll tag to include Markdown text from _includes directory preprocessing with Liquid.
    {% markdown <filename> %}
module Jekyll
  class MarkdownTag < Liquid::Tag
    def initialize(tag_name, text, tokens)
      @text = text.strip
    def render(context)
      tmpl = File.join Dir.pwd, "_includes", @text
      site = context.registers[:site]
      converter = site.getConverterImpl(Jekyll::Converters::Markdown)
      tmpl = (Liquid::Template.parse tmpl).render site.site_payload
      html = converter.convert(tmpl)
Liquid::Template.register_tag('markdown', Jekyll::MarkdownTag)

Upgrading from jekyll 2.5.3 to jekyll 3.0.1 will produce an error pointing to an undefined method getConverterImpl. After some googling, I have found that the method getConverterImpl has been changed to find_converter_instance in jekyll 3. Changing the following line in the above script will remove the error.

##  converter = site.getConverterImpl(Jekyll::Converters::Markdown)
    converter = site.find_converter_instance(Jekyll::Converters::Markdown)

Github Project Pages Using Jekyll

15 Oct 2015


Github provides free hosting of a static website for each user and for each project. These websites are generated using Jekyll which will process all files uploaded to an individual user account (master branch of a special repo named or any project repos with a gh-pages branch.

This short guide will walk through the steps in setting up of a local “Jekyll” installation so that the website can be designed and its content reviewed before committing to Github.



  1. In configuring Jekyll, it is important to bear in mind that Github’s user page is located at root ( while its project page is served from a sub-directory ( The parameter baseurl in *_config.yml* should be set correspondingly as follow:
    • an empty string "" for a user page and
    • "/NAME_OF_REPO" for a project page
  2. To preview the project website locally, it is necessary to temporarily override the baseurl setting using jekyll serve --baseurl "" so that the pages can be found at “localhost:4000”.
  3. The Jekyll engine at Github only supports a selected set of plugins and it may not be the same version as the local installation. To avoid possible conflicts, put gem 'github-pages' in a Gemfile in the repo’s root directory followed by a command bundle install.
  4. Put _site into .gitignore. The folder is generated for the local Jekyll installation only. Jekyll will re-build the site every time following a new upload or commit.

Creating Project Pages

  1. Clone an existing repo
    • $ git clone
  2. Create and switch to gh-pages branch
    • $ cd repo
    • $ git checkout --orphan gh-pages
  3. Remove all existing files
    • $ git rm -rf .
  4. Scaffold new Jekyll site
    • $ jekyll new .
  5. Make changes and create content
  6. Publish to Github
    • $ git commit -am "new content added"
    • $ git push origin gh-pages

I have created a set of slides for this post using slidify.