- readability
- maintainability
- consistency
- exception handling
- simplicity
- test coverage
- side effect
- reuse of existing code
- performance
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
CSS: | |
@-webkit-keyframes blink { | |
90% { opacity: 1; } | |
100% { opacity: 0; } | |
} | |
@-moz-keyframes blink { | |
90% { opacity: 1; } | |
100% { opacity: 0; } | |
} | |
@-o-keyframes blink { |
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
# Hide | |
defaults write com.apple.finder CreateDesktop false && killall Finder | |
# Show | |
defaults write com.apple.finder CreateDesktop true && killall Finder |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
html,body{ | |
padding:0; | |
margin:0; | |
font-family:arial; | |
} | |
.clearfix:after{ |
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
var when = function(){ | |
if( !(this instanceof when) ) return new when(arguments); //return new instance of itself | |
var self = this; //cached so the syntax of code within the function is more readable | |
self.pending = Array.prototype.slice.call(arguments[0]); //convert arguments passed in to array | |
self.pending_length = self.pending.length; //cache length of the arguments array | |
self.results = []; //container for results of async functions | |
(function(){ // define pass() within this context so that the outer scope of self(this) is available when pass() is executed within the user's async functions |
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
# update all submodules | |
git config --global alias.subupdate 'submodule update --init --recursive' | |
# checkout a branch in each submodule and update it | |
git config --global alias.subpull = submodule foreach git pull origin production | |
# show aliases | |
git config --global alias.alias '!git config -l | grep alias | cut -c 7-' |
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
<!doctype> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script> | |
<script> | |
(function(){ | |
window.clever = function(user, pass){ |
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(){ | |
"use strict"; | |
//Generate dictionary | |
var arr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.split(''), | |
dict = {}; | |
for(var i=0, len=arr.length; i<arr.length; i++){ | |
dict[arr[i]] = i; | |
} |
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
{ | |
"env": { | |
"browser": 1, | |
"node": 1 | |
}, | |
"globals": { | |
"jQuery": 1, | |
"$": 1, | |
"_gaq": 1, | |
"_ga": 1, |
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
# 3 columns, center column wraps to content width, outer columns grow dynamically | |
http://codepen.io/anon/pen/ZWMMaX |
OlderNewer