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
| [master]$ git checkout -b localdev | |
| # Make all of your changes in your local dev branch | |
| [localdev]$ git add . | |
| [localdev]$ git commit -m"My changes" | |
| [localdev]$ git checkout master | |
| [master]$ git pull | |
| # If no changes from the remote, just merge localdev | |
| # Case 1: No changes from remote | |
| [master]$ git merge localdev | |
| [master]$ 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
| define([ | |
| 'underscore', | |
| 'backbone', | |
| 'models/mymodel' | |
| ], function(_, Backbone, MyModel){ | |
| var Foo = Backbone.Collection.extend({ | |
| model: MyModel | |
| }); | |
| return Foo; | |
| }); |
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
| define([ | |
| 'underscore', | |
| 'backbone' | |
| ], function(_, Backbone){ | |
| var Foo = Backbone.Model.extend({ | |
| }); | |
| return Foo; | |
| }); |
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
| ol { | |
| counter-reset:li; | |
| } | |
| ol li { | |
| list-style:none; | |
| } | |
| ol li:before { | |
| content:counter(li); /* Use the counter as content */ |
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 wtf_log($code) { | |
| if (is_null($code) || is_string($code) || is_int($code) || is_bool($code) || is_float($code)) : | |
| $code = var_export($code, true); | |
| else : | |
| $code = print_r($code, true); | |
| endif; | |
| error_log($code); |
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($) { | |
| var o = $( {} ); | |
| $.each({ | |
| on: 'subscribe', | |
| trigger: 'publish', | |
| off: 'unsubscribe', | |
| }, function ( key, api ) { | |
| $[api] = function() { | |
| o[key].apply( o, arguments ); |