git grep "regex"
git branch -a
| function t(s,d){ | |
| for(var p in d) | |
| s=s.replace(new RegExp('{'+p+'}','g'), d[p]); | |
| return s; | |
| } | |
| Call it like this: | |
| t("Hello {who}!", { who: "JavaScript" }); | |
| // "Hello JavaScript!" | |
| # Update Repo excluding externals. | |
| svn update --ignore-externals | |
| # commit | |
| svn commit -m "Fixed bug." | |
| # Merge from trunk to branch. Make sure your in the correct directory eg. static/ | |
| svn merge https://svn.hhi.net.au/pagecraft/Toyota/MainWebsite/static/ |
| // safely wrap console | |
| 'console' in window && console.log("Boom!"); |
| <div class="row"> | |
| <div class="grid-6">Column A</div> | |
| <div class="grid-6">Column B</div> | |
| </div> | |
| <div class="row"> | |
| <div class="grid-4">Column A</div> | |
| <div class="grid-4">Column B</div> | |
| <div class="grid-4">Column C</div> | |
| </div> | |
| <div class="row"> |
| <div class="spacer50"></div> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <!-- load jQuery 1.11.1 --> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
| <script> | |
| var jQuery_1_11_1 = $.noConflict(true); | |
| </script> |
| // @type documentation http://usejsdoc.org/tags-type.html | |
| /** @type {Array.<jQuery>} An array of jQuery elements */ | |
| var elements = $('div'); |
| function logItem(item) { | |
| console.log(item); | |
| } | |
| function asyncEach3(arr, callback) { | |
| // Utility inner function to create a wrapper function for the callback | |
| function makeCallbackWrapper(arr, i, callback) { | |
| // Create our function scope for use inside the loop | |
| return function() { | |
| callback(arr[i]); |
| (function(){ | |
| console.log( $('#category-sales-content').html() + ':' ); | |
| $('.faq-list').each(function(i, item){ | |
| var $item = $(item); | |
| console.log( $item.find('.faq-title').html() ); | |
| }); | |
| })() |