- Make sure you have yo installed:
npm install -g yo - Run:
yo webapp - Install grunt-contrib-jade:
npm install grunt-contrib-jade --save-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
| sudo vim ~/.bash_profile |
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 -all |
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
| /* prevent XSS. */ | |
| $_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING); | |
| $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); |
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 Pull | |
| * | |
| * @author Adam Patterson | |
| * http://www.adampatterson.ca/blog/2011/10/diy-simple-staging-server/ | |
| * | |
| * Use: echo pull(); | |
| */ | |
| function pull ( ) |
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 TEMPORARY TABLE tmptable_1 SELECT * FROM your_table WHERE primarykey = '1'; | |
| UPDATE tmptable_1 SET primarykey = NULL; | |
| INSERT INTO your_table SELECT * FROM tmptable_1; | |
| DROP TEMPORARY TABLE IF EXISTS tmptable_1; |
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
| @keyframes shake{ | |
| 0% { transform: translate(3px, 0); } | |
| 50% { transform: translate(-3px, 0); } | |
| 100% { transform: translate(0, 0); } | |
| } | |
| @-moz-keyframes shake{ | |
| 0% { -moz-transform: translate(3px, 0); } | |
| 50% { -moz-transform: translate(-3px, 0); } | |
| 100% { -moz-transform: translate(0, 0); } |
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
| <input type='text' onkeypress='validate(event)' /> | |
| <script> | |
| function validate(evt) { | |
| var theEvent = evt || window.event; | |
| var key = theEvent.keyCode || theEvent.which; | |
| key = String.fromCharCode( key ); | |
| var regex = /[0-9]|\./; | |
| if( !regex.test(key) ) { | |
| theEvent.returnValue = false; |
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 reset --hard hub/master |