This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Find all markdown files | |
| path = File.join(File.dirname(__FILE__), "source", "**/*.html.markdown") | |
| # Also generate .latex files along side | |
| Dir[path].each do |markdown_file| | |
| http_path = markdown_file.split("source").last.gsub(".html.markdown", "") | |
| page "#{http_path}.latex", :proxy => "#{http_path}.html", :latex => true, :layout => false | |
| end | |
| require "fileutils" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Jekyll | |
| class MathJaxBlockTag < Liquid::Tag | |
| def render(context) | |
| '<script type="math/tex; mode=display">' | |
| end | |
| end | |
| class MathJaxInlineTag < Liquid::Tag | |
| def render(context) | |
| '<script type="math/tex">' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Module | |
| def declare(decorator, *args) | |
| orig_method_added = method(:method_added) | |
| metaclass = (class << self; self end) | |
| defined_methods = [] | |
| metaclass.send(:define_method, :method_added) do |name| | |
| orig_method_added.call(name) | |
| defined_methods << name | |
| end | |
| begin |
NewerOlder