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
<snippet> | |
<content><![CDATA[ | |
console.log(require('util').inspect(${1:this}, { | |
depth: ${2:null}, | |
colors: ${3:true} | |
})); | |
]]></content> | |
<!-- Set the tab trigger to nlog (node log) --> | |
<tabTrigger>nlog</tabTrigger> | |
<!-- Set the file scope to .js files --> |
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
javascript:(function () { | |
var query = window.location.search, | |
params = {}, | |
key, | |
value; | |
query = query.indexOf('?') === 0 ? query.substring(1, query.length) : query; | |
query = query.split('&'); |
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
javascript:(function () { | |
function twoDigits(number) { | |
return number.toString().length === 1 ? '0' + number : number; | |
} | |
var date = new Date((new Date()).getTime()-1000*60*60*24*7), | |
org = 'jquery', | |
repo = 'jquery', | |
filters = [ | |
'is:pr', | |
'author:jasonmerino', |
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 "*.js" | grep -v node_modules | while read i; do js2coffee "$i" > "${i%.*}.coffee"; done |
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
javascript:(function () { | |
function getPullRequestUrl() { | |
return prompt('Enter pull request URL'); | |
} | |
function getSites() { | |
return [ | |
'build', | |
'faucet', |
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
Backbone.Model.prototype.defaultSet = Backbone.Model.prototype.set; | |
_.extend(Backbone.Model.prototype, { | |
/** | |
* Adds schema type casting to models before setting attributes | |
* @param {Object|String} key The key of the value to set or an object of value pairs | |
* @param {String|Object} val The value to set or the options object | |
* @param {Object|undefined} options The options for saving or undefined | |
*/ |
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
javascript:(function() { | |
// create a spec of field's -> values | |
// note: don't be silly and put actual credit card numbers in here, this is just for testing purposes | |
var spec = { | |
'credit-card': '4321 4321 4321 4321', | |
expiration: '12/23', | |
cvv: 987 | |
}; | |
for (var id in spec) { |
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
javascript:(function(){ | |
var nodes = document.querySelectorAll('*'), | |
ids = [], | |
duplicates = []; | |
for (var i = 0; i < nodes.length; i++) { | |
var node = nodes[i]; | |
if (node.id !== '') { | |
if (ids.indexOf(node.id) === -1) { | |
ids.push(node.id); | |
} else { |
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
javascript:(function () { | |
function get(selector) { | |
try { | |
return document.querySelector(selector); | |
} catch(error) { | |
return {}; | |
} | |
} |
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
javascript:(function(){ | |
var b = prompt('Enter branch number.'); | |
if(b !== null){ | |
b = b.length === 3 ? '0' + b : b; | |
window.location.href='http://mob-'+b+'.mbranch.lightingdirect.com?abtest=off'; | |
} | |
}()); |