Skip to content

Instantly share code, notes, and snippets.

View ncb000gt's full-sized avatar
💭
Slapping keyboard...

Nick Campbell ncb000gt

💭
Slapping keyboard...
View GitHub Profile
### Keybase proof
I hereby claim:
* I am ncb000gt on github.
* I am ncb000gt (https://keybase.io/ncb000gt) on keybase.
* I have a public key ASCXe6CHpdJM8EyHicb7sY_Pe8loMc9KfGgK78Fs3rZ-uAo
To claim this, I am signing this object:
@ncb000gt
ncb000gt / gist:4055497
Created November 11, 2012 16:54
bearshark deploy
prompt: Is this ok?: (yes)
info: Creating snapshot 0.0.0-16
info Uploading: [=============================] 100%
info: Updating app nko3-team-bearshark
info: Activating snapshot 0.0.0-16 for nko3-team-bearshark
info: Starting app nko3-team-bearshark
error: Error running command deploy
error: socket hang up
info:
info: jitsu's client request timed out before the server could respond
@ncb000gt
ncb000gt / fixit.coffee
Created August 9, 2012 17:32
fixit script for hubot. Simple and to the point.
# Description:
# Hubot provides some encouragement to fix it.
#
# Configuration:
# None
#
# Author:
# ncb000gt
fixit = 'http://www.youtube.com/watch?v=p6PZhONZ3Ac'
@ncb000gt
ncb000gt / tako-template-reload.js
Created August 6, 2012 02:10
Tako template reloads.
var tako = require('tako'),
path = require('path'),
watch = require('watch'),
app = tako(),
templates = app.templates;
var templatePath = path.join(__dirname, 'templates');
templates.directory(templatePath);
watch.watchTree(templatePath, function() {
console.log('reload templates');
@ncb000gt
ncb000gt / binding.gyp
Created May 13, 2012 17:01
bcrypt gyp integration
{
'variables': {
'ARCH': 'x64'
},
'targets': [
{
'target_name': 'bcrypt_lib',
'include_dirs': [
'<(node_root_dir)/deps/uv/include',
'<(node_root_dir)/deps/v8/include',
@ncb000gt
ncb000gt / node_format.js
Created May 10, 2012 14:10
Check for string format.
var libxml = require('libxml');
module.exports.to_string = function(assert) {
var doc1_string = [
'<?xml version="1.0" encoding="UTF-8"?>',
'<root><child to="wongfoo"/></root>',
].join("\n");
var expected_string = "<child/>";
@ncb000gt
ncb000gt / rm-vim.sh
Created January 31, 2012 16:58
Remove VIM files in SVN directories.
svn status | grep -e "sw[a-z]" | tr -d "\t? " | xargs rm -f
@ncb000gt
ncb000gt / valgrind.out.20111125
Created November 25, 2011 21:43
Output of running valgrind on node.bcrypt.js async code.
==4958== Memcheck, a memory error detector
==4958== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==4958== Using Valgrind-3.6.1-Debian and LibVEX; rerun with -h for copyright info
==4958== Command: node examples/async_compare.js
==4958== Parent PID: 2625
==4958==
==4958== Warning: set address range perms: large range [0x29ae5ecc6000, 0x29ae7ecc6000) (noaccess)
==4958==
==4958== HEAP SUMMARY:
==4958== in use at exit: 221,773 bytes in 131 blocks
db.get(key, function(err, doc) {
cb(err, doc);
});
@ncb000gt
ncb000gt / test-bcrypt.js
Created September 2, 2011 02:22
bcrypt test to find segfault?
var bcrypt = require('./bcrypt');
while (true) {
bcrypt.gen_salt(10, function(err, salt) {
console.log('salt: ' + salt);
console.log('salt cb end: ' + (Date.now() - start) + 'ms');
})
}