Skip to content

Instantly share code, notes, and snippets.

mbp:~ luke$ stenographer I
/Users/luke/Repos/nvm/v0.8.4/lib/node_modules/stenographer/index.js:49
console.log(JSON.parse(resp).hypotheses[0].utterance)
^
TypeError: Cannot read property 'utterance' of undefined
at ConcatStream.cb (/Users/luke/Repos/nvm/v0.8.4/lib/node_modules/stenographer/index.js:49:49)
at ConcatStream.end (/Users/luke/Repos/nvm/v0.8.4/lib/node_modules/stenographer/node_modules/concat-stream/index.js:43:21)
at Request.onend (stream.js:66:10)
at Request.EventEmitter.emit (events.js:115:20)
mbp:~ luke$ stenographer I
/Users/luke/Repos/nvm/v0.8.4/lib/node_modules/stenographer/index.js:49
console.log(JSON.parse(resp).hypotheses[0].utterance)
^
TypeError: Cannot read property 'utterance' of undefined
at ConcatStream.cb (/Users/luke/Repos/nvm/v0.8.4/lib/node_modules/stenographer/index.js:49:49)
at ConcatStream.end (/Users/luke/Repos/nvm/v0.8.4/lib/node_modules/stenographer/node_modules/concat-stream/index.js:43:21)
at Request.onend (stream.js:66:10)
at Request.EventEmitter.emit (events.js:115:20)
#!/bin/bash
ip=`/usr/bin/curl -s ipv4.icanhazip.com`
echo -n $ip | /usr/bin/pbcopy
echo $ip
{
"author": "Joshua Holbrook",
"name": "hoarders",
"description": "node.js's most complete \"utility grab-bag\". Dedicated to substack.",
"version": "0.0.0",
"dependencies": {
"27bslash6-module": "*",
"2co": "*",
"2csv": "*",
"2kenizer": "*",
if (err || !files) return (err ? console.log(err) : (function() {throw new Error('no files')})())
NameVirtualHost *:80
<Directory /var/www/>
AllowOverride All
</Directory>
<VirtualHost *:80>
</VirtualHost>
Include sites-enabled/*
<VirtualHost *:80>
ServerName mtambo.com
ServerAlias www.mtambo.com
DocumentRoot /var/www/mtambo.com/htdocs
ErrorLog /var/www/mtambo.com/logs/error.log
CustomLog /var/www/mtambo.com/logs/acomess.log common
</VirtualHost>
@luk-
luk- / http_build_query.js
Created May 17, 2012 22:42
php's http_build_query() in javascript
var build_query = function (obj, num_prefix, temp_key) {
var output_string = []
Object.keys(obj).forEach(function (val) {
var key = val;
num_prefix && !isNaN(key) ? key = num_prefix + key : ''
[ { '@':
{ b1: '475174',
start_tfs_zulu: '2012-04-17T03:12:59Z',
event: 'Single',
start_tfs: '231259',
num: '75',
b2: '460026',
pitcher: '543022',
batter: '475174',
b3: '',
curl http://api.nodejitsu.com -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11' -v