Skip to content

Instantly share code, notes, and snippets.

View bingomanatee's full-sized avatar

Dave Edelhart bingomanatee

View GitHub Profile
@bingomanatee
bingomanatee / fabfile.py
Created September 15, 2011 19:59
slipping throught exception handling with fabric
def update_agi(delay=4):
prep_hosts()
print 'waiting', delay, 'seconds for agis to cycle down'
run('sleep ' + str(delay))
kill_rails_command = fab_lib.kill_rails()
print 'destroy all rails'
try:
run(kill_rails_command, False, True)
except: # this will generally throw an error if there aren't any processes.
e = sys.exc_info()[1]
@bingomanatee
bingomanatee / mocha tesdt
Created November 24, 2011 03:19
mocha test ... why?
describe('basic', function () {
var app;
var content = 'hello world';
before(function (done) {
console.log('requiring server');
//app = require('./strata_server/app');
// console.log('server: ', util.inspect(app));
done();
});
@bingomanatee
bingomanatee / mocha test
Created November 24, 2011 03:19
mocha test ... why?
describe('basic', function () {
var app;
var content = 'hello world';
before(function (done) {
console.log('requiring server');
//app = require('./strata_server/app');
// console.log('server: ', util.inspect(app));
done();
});
@bingomanatee
bingomanatee / server_test.js
Created November 24, 2011 03:21
mocha test ... why?
describe('basic', function () {
var app;
var content = 'hello world';
before(function (done) {
console.log('requiring server');
//app = require('./strata_server/app');
// console.log('server: ', util.inspect(app));
done();
});
silly gunzTarPerm modes [ '755', '644' ]
silly afterUntar undefined
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/test.png
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/Makefile
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/Readme.md
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/install
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/.npmignore
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/wscript
silly asyncMap in gTP /home/bingomanatee/ac/arena-colles/node_modules/___canvas.npm/package/History.md
@bingomanatee
bingomanatee / MAP REDUCE WTF
Created March 12, 2012 18:36
How is my Map duty infecting my reduce output?
=begin
HERE IS MY RUBY MAP/REDUCE.
I have erased the destination collection "summary"
Note that the "ct" values from my MAP function are ending up in my output --
EVEN THOUGH THEY ARE NOT COMING FROM REDUCE!!!! WTF????
=end
map = <<-eos
function() {
if (this.hasOwnProperty('uri') && this.uri.hasOwnProperty('path') && this.uri.path){
@bingomanatee
bingomanatee / view.js
Created April 8, 2012 18:08
date filtering in Backbone.js
$(function () {
var pages = [];
var PageModel = Backbone.Model.extend({
defaults:{
title:"Untitled",
body:'New Article',
created:new Date(), // not precisely accurate but better than nothing
@bingomanatee
bingomanatee / gist:2480149
Created April 24, 2012 14:36
Trying to get the session example to work in Express 3.0 alpha
/**
* Module dependencies.
*/
var express = require('express');
var app = express.createServer(
express.logger()
@bingomanatee
bingomanatee / gist:2578878
Created May 2, 2012 18:16
caybara settings
Capybara.register_driver :selenium_firefox_gb do |app| #selenium_firefox_gb
prof = Selenium::WebDriver::Firefox::Profile.from_name 'default'
prof.accept_untrusted_certs = true
prof.ignore_ssl_errors = true
prof.assume_untrusted_certificate_issuer = false
pp "PROFILE: " + prof.inspect
Capybara::Selenium::Driver.new(app, :browser => :firefox,
:profile => prof)
end
@bingomanatee
bingomanatee / test.js
Created May 5, 2012 16:42
getting strange error
var NE = require('./../lib');
var path = require('path');
var _ = require('underscore');
var util = require('util');
var request = require('request');
var fs = require('fs');
var path = require('path');
var framework;