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
| # bower install <name-for-your-directory>=http://<url>/<file-name> -S | |
| # example | |
| bower install dom4-polyfill=https://raw.githubusercontent.com/WebReflection/dom4/master/build/dom4.js -S |
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
| #!/bin/bash | |
| git fetch | |
| git add --all . | |
| git status | |
| git commit -m "$2" | |
| git push |
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
| // Create the function | |
| // 'a' and 'b' are the arguments available to the function, | |
| // the last string is the body of your new function | |
| var x = Function('a','b','console.log(a+b); return "apples";'); | |
| // Implementation | |
| x(1,2); // will return 'apples' and will log to the console '3'; |
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 push -u origin my_branch | |
| git push -u [email protected]:name-of-repo.git my-branch | |
| # same as: | |
| git push --set-upstream [email protected]:name-of-repo.git my-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
| # directory goes back to the hash, ALL changes AFTER hash are discarded. | |
| # you can always merge in a different branch to update later changes. | |
| git checkout -b <temp-branch-name> <myHashGoesHere> | |
| # OR | |
| # create a new branch | |
| git checkout -b <temp-branch-name> | |
| # reverts all files that were originally part of this hash back to their |
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
| _.each( '<collection>', function(item,count,collection) { | |
| // do stuff | |
| }, this /* this becomes available in your function */); |
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
| npm shrinkwrap --dev |
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 -o mygettext.html http://www.gnu.org/software/gettext/manual/gettext.html |
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
| # From: http://www.cmake.org/pipermail/cmake/2013-February/053649.html | |
| # This will create a directory named "Support" in your home folder, download | |
| # and extract CMake 2.8.10. Finally it invokes cmake with the "-version" | |
| # param to check that cmake run. | |
| cd && mkdir Support && cd Support && \ | |
| wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.tar.gz && \ | |
| tar -xzvf cmake-2.8.10.2-Linux-i386.tar.gz && \ | |
| ./cmake-2.8.10.2-Linux-i386/bin/cmake -version |
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 "myfile.js" |