Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| /* Hide/show placeholder text in an input field while it's empty | |
| * To use, add data-placheholder="placeholder text" to your fields | |
| * Eg: <input type="text" id="email" value="" data-placeholder="Enter your e-mail"> | |
| */ | |
| $('input[data-placeholder]').each(function(){ | |
| $(this) | |
| .bind('focus', function() { | |
| if ($(this).val() == $(this).data('placeholder')) | |
| $(this).val(''); | |
| }) |
| #!/bin/sh | |
| git filter-branch --env-filter ' | |
| an="$GIT_AUTHOR_NAME" | |
| am="$GIT_AUTHOR_EMAIL" | |
| cn="$GIT_COMMITTER_NAME" | |
| cm="$GIT_COMMITTER_EMAIL" | |
| if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ] |
| /** | |
| * 3D Now In Beta Ribbon | |
| */ | |
| /*@font-face { | |
| font-family: Collegiate; | |
| src: url("Collegiate.ttf"); | |
| }*/ | |
| .ribbon-holder { |
| if Rails.env.production? | |
| PAYPAL_ACCOUNT = '[email protected]' | |
| else | |
| PAYPAL_ACCOUNT = '[email protected]' | |
| ActiveMerchant::Billing::Base.mode = :test | |
| end |
| /* Commonly used mixins for CSS3 in SASS | |
| by Ben Sargent (2012) | |
| www.brokendigits.com | |
| */ | |
| /* generically prefix any property name */ | |
| @mixin prefix($name, $value) { | |
| -webkit-#{$name}: $value; | |
| -moz-#{$name}: $value; |
| /** | |
| * Inspired by AngularJS' implementation of "click dblclick mousedown..." | |
| * | |
| * This ties in the Hammer events to attributes like: | |
| * | |
| * hm-tap="add_something()" | |
| * hm-swipe="remove_something()" | |
| * | |
| * and also has support for Hammer options with: | |
| * |
| # The latest version of this script is now available at | |
| # https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
| VERSION=1.9.3-p286 | |
| brew update | |
| brew install rbenv ruby-build rbenv-vars readline ctags | |
| if [ -n "${ZSH_VERSION:-}" ]; then | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
| else | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |
| # Restart the Apache server | |
| /usr/local/zend/bin/zendctl.sh restart |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| .factory('TokenHandler', function() { | |
| var tokenHandler = {}; | |
| var token = "none"; | |
| tokenHandler.set = function( newToken ) { | |
| token = newToken; | |
| }; | |
| tokenHandler.get = function() { | |
| return token; |