Skip to content

Instantly share code, notes, and snippets.

michaelmartinez in ~
≥ sudo npm install jitsu -g 9:33
Password:
npm http GET https://registry.npmjs.org/jitsu
npm http 200 https://registry.npmjs.org/jitsu
npm http GET https://registry.npmjs.org/jitsu/-/jitsu-0.8.4-1.tgz
npm http 200 https://registry.npmjs.org/jitsu/-/jitsu-0.8.4-1.tgz
npm ERR! error rolling back jitsu@0.8.4-1 Error: UNKNOWN, unknown error '/usr/local/lib/node_modules/jitsu/node_modules/require-analyzer/node_modules/npm/node_modules/fstream/examples/path/to'
npm ERR! Error: UNKNOWN, unknown error '/usr/local/lib/node_modules/jitsu/node_modules/require-analyzer/node_modules/npm/node_modules/fstream/examples/path/to'
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module './lib/abstract.js'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/usr/local/lib/node_modules/jitsu/node_modules/require-analyzer/node_modules/npm/node_modules/fstream/fstream.js:1:82)
at Module._compile (module.js:441:26)
@MichaelMartinez
MichaelMartinez / api.js
Created April 2, 2012 19:16 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
// dir= models/battalion
Battalion.hasMany(Unitnum, {as: 'unitnums', foreignKey: 'name'});
Unitnum.belongsTo(Battalion, {as: 'battalion', foreignKey:'name'});
@MichaelMartinez
MichaelMartinez / bootstrap.jade
Created April 6, 2012 03:56 — forked from BenHall/bootstrap.jade
Twitter Bootstrap in Jade
script(src='/javascripts/jquery-1.7.min.js')
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/bootstrap-overrides.css')
@MichaelMartinez
MichaelMartinez / routes.js
Created April 10, 2012 06:49
Controller, Models, route
exports.routes = function ( map ) {
map.resources( 'units' );
map.resources( 'stations', function ( station ) {
station.resources( 'units' );
} );
map.resources( 'battalions', function ( battalion ) {
@MichaelMartinez
MichaelMartinez / gist:2378597
Created April 13, 2012 17:29
Homebrew error
michaelmartinez in ~
≥ brew update 22:26
error: The following untracked working tree files would be overwritten by merge:
Library/Formula/cocot.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/node-gyp requires mkdirp@'0.3.0' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/mkdirp,
npm WARN unmet dependency which is version 0.3.2
npm WARN ___derby.npm * Unmet dependency in /usr/local/lib
npm WARN mocha * Unmet dependency in /usr/local/lib
@MichaelMartinez
MichaelMartinez / gist:2699438
Created May 15, 2012 05:51
Index Issue with rails admin
https://github.com/ryanb/cancan/issues/443
@MichaelMartinez
MichaelMartinez / gist:2699446
Created May 15, 2012 05:52
Index Issue with rails admin
CanCan is the cause for the first part
https://github.com/ryanb/cancan/issues/443
http://stackoverflow.com/questions/7013192/routingerror-resulting-from-redirect-to-root-url-not-passing-action
Will_paginate is the second part
https://github.com/mislav/will_paginate/issues/174