This file contains 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($) { | |
$.fn.comboBreaker = function(options) { | |
var index = 0, timeout = null, dfd = $.Deferred(); | |
options = $.extend({}, $.fn.comboBreaker.defaults, options); | |
if (! options.combo) { | |
throw new Error("combo not set"); | |
} |
This file contains 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/bash | |
while getopts "arp:d:" opt; do | |
case $opt in | |
a) | |
adding=true | |
;; | |
r) | |
adding=false | |
;; |
This file contains 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
/** | |
* I'm writing this for the purpose of copying all of my local | |
* locale files from all of my node projects that are using | |
* `strong` translation library (https://github.com/fs-webdev/strong) | |
* or (https://github.com/timshadel/strong) to a centralized place | |
* so that I can create a "translation memory". | |
* | |
* Usage: | |
* | |
* node localeCopier.js # from path defaults to "."; to path defaults to "~/Documents/locales" |
This file contains 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
getCookie : function(cookieID) { | |
var dc = document.cookie, prefix = cookieID + "=", begin = dc.indexOf("; " + prefix); | |
if (begin == -1) { | |
begin = dc.indexOf(prefix); | |
if (begin != 0) | |
return null; | |
} | |
else | |
begin += 2; | |
var end = document.cookie.indexOf(";", begin); |
This file contains 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
alias fs="([[ -a Procfile.dev ]] && foreman start -f Procfile.dev) || foreman start" |
This file contains 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 euLocales = [ | |
"de-at", //Austria | |
"fr-be", //Belgium (French) | |
"nl-be", //Belgium (Dutch) | |
"bg", //Bulgaria | |
"el-cy", //Cyprus | |
"cs", //Czech Republic | |
"da", //Denmark | |
"et", //Estonia | |
"fi", //Finland (Finnish) |
This file contains 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
####################################################### | |
## Adds some frustration the `cd` command | |
## https://gist.github.com/dncrews/1ba8919b24b2e4569c2f | |
## Author: Dan Crews <crewsd@gmail.com> | |
####################################################### | |
#!/bin/sh | |
alias cd=annoyingCD | |
function annoyingCD () { |
This file contains 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
type Inventory { | |
total: Int! | |
available: Int! | |
} | |
extend type Product @key(fields: "id") { | |
id: ID! @external | |
inventory: Inventory! | |
} |
This file contains 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
type Order { | |
id: ID! | |
productsConnection: OrderProductsConnection! | |
} | |
input OrderInput { | |
lineItems: [OrderLineItemInput!]! | |
paymentToken: String! | |
} |
This file contains 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
query ProductInventory { | |
product(id: "product-1") { | |
inventory: { | |
available | |
} | |
} | |
} |
OlderNewer