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
| cp -R -f ./sourcedir/* ./targetdir/ |
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
| find . -name *.DS_Store -type f -exec rm {} \; | |
| find . -name ".svn" -exec rm -rf {} \; |
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
| git shortlog -s -n | |
| 135 Tom Preston-Werner | |
| 15 Jack Danger Canty | |
| 10 Chris Van Pelt | |
| 7 Mark Reid | |
| 6 remi | |
| 3 Mikael Lind | |
| 3 Toby DiPasquale | |
| 2 Aristotle Pagaltzis |
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
| git log --graph --pretty=oneline --abbrev-commit |
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
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
| } | |
| PS1='\[\e[0;36m\]\h: \e[0;32m\]\W\e[0;35m\]$(parse_git_branch)\[\e[m\] $ ' |
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
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
| } | |
| PS1='\[\e[0;36m\]\h: \e[0;32m\]\W\e[0;35m\]$(parse_git_branch)\[\e[m\] $ ' |
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
| Experiments in revision control: Curry recipe. | |
| My personal recipe for Japanese curry, which has mutated over the years and is | |
| now open-source thanks to github, hot damn. Some of the ingredients are not | |
| very Japanese, but curry came to Japan from England which got it from India to | |
| begin with, so whatever. | |
| 1.5 - 2 lbs. of meat, prefer thin-sliced beef (komagire), pork works, too. | |
| Thin-sliced stuff is always best, but in a pinch stewing beef works. Bacon | |
| works surprisingly well. Chicken will work, technically, but if you must, |
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
| function bubbleSort(array, onComplete){ | |
| var pos = 0; | |
| (function(){ | |
| var j, value; | |
| for (j=array.length; j > pos; j--){ | |
| if (array[j] < array[j-1]){ | |
| value = data[j]; |
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
| function memoizer(memo, fundamental) { | |
| var shell = function (n) { | |
| var result = memo[n]; | |
| if (typeof result !== 'number') { | |
| result = fundamental(shell, n); | |
| memo[n] = result; | |
| } | |
| return result; | |
| }; | |
| return shell; |
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
| function schedule(functions, context){ | |
| setTimeout(function(){ | |
| var process = functions.shift(); | |
| process.call(context); | |
| if (functions.length > 0){ | |
| setTimeout(arguments.callee, 100); | |
| } | |
| }, 100); |
OlderNewer