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
# transitionEnd event name detection from Modernizr | |
# http://modernizr.com/docs/ | |
transEndEventName = do -> | |
names = | |
WebkitTransition: "webkitTransitionEnd" | |
MozTransition: "transitionend" | |
OTransition: "oTransitionEnd" | |
msTransition: "MSTransitionEnd" | |
transition: "transitionend" |
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
/* | |
* Based on: http://www.quirksmode.org/js/cookies.html | |
* and https://github.com/wojodesign/local-storage-js/blob/master/storage.js | |
* and https://gist.github.com/350433 | |
* License: http://www.opensource.org/licenses/MIT | |
*/ | |
(function(window) { | |
'use strict'; | |
window.sessionStorage = window.sessionStorage || { |
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
# This goes in _plugins/excerpt.rb | |
module Jekyll | |
class Post | |
alias_method :original_to_liquid, :to_liquid | |
def to_liquid | |
original_to_liquid.deep_merge({ | |
'excerpt' => content.match('<!--more-->') ? content.split('<!--more-->').first : nil | |
}) | |
end | |
end |
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
#!/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' | |
}) |
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
function! CSS3PropertyDuplicate() | |
let reg_save = @@ | |
silent normal Y | |
let css3 = @@ | |
let ind = matchlist(css3, '\v(\s*)(.*)') | |
let webkit = ind[1] . "-webkit-" . ind[2] | |
let moz = ind[1] . "-moz-" . ind[2] | |
let ms = ind[1] . "-ms-" . ind[2] | |
let o = ind[1] . "-o-" . ind[2] |
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
function! CSS3PropertyDuplicate() | |
let reg_save = @@ | |
silent normal Y | |
let css3 = @@ | |
let ind = matchlist(css3, '\v(\s*)(.*)') | |
let webkit = ind[1] . "-webkit-" . ind[2] | |
let moz = ind[1] . "-moz-" . ind[2] | |
let ms = ind[1] . "-ms-" . ind[2] | |
let o = ind[1] . "-o-" . ind[2] |
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
/* kotaroclearfix */ | |
.clearfix { *zoom: 1; } | |
.clearfix:after { content: ''; display: block; clear : both; height: 0; } | |
@media print { .clearfix:after { height: 1px; margin-bottom: -1px; visibility: hidden; } } |
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
<!-- | |
see http://www.modernizr.com/docs/#backgroundsize | |
--> | |
<script src="modernizr-1.7.min.js"></script> |