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
<div class="contain" id="contain"></div> |
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
#!/bin/sh | |
# | |
# Prepend the branch name to the commit message | |
# | |
# Add this file as [repo]/.git/hooks/prepare-commit-msg | |
# | |
# A couple notes: | |
# 1. The file must be executable (chmod +x prepare-commit-msg) | |
# 2. This works on a per-repo basis (unless you follow this guide https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook) |
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
var productView = function() { | |
this.data = this.data || {}; | |
return { | |
set: function(options) { | |
$.extend(this.data, options); | |
}, | |
get: function(key) { |
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'; | |
} | |
}()); |
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 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() { | |
// 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
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 () { | |
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
find . -name "*.js" | grep -v node_modules | while read i; do js2coffee "$i" > "${i%.*}.coffee"; done |
OlderNewer