This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins directory.
{% youtube oHg5SJYRHA0 %}
| require 'digest/md5' | |
| def gfm(text) | |
| # Extract pre blocks | |
| extractions = {} | |
| text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
| md5 = Digest::MD5.hexdigest(match) | |
| extractions[md5] = match | |
| "{gfm-extraction-#{md5}}" | |
| end |
| desc 'Generate tags page' | |
| task :tags do | |
| puts "Generating tags..." | |
| require 'rubygems' | |
| require 'jekyll' | |
| include Jekyll::Filters | |
| options = Jekyll.configuration({}) | |
| site = Jekyll::Site.new(options) | |
| site.read_posts('') |
| 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 |
| <?xml version="1.0" encoding="utf-8"?> | |
| <xsl:stylesheet | |
| version="1.0" | |
| xmlns:msxsl="urn:schemas-microsoft-com:xslt" | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <xsl:output method="html"/> | |
| <xsl:template match="*"/> | |
| <xsl:template match="svn"> | |
| <html> |
| lftp -u $FTP_USERNAME,$FTP_PASSWORD $FTP_SERVER/$FTP_DIRECTORY -e 'put -a filename;quit' |
| diff --git a/lib/albino.rb b/lib/albino.rb | |
| index 387c8e9..b77d55e 100644 | |
| --- a/lib/albino.rb | |
| +++ b/lib/albino.rb | |
| @@ -1,4 +1,5 @@ | |
| require 'posix-spawn' | |
| +require 'rbconfig' | |
| ## | |
| # Wrapper for the Pygments command line tool, pygmentize. |
| =begin | |
| Jekyll tag to include Markdown text from _includes directory preprocessing with Liquid. | |
| Usage: | |
| {% markdown <filename> %} | |
| Dependency: | |
| - kramdown | |
| =end | |
| module Jekyll | |
| class MarkdownTag < Liquid::Tag | |
| def initialize(tag_name, text, tokens) |
| module Jekyll | |
| class Layout | |
| alias old_initialize initialize | |
| def initialize(*args) | |
| old_initialize(*args) | |
| self.transform | |
| end |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins directory.
{% youtube oHg5SJYRHA0 %}
| #!/bin/bash | |
| if [ `whoami` != 'root' ]; then | |
| echo "You must to be root" | |
| exit | |
| fi | |
| DOWNLOAD_URL="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz" | |
| TEMPFILE="/tmp/GeoIPCity.dat" | |
| TEMPFILEGZ="$TEMPFILE.gz" | |
| GEOIP_DIR="/usr/local/share/GeoIP" |