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
exports.bufferOrderFile = function (req) { | |
const d = exports.createDeferred() | |
var name | |
const data = [] | |
// Capture errors but intentially resolve to undefined | |
const captureErAndRes = er => { log.err(er); d.resolve() } | |
try { |
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
{"baseURL":"http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/$%7Bz%7D/$%7By%7D/$%7Bx%7D","opacity":1,"singleTile":false,"type":"XYZ","maxExtent":[-20037508,-20037508,20037508,20037508.34],"tileSize":[256,256],"extension":"%7D","resolutions":[156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717,0.29858214168548586,0.14929107084274293,0.07464553542137146]} |
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
awk 'match($0, "layouts:") == 1 { print $0 }' test.yaml | wc -l | |
sed '/layouts:/ i\ - !dnsMatch\n host: HI THERE\n' test.yaml | head -n 100 |
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
[ { "name": "Marc" | |
, "quote": "Intern! My cube needs to be GC'ed!" } | |
, { "name": "George Carlson" | |
, "quote": "I don't read documentation, I just try random parameters..." } | |
, { "name": "Jon Kelly" | |
, "quote": "Sometimes a man needs a lot of chips" } | |
, { "name": "Myles Steinhauser" | |
, "quote": "I start with the toilet first" } | |
, { "name": "Kathy Nelson" | |
, "quote": "I googled you, didn't you get my google?" } |
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
Handle<Value> Method(const Arguments &args) { | |
HandleScope scope; | |
return scope.Close(Undefined()); | |
} | |
// are these doing the same thing? | |
Handle<Value> Method(const Arguments &args) { | |
HandleScope scope; | |
} |
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
void Socket::Init(Handle<Object> target) { | |
HandleScope scope; | |
Local<FunctionTemplate> t = FunctionTemplate::New(New); | |
t->SetClassName(String::NewSymbol("Socket")); | |
t->InstanceTemplate()->SetInternalFieldCount(1); | |
t->InstanceTemplate()->SetAccessor(String::NewSymbol("state"), GetState, NULL); | |
SetPrototypeMethod(t, "bind", Bind); | |
SetPrototypeMethod(t, "bindSync", BindSync); |
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 cookie = require('cookie') | |
var connectUtils = require('connect').utils | |
// ---- | |
io.set('authorization', function (data, ack) { | |
var cookies = cookie.parse(data.headers.cookie) | |
var signedCookies = connectUtils.parseSignedCookies(cookies, 'YOUR SECRET') | |
redisSession.get(signedCookies['connect.sid'], function (err, sess) { | |
data.session = sess |
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 OrderManager = { | |
getRecordById: function (id) { | |
function gridCheck (TypeOrder) { | |
if (TypeOrder != null) { | |
var record = TypeOrder.getGrid().store.getById(id) | |
if (record) { | |
return { // would like the parent function to exit here (but ain't gonna happen) | |
record: record, | |
grid: TypeOrder.getGrid() |
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
# Overall I like CoffeeScript, but these have bitten me. | |
# 1. | |
if cat is not "fluffy" # means if cat is false | |
# 2. | |
a = i for i in [1,2,3] # 3 | |
b = | |
c: i for i in [1,2,3] # [1,2,3] |
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
node_modules/**/build | |
node_modules/**/out | |
node_modules/**/.lock-wscript | |
npm_debug.log |