Skip to content

Instantly share code, notes, and snippets.

View davidguttman's full-sized avatar

David Guttman davidguttman

View GitHub Profile

rage-quit support for bash

HOW TO INSTALL

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

Copy fuck into ~/.bashrc.

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);
var test = require('tape');
test('setup', function (t) {
// ...
t.end();
});
// tests go here
test('teardown', function (t) {

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

var http = require('http');
var bl = require('bl');
var urls = [];
process.argv.slice(2).forEach(function(item){
urls.push(item)
});
console.log (urls)
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)
// index.js
'use strict';
var app = require('express')();
var jsonParser = require('body-parser').json({limit: '1mb'});
var db = require('./routes/db.js');
var doc = require('./routes/document.js');
app.put('/:db', jsonParser, db.createDB);
@davidguttman
davidguttman / s3.sh
Last active August 29, 2015 14:20 — forked from chrismdp/s3.sh
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@davidguttman
davidguttman / perlin-noise-classical.js
Created November 9, 2011 15:37 — forked from banksean/perlin-noise-classical.js
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/

It's our birthday!

This month's JSLA will be at the Google office in Venice, Thursday March 28th @ 7pm. There will be talks on procedural sketching with Paper.js, Browserify v2 from @substack himself, and a short JavaScript Made Simple talk on arrays. Don't forget to RSVP, Google won't let you in if you're not on the list.

RSVP: http://js.la

M-Go

Our sponsor this month is M-go. They are hiring...