Skip to content

Instantly share code, notes, and snippets.

View trodrigues's full-sized avatar
😸
:3

Tiago Rodrigues trodrigues

😸
:3
View GitHub Profile
@trodrigues
trodrigues / gist:2478000
Created April 24, 2012 08:45
union install error
% npm install union
npm http GET https://registry.npmjs.org/union/0.3.0
npm http 200 https://registry.npmjs.org/union/0.3.0
npm http GET https://registry.npmjs.org/union/-/union-0.3.0.tgz
npm http 200 https://registry.npmjs.org/union/-/union-0.3.0.tgz
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/pkginfo
npm http 200 https://registry.npmjs.org/qs
npm ERR! error installing pkginfo@0.2.3
@trodrigues
trodrigues / gist:2374515
Created April 13, 2012 06:46
nodejitsu deploy fail
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to deploy your application.
error:
error: Rackspace Error (404): Item not found
error: Error output from Haibu:
error:
error: Error: Rackspace Error (404): Item not found
error: at Request._callback (/root/haibu-orchestra/node_modules/haibu/node_modules/cloudfiles/lib/cloudfiles/common.js:184:18)
@trodrigues
trodrigues / gist:2371089
Created April 12, 2012 21:27
package.json scripts snippet
"scripts": {
"pretest": "./node_modules/jshint/bin/hint {app.js,lib/**/*.js} --config ./config/jshint.json",
"test": "./node_modules/buster/bin/buster-test",
"start": "node ./node_modules/nodemon/nodemon.js app.js"
}
var fs = require('fs');
fs.readFile('file', function (ಠ_ಠ, data) {
if (ಠ_ಠ) {
throw "(╯°□°)╯︵ ┻━┻)";
}
});
@trodrigues
trodrigues / gist:2127698
Created March 19, 2012 22:29
npm install --dev fail for jsdom dependencies
npm ERR! error installing wordwrap@0.0.2
npm ERR! error installing optimist@0.3.1
npm ERR! Error: ENOENT, no such file or directory '/Users/trodrigues/Dropbox/code/github/jsdom/node_modules/optimist/node_modules/hashish/node_modules/___traverse.npm/package/examples/negative.js'
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR!
npm ERR! System Darwin 11.2.0
@trodrigues
trodrigues / gist:2029164
Created March 13, 2012 14:37
get issues for a repo
% curl -i https://api.github.com/repos/busterjs/buster-docs/pulls
HTTP/1.1 200 OK
Server: nginx/1.0.13
Date: Tue, 13 Mar 2012 14:37:05 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Status: 200 OK
X-RateLimit-Limit: 5000
ETag: "6b10c9c87ff214c41279727e9f391cb5"
X-RateLimit-Remaining: 4995
#!/bin/bash
tasks=`grep "\w*:" Makefile|sed "s/all:.*//g"|cut -d ":" -f 1|sed s/\.PHONY//g`
echo "Available Makefile tasks:"
for i in $tasks ; do
echo $i
done
@trodrigues
trodrigues / wire spec example
Created February 9, 2012 17:48
references inside references
// should this.modules.module1 work?
define({
appStructure: {
literal: {
module1: { $ref: 'module1' },
module2: { $ref: 'module2' }
}
},
module1: {
create: {
remote: /data/github/current/lib/github/config/resque.rb:27: undefined method `constantize' for "GitHub::Jobs::UpdateParticipationGraph":String (NoMethodError)
remote: from /data/github/current/lib/github/config/resque.rb:26:in `each'
remote: from /data/github/current/lib/github/config/resque.rb:26
remote: from /data/github/current/lib/rock_queue.rb:9:in `require'
remote: from /data/github/current/lib/rock_queue.rb:9
remote: from hooks/post-receive:27:in `require'
remote: from hooks/post-receive:27
@trodrigues
trodrigues / bad jQuery practicies
Created January 20, 2012 14:38
Where does the before() content go?
$('.outer_class').addClass('status').find('.inner_class').html('some text goes here').before('some really really REALLY long piece of text and html');