Skip to content

Instantly share code, notes, and snippets.

require 'fileutils'
class Jekyll < Thor
include FileUtils
method_options :format => :optional
def draft(name)
format = options[:format] || "markdown"
slug = name.downcase.gsub(/ +/,'-').gsub(/[^-\w]/,'').sub(/-+$/,'')
filename = slug + ".#{format}"
@paulirish
paulirish / gist:711402
Created November 23, 2010 07:28
for december.
// forked from sakef's "マウスから逃げる (JS ver.)" http://jsdo.it/sakef/uVU9
var MARGIN = 100;
var NUM_CIRCLE = 130;
var RADIUS = 30;
var PADDING = 50;
var width;
var height;
var context;
var mouxeX;
// the text-align: centaur; polyfill
// by paul irish
// it will find any styles that use `text-align: centaur` and instantly centaurize that text!
// uses the JSCSSP parser by Daniel Glazman
// thx to cameron daigle for march 2011's best javascript.
// http://textaligncentaur.com/
@christianvuerings
christianvuerings / cache.manifest
Created May 21, 2011 15:49
Jekyll auto-generating cache.manifest file
---
layout: nil
---
CACHE MANIFEST
# rev {{ site.time | date_to_xmlschema }}
/index.html
/css/main.css
/css/syntax.css
/favicon.ico
{% for post in site.posts %}{{ post.id }}/
@davefearon
davefearon / style.sass
Created November 4, 2011 04:50 — forked from destroytoday/style.sass
Prevents iOS from changing the font size of paragraphs in landscape
@media only screen and (min-device-width: 320px) and (max-device-width: 1024px)
html
-webkit-text-size-adjust: none
@artgon
artgon / gist:1361497
Created November 13, 2011 02:27
Post previews for Github Pages (a la wordpress)
{% for post in site.posts limit:5 %}
<div class="box">
<h3>{{post.title}}</h3>
<div class="clearfix"></div>
<div class="right big">
{% assign breakIndex = -1 %}
{% for element in post.content %}
{% if element contains '<!--more-->' %}
{% assign breakIndex = forloop.index %}
{% endif %}
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@goozbach
goozbach / gist:1507318
Created December 21, 2011 19:26 — forked from sontek/snowjob.sh
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear
@kapso
kapso / dabblet.css
Created December 21, 2011 20:47
CSS3 Border-Radius with Border - Circle Avatars
/**
* CSS3 Border-Radius with Border - Circle Avatars
*/
/* General Styles */
body { background: url(http://subtlepatterns.com/patterns/white_texture.png);
font: 100 14px sans-serif;
color: #444555; text-shadow: 0 2px white;
text-align: center;
@endorfin
endorfin / PixelMosaic.js
Created December 21, 2011 20:51
JS: Mosaic Photo Wall - jQuery Version
/*
* Mosaic - jQuery Version
*
* Released on 21th December 2011.
*
* Copyright (c) 2010-2011 René Kersten, http://pixel-webarts.de
*
* Licensed under the terms of MIT License.
*
*/