This file contains hidden or 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
# Bulk Resolve Conflics | |
# Changing username after a commit | |
# Compare Versions | |
# Delete A Branch | |
# Empty Dirs | |
# Get Info | |
# Ignore A File That Was Already Pushed | |
# Log With Actual Changes | |
# Log With List Of Files | |
# Move Commits To Another Branch |
This file contains hidden or 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 lang="en"> | |
<head> | |
<!-- charset always before title to avoid UTF-7 exploits --> | |
<meta charset="utf-8"> | |
<title>title</title> | |
<link rel="stylesheet" href="css.css"> | |
</head> | |
<body> | |
This file contains hidden or 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
.preventSelect { | |
-moz-user-select: -moz-none; | |
-khtml-user-select: none; | |
-webkit-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
This file contains hidden or 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
curl http://api.joind.in | python -mjson.tool |
This file contains hidden or 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
//gets type of a variable, all lower case | |
function get_type( what ){ | |
return Object.prototype.toString.call( what ).slice( 8,-1 ).toLowerCase(); | |
} |
This file contains hidden or 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
//random color | |
//from: http://www.mrspeaker.net/2013/03/08/random-hex-colour/ | |
//16777216 = 1 << 24 | |
// ES5 | |
function random_color(){ | |
return '#'+ ( '00000' + ( Math.random() * 16777216 | 0 ).toString( 16 ) ).slice( -6 ); | |
} | |
// ES6 |
This file contains hidden or 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
#sort files by number of lines | |
find /path/to/folder -name '*.js' | xargs wc -l | sort |
This file contains hidden or 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
# resize image, padded |
This file contains hidden or 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
cd DIR_FROM | |
find . \! \( -name . -or -name ".svn" -or -path "*/.svn/*" \) -print | cpio -padv PTH_TO |
This file contains hidden or 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
"I <feeling> that".replace( /<(.+?)>/g, "\$$1" ); | |
//won't work - will produce ""I $1 that"" | |
"I <feeling> that".replace( /<(.+?)>/g, "$$$1" ); | |
//works - "I $feeling that" |
NewerOlder