Skip to content

Instantly share code, notes, and snippets.

View bingomanatee's full-sized avatar

Dave Edelhart bingomanatee

View GitHub Profile
sudo make install
! [ -d .git ] || git submodule update --init
node cli.js install -g
semver@1.0.2 /usr/local/lib/node_modules/npm/node_modules/semver
npm ERR! error installing npm@1.0.0rc3 Error: Refusing to delete non-npm file (override with --force)
npm ERR! error installing npm@1.0.0rc3 at clobberFail (/home/dave/npm/lib/utils/rm-rf.js:59:12)
npm ERR! error installing npm@1.0.0rc3 at /home/dave/npm/lib/utils/rm-rf.js:80:42
npm ERR! error installing npm@1.0.0rc3 at /home/dave/npm/lib/utils/rm-rf.js:68:12
npm ERR! error installing npm@1.0.0rc3 at cb (/home/dave/npm/lib/utils/graceful-fs.js:31:9)
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm.js
@bingomanatee
bingomanatee / farnsworth.txt
Created May 19, 2011 15:55
Farnsworth Paradox Output
DAVID-A-EDELHARTs-MacBook-Pro:farnsworth bingomanatee$ node index.js
looking for universe universeA
/Users/bingomanatee/Documents/node/farnsworth/node_modules/universes.js : returning universe universeA :
/Users/bingomanatee/Documents/node/farnsworth/index.js : person fry , name: fry of A
/Users/bingomanatee/Documents/node/farnsworth/index.js : person leela , name: leela of A
/Users/bingomanatee/Documents/node/farnsworth/index.js : person professor , name: professor of A
/Users/bingomanatee/Documents/node/farnsworth/index.js ... they have 1 universes
looking for universe universeB
/Users/bingomanatee/Documents/node/farnsworth/node_modules/universes.js : returning universe universeB :
/Users/bingomanatee/Documents/node/farnsworth/index.js ... and here is universeB :
@bingomanatee
bingomanatee / scaffold error
Created May 28, 2011 20:09
Odd error when attempting to scaffold
rails generate scaffold Foo name: string
`to_specs': Could not find rails (>= 0) amongst [rake-0.8.7, rake-0.8.7, rubygems-update-1.8.4] (Gem::LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:1182:in `gem'
from /usr/local/bin/rails:18
@bingomanatee
bingomanatee / map_zoom.js
Created June 12, 2011 21:00
where does map_coords go
var models_module = require(MVC_MODELS);
var Gate = require('util/gate');
var map_reduce = require('./zoom_back_map_reduce');
function _zoom(err, map_coords_model, map_id, map_data, map_mode, callback) {
console.log(__filename, ': _zoom() ##################');
// var args = Array.prototype.slice.call(arguments, 0);
// console.log('arguments: ', args);
//FIRST ACTION : knock all the zooms back one
try {
@bingomanatee
bingomanatee / read.bin.js
Created July 4, 2011 22:14
what am I doing wrong?
var fs = require('fs');
// read mars data at http://pds-geosciences.wustl.edu/geo/mgs-m-mola-5-megdr-l3-v1/mgsl_300x/meg004/megt90n000cb.img
var data = fs.readFileSync(__dirname + '/megt90n000cb.img', 'binary');
if (Buffer.isBuffer(data)){
console.log('data is buffer');
} else {
console.log('data is not buffer');
var buffer = new Buffer(data, 'binary');
@bingomanatee
bingomanatee / parse_data_rows.js
Created July 8, 2011 18:30
Reading Mars Data -- getting memory overflow
mm = require(MVC_MODELS);
var Mola = require('mola');
var scale = require('mola/scale');
var path_module = require('path');
var bin = require('util/binary');
var fs = require('fs');
var Gate = require('util/gate');
/**
* the Gate class calls the callback passed to its constructor
* when the number of task_start() calls equals the number of task_done() calls.
@bingomanatee
bingomanatee / dialog.js
Created July 28, 2011 16:46
unity Editor dialog
class MyDialog extends EditorWindow {
@MenuItem("Terrain/Dialog Test")
static function ShowWindow() {
var window:MyDialog = EditorWindow.GetWindow(MyDialog);
}
static function load_section(){
print('load section');
}
@bingomanatee
bingomanatee / update_tiles.js
Created August 21, 2011 17:53
Updating a series of tiles
/**
* scale = 128
* i_limit = c.5600
* j_limit = c.11000
*/
for (var i = 0; i < i_limit; i += scale)
for (var j = 0; j < j_limit; j += scale) {
// if (i > i_limit) continue;
// if (j > j_limit) continue;
var heights = _chunk(image_data, i, i + scale, j, j + scale);
@bingomanatee
bingomanatee / mapimage_tile.json
Created August 26, 2011 14:32
Why is this taking so long to save in mongo?
{ "img_ref" : {
"$ref" : "mapimage",
"$id" : "4e454599f404e8d51c000002"
},
"scale" : 128, "image" : "4e454599f404e8d51c000002", "tile_i" : 0, "tile_j" : 9, "w" : 9, "e" : 10, "n" : 0, "s" : 0,
"heights" : [
[
0,
2,
0,
@bingomanatee
bingomanatee / fabfile.py
Created September 14, 2011 21:52
A fabric script file
from fabric.api import *
import agi_config
import fab_lib
# these lists are populated with 'username@hostname' strings by prep_hosts()
ast_hostnames_as_root = []
ast_hostnames_as_tyger = []
agi_hostnames_as_root = []
agi_hostnames_as_tyger = []