start new:
tmux
start new with session name:
tmux new -s myname
| require 'base64' | |
| # tools.ietf.org/html/rfc2397 | |
| # developer.mozilla.org/en/data_URIs | |
| # "data:" + MIME type + ";base64," + base64-encoded content | |
| def to_data_url(content, content_type) | |
| outuri = 'data:' + content_type + ';base64' | |
| content = Base64.encode64(content).gsub("\n", '') | |
| outuri += ",#{content}" |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| /* Basket.js | |
| * A script-loader that handles caching scripts in localStorage | |
| * where supported. | |
| * http://addyosmani.com/ | |
| * Credits: Addy Osmani, Mathias Bynens, Ironsjp. | |
| * Copyright (c) 2012 Addy Osmani; | |
| * Licensed MIT, GPL | |
| */ |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| { | |
| "files": | |
| { | |
| "jquery" : "http://code.jquery.com/jquery.min.js", | |
| "jquery-ui-effects" : "https://raw.github.com/jquery/jquery-ui/master/ui/jquery.effects.core.js", | |
| "jquery-mobile-vmouse" : "https://raw.github.com/jquery/jquery-mobile/master/js/jquery.mobile.vmouse.js", | |
| "jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js", | |
| "jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js", | |
| "jquery-url" : "https://raw.github.com/allmarkedup/jQuery-URL-Parser/master/jquery.url.js", | |
| "jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js", |
| # Find this line and insert the code below it (adapted to use your sitename/server). | |
| # RewriteBase / | |
| # Use files on the dev server instead of syncing them locally. | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^sites/sitename/(files/.*)$ http://dev.whatever.com/sites/sitename/$1 [L,QSA] |
| innerWidth / innerHeight tests @ http://sandbox.thewikies.com/orientation/ | |
| -------------------------------------------------------------------------------- | |
| Tested (14 devices, 28 browsers): | |
| Droid 2 Global Android 2.2 | |
| iPhone 4 iOS5 (Safari, Opera Mini) | |
| Motorola Atrix Android 2.3.4 (Stock browser, Dolphin, Skyfire, Opera Mini, Firefox) | |
| Samsung Galaxy S9000 Android 2.3 (Webkit, Opera Mobile) | |
| Samsung Galaxy Y Android 2.3.5 |
| <?php | |
| /** | |
| * Implements hook_page_alter(). | |
| */ | |
| function mytheme_page_alter(&$page) { | |
| // Remove all the region wrappers. | |
| foreach (element_children($page) as $key => $region) { | |
| if (!empty($page[$region]['#theme_wrappers'])) { | |
| $page[$region]['#theme_wrappers'] = array_diff($page[$region]['#theme_wrappers'], array('region')); |
| /** | |
| * Polyfill for the vw, vh, vm units | |
| * Requires StyleFix from -prefix-free http://leaverou.github.com/prefixfree/ | |
| * @author Lea Verou | |
| */ | |
| (function() { | |
| if(!window.StyleFix) { | |
| return; |