Skip to content

Instantly share code, notes, and snippets.

View plusjade's full-sized avatar
🐵
🚀 🤖

Jade Dominguez plusjade

🐵
🚀 🤖
View GitHub Profile
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Blog Title</title>
<link>http://sample.com</link>
<pubDate>2012-05-30 02:23:25 -0700</pubDate>
<item>
<title>Oh Happy Day Part Two</title>
<link>http://sample.com/oh-happy-day-part-two</link>
<pubDate>2012-05-30</pubDate>
@plusjade
plusjade / mustache_limits.rb
Created May 15, 2012 22:53
Sample ruhoh plugin to extend mustache with "posts_limit_n" block helpers
# Sample ruhoh plugin to extend mustache with "posts_limit_n" block helpers
# See sample.html for sample usage.
# Installation: place this ruby file in the _plugins directory in the root of your blog.
class Ruhoh
module Templaters
module Helpers
LimitRegex = /^(\w+)_limit_(\d+)/
def limit_to(method, limit)
@plusjade
plusjade / mathjax.rb
Created May 15, 2012 06:48
ruhoh plugin to overload the redcarpet parser with mathjax tags
# place mathjax.rb in _plugins directory of your blog
require 'redcarpet'
class HTMLwithAlbino < Redcarpet::Render::HTML
def block_code(code, language)
if language == 'mathjax'
"<script type=\"math/tex; mode=display\">
#{code}
</script>"
else
"<pre><code class=\"#{language}\">#{code}</code></pre>"