Skip to content

Instantly share code, notes, and snippets.

David Guttman davidguttman

Block or report user

Report or block davidguttman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidguttman
davidguttman / view.coffee
Last active Aug 29, 2015
Backbone style view using Bean for events
View view.coffee
bean = require 'bean'
template = require './template.jade'
View = module.exports = (@opts={}) ->
@el = document.createElement 'div'
@setEvents()
@render()
return this
View::setEvents = ->
View INSTALL.md

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

View browser.js
var multilevel = require('multilevel');
var shoe = require('shoe');
var sock = shoe('/sock');
var db = multilevel.client();
window.db = db;
sock.pipe(db.createRpcStream()).pipe(sock);
@davidguttman
davidguttman / index.js
Created Mar 28, 2014
requirebin sketch
View index.js
var text3dParticles = require('text-3d-particles')
var opts =
{ text: 'TW'
, width: 800
, height: 800
, fontSize: 220
, duration: 10000
, density: 8
, nodeSize: 12
View test.js
var test = require('tape');
test('setup', function (t) {
// ...
t.end();
});
// tests go here
test('teardown', function (t) {
View dynamodown-test.js
var test = require('tape')
, testCommon = require('abstract-leveldown/testCommon')
, DynamoDown = require('../')
testCommon.location = function() {return 'test-table'}
var dynOpts = {
region: 'us-east-1',
secretAccessKey: 'abc',
accessKeyId: '123',
View README.md

This was done on a stock ubuntu 14.04 cloud install, but should work on any distro (although you'd need to tweak the package install part to use yum or whatever and appropriate package names)

Install needed OS packages:

  • Install the packages needed for things to build

Oneliner:

apt-get update && apt-get install -y curl build-essential libx11-dev libxext-dev libpcap-dev zlib1g-dev libgdbm-dev
View index.js
// https://github.com/davidguttman/loading-wave
var Wave = require('loading-wave')
var wave = Wave({
width: 100,
height: 100,
n: 10
})
document.body.appendChild(wave.el)
View gist:ba96b1cfc0dfff2d4da8
var http = require('http');
var bl = require('bl');
var urls = [];
process.argv.slice(2).forEach(function(item){
urls.push(item)
});
console.log (urls)
View gist:0a7afaa4bccc6e854805
var async = require('async')
var request = require('request')
var urls = process.argv.slice(2)
console.log('urls', urls)
async.map(urls, get, function(err, results) {
if (err) return console.error(err)
You can’t perform that action at this time.