- 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
<?php | |
/** | |
* Usage: | |
* $message = 'My First Push Notification!'; | |
* $pushServer = new PushSerer(); | |
* $pushServer->pushToGoogle('REG-ID-HERE', $message); | |
* $pushServer->pushToApple('DEVICE-TOKEN-HERE', $message); | |
*/ | |
class PushServer |
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
'use strict'; | |
/** | |
* Usage: ng-style="style()" resize heightpercetange="50" widthpercetange="50" | |
*/ | |
angular.module('app') | |
.directive('resize', function ($window) { | |
return { | |
restrict: 'A', |
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 |
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
@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
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
/** | |
* 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
/* prevent XSS. */ | |
$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING); | |
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); |