As configured in my dotfiles.
start new:
tmux
start new with session name:
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| # 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 (patrick@trinity-ai.com) | |
| # 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 / |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| /* | |
| * 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 = { |
| /** | |
| * 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 = []; |
| @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 | |
| } |
| // 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) |
| // Fix to make zepto work with ujs-jquery | |
| $.fn.ajaxSend = function(callback) { | |
| return this.each(function(){ | |
| $(this).on('ajaxBeforeSend', callback); | |
| }); | |
| }; | |
| var jQuery = $; |
| @mixin ie6 { * html & { @content } } | |
| #logo { | |
| background-image: url("/images/logo.png"); | |
| @include ie6 { background-image: url("/images/logo.gif"); } | |
| } |
| !!! 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] |