This is now an actual repo:
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
!!! 5 | |
//if lt IE 7 | |
html(class="no-js ie6 oldie", lang="en") | |
//if IE 7 | |
html(class="no-js ie7 oldie", lang="en") | |
//if IE 8 | |
html(class="no-js ie8 oldie", lang="en") | |
// [if gt IE 8] <! | |
html(class="no-js", lang="en") | |
// <![endif] |
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
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
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
// Fix to make zepto work with ujs-jquery | |
$.fn.ajaxSend = function(callback) { | |
return this.each(function(){ | |
$(this).on('ajaxBeforeSend', callback); | |
}); | |
}; | |
var jQuery = $; |
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
// Use the animate.css animations | |
function animate(element, effect, delay, callback) { | |
// Set a delay if needed | |
var animation = setTimeout(function () { | |
// Add the animation effect with classes | |
$(element).addClass('animate ' + effect); | |
// Check if the elemenr has been hidden to start with to prevent FOUC | |
if ($(element).css('visibility') == 'hidden') { | |
// If it has, show it (after the class has been added) |
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 em($target, $context: $base-font-size) { | |
@if $target == 0 { @return 0 } | |
@return $target / $context + 0em; | |
} | |
$base-font-size: 15px; | |
h1 { | |
font-size: em(21px, 15px); // Outputs 1.4em | |
} |
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
/** | |
* Convert an instance of google.visualization.DataTable to CSV | |
* @param {google.visualization.DataTable} dataTable_arg DataTable to convert | |
* @return {String} Converted CSV String | |
*/ | |
function dataTableToCSV(dataTable_arg) { | |
var dt_cols = dataTable_arg.getNumberOfColumns(); | |
var dt_rows = dataTable_arg.getNumberOfRows(); | |
var csv_cols = []; |
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 work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
As configured in my dotfiles.
start new:
tmux
start new with session name:
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
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around wordpress issues - Patrick Anderson ([email protected]) | |
# clearly this could be cleaner, but it does work | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
# patch Php from rack-legacy to substitute the original request so | |
# WP's redirect_canonical doesn't do an infinite redirect of / |
OlderNewer