I hereby claim:
- I am chad3814 on github.
- I am chad3814 (https://keybase.io/chad3814) on keybase.
- I have a public key whose fingerprint is FEC7 4FF5 182D B552 4729 D20D 7886 F7FB F31A D420
To claim this, I am signing this object:
passport.use('twitter', new TwitterStrategy({ | |
consumerKey: config.tw_consumer_key, | |
consumerSecret: config.tw_secret, | |
callbackURL: config.base_url + '/twitter/callback' | |
}, function (token, token_secret, profile, done) { | |
// twitter callback comes here to get the twuser obj | |
log.info('got twitter profile:', profile); | |
var TWUser = require('../models/twuser'); | |
// find the twitter obj if it exists | |
db.findTWUser({providerid: profile.id}, function (err, doc) { |
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |
'use strict'; | |
var path = require('path'); | |
var jsdom = require('jsdom'); | |
var dumpBody = function (document) { | |
console.log('contents of the document:'); | |
console.log(document.body.innerHTML); | |
}; |
'use strict'; | |
var http = require('http'); | |
var sio = require('socket.io'); | |
var app = http.createServer(function (req, res) { | |
if (req.url === '/') { | |
res.writeHead(200, { | |
'Content-Type': 'text/html' | |
}); |
'use strict'; | |
var not = function (x) { | |
if (x) { | |
return false; | |
} | |
return true; | |
}; | |
var and = function (a, b) { |
I hereby claim:
To claim this, I am signing this object:
var key_file = fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'non_ev_domains.key')); | |
var cert_file = fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'non_ev_domains.crt')); | |
var ca_files = [ | |
fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'COMODORSADomainValidationSecureServerCA.crt')), | |
fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'COMODORSAAddTrustCA.crt')) | |
]; | |
var credentials = { | |
key: key_file, | |
cert: cert_file, | |
ca: ca_files |
I hereby claim:
To claim this, I am signing this object:
{ | |
"targets": [ | |
{ | |
"target_name": "AsyncEmitter", | |
"sources": [ "emitter.cc" ], | |
"include_dirs": [], | |
"dependencies": [], | |
"cflags!": [ "-fno-exceptions" ], | |
"cflags_cc!": [ "-fno-exceptions" ], |
'use strict'; | |
class Color { | |
constructor (name, multiplier) { | |
this.name = name; | |
this.multiplier = multiplier; | |
} | |
} | |
let colors = [ |