Skip to content

Instantly share code, notes, and snippets.

View lviggiano's full-sized avatar

lviggiano lviggiano

View GitHub Profile
#!/usr/bin/env bash
outputPaths=$(nix-build --no-out-link - <<'EOF'
let
pkgs = (import <nixpkgs> {});
# The book source
src = let
second-edition = fetchBook {
rev = "6354bb99d3834303693658890426a7ec6d4c104e";
@peterhellberg
peterhellberg / gfm.rb
Created March 18, 2012 17:51
GitHub Flavored Markdown parser for use with Jekyll and Marked.app
#!/usr/bin/env ruby
require 'rubygems'
require 'redcarpet'
require 'pygments.rb'
class HTMLwithPygments < Redcarpet::Render::HTML
def block_code(code, language)
Pygments.highlight(code, :lexer => language.to_sym, :options => {
:encoding => 'utf-8'
})