Skip to content

Instantly share code, notes, and snippets.

View ggamel's full-sized avatar
👁️
 👄  👁

Greg Gamel ggamel

👁️
 👄  👁
View GitHub Profile
module Jekyll
class Pagination < Generator
# This generator is safe from arbitrary code execution.
safe true
# Generate paginated pages if necessary.
#
# site - The Site.
#
@destroytoday
destroytoday / site.rb
Created August 28, 2011 21:30
Adds Terminal and Growl notifications to Jekyll's build process
module Jekyll
class Site
require 'growl'
alias :super_process :process
def process
time = Time.now
super_process()
@biovisualize
biovisualize / index.html
Created September 11, 2011 12:07
Download generated SVG with preview (from mbostock)
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Download SVG</title>
<style type="text/css">
a{
cursor: pointer;
text-decoration: underline;
color: black;
@destroytoday
destroytoday / list.html
Created October 16, 2011 17:29
Month-separated blog post list in Jekyll w/ Liquid
---
layout: default
title: All Posts
category: blog
---
<div id="blog">
<h2>{{page.title}}</h2>
{% for post in site.categories.blog %}
{% capture post_month %}{{post.date | date: "%m"}}{% endcapture %}
{% if post_month != prev_post_month %}{% if prev_post_month %}</ol>{% endif %}<h3>{{post.date | date: "%B %Y"}}</h3><ol class="blog-list">{% endif %}
# add this to your compass config.
module Sass::Script::Functions
def syntax_error(message)
raise Sass::SyntaxError, message.value
end
declare :syntax_error, [:message]
end
@mbostock
mbostock / .block
Last active February 9, 2016 00:51
D3 PJAX
license: gpl-3.0
@bzerangue
bzerangue / _grid.sass
Created December 6, 2011 23:32
Zurb Foundation Sass Code - More Dynamic, grid will adjust based on the number of columns and gutter size
// .sass syntax
// NOTE: This Sass stylesheet is dependent on the Custom Sass Function, convert-number-to-word,
// which is available here, https://gist.github.com/1439296
/* Arfully Masterminded by ZURB
/* Grid :: This is the mobile-friendly, responsive grid that lets Foundation work much of its magic.
// Using Default Number of Columns that Foundation starts off with, 12 columns
@ry5n
ry5n / dry-with-sass-lists
Created December 12, 2011 01:49
Using Sass lists for DRY-er code
// Shared colors for buttons and alerts
//
// Use Sass lists to avoid writing out repeating patterns of Sass code.
//
// For example, the following avoids having to write out a selector and
// set of style rules for each alert type, when only class and
// variable names are different.
//
// Follows (and many thanks to) Nathan Weizenbaum (@nex3)’s comment at:
// http://groups.google.com/group/sass-lang/msg/987926ad9fe5ad43?
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'