This file contains 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
# 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>" |
This file contains 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
# 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) |
This file contains 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
<?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> |
This file contains 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
require 'rubygems' | |
require 'ruhoh' | |
require 'yaml' | |
# ruhoh Upgrade Script | |
# ruhoh gem upgrade from 0.3.0 to 1.0.0-alpha | |
# ruhohSpec upgrade from 0.2 to 1.0 | |
# | |
# How to Use: | |
# Create a file named 'Rakefile' in the root of your blog directory and place the full contents of this gist inside. |
This file contains 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
<!-- | |
In lightbox.js you need to remove the initialization function call at the bottom. | |
Lines highlighted here: https://github.com/lokesh/lightbox2/blob/master/js/lightbox.js#L345-349 | |
This is what "starts" lightbox. | |
Place the initialization function at the bottom of one of your html layouts like so: | |
--> | |
<script> | |
$(function() { |
This file contains 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 Ruhoh | |
module Converter | |
module Markdown | |
def self.extensions | |
['.md', '.markdown'] | |
end | |
def self.convert(content) | |
require 'kramdown' | |
Kramdown::Document.new(content).to_html | |
end |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
This file contains 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
Yamsafer, "Yamsafer brings the best, fastest & easiest hotel and event online booking experience to the Middle East by offering users innovative shopping experiences at unprecedented prices." | |
Warby Parker, "Warby Parker was founded with a rebellious spirit and a lofty objective: to create boutique-quality, classically crafted eyewear at a revolutionary price point." | |
VideoBlocks.com, "Video Blocks is the first subscription-based provider of stock video and audio, providing its members with unlimited download access to a vast, and growing, library of content. VideoBlocks.com offers unlimited access to over 50,000 clips of stock video, motion backgrounds, production music, editing templates, sound effects, special effects and more—all for the price of just one download at many competing sites. Customers range from leading television and movie production networks to pro-sumers and hobbyists looking to enhance their video projects and productions. " | |
Bigcommerce, "BigCommerce makes it easy to setup your own profess |
This file contains 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
curl -XDELETE 'http://localhost:9200/p' | |
curl -XPOST 'http://localhost:9200/p' | |
curl -XPOST 'localhost:9200/p/profile/_mapping' -d ' | |
{ | |
"profile": { | |
"properties": { | |
"skills": { | |
"type": "string", | |
"omit_term_freq_and_positions" : true, |
This file contains 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
#share-on-yammer-modal.modal.fade | |
.modal-header | |
... blah | |
- content_for :partial_javascripts do | |
:plain | |
Gild.profileView.shareOnYammer(#{ @profile.to_json }); |
This file contains 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
# place in ./config/initializers | |
# Usage | |
# LL.warn "blah" | |
# LL.warn @profile.inspect | |
require 'pp' | |
require 'log4r' | |
require 'log4r/configurator' | |
require 'log4r/yamlconfigurator' | |
require 'log4r/outputter/fileoutputter' |
OlderNewer