Skip to content

Instantly share code, notes, and snippets.

View jed's full-sized avatar

Jed Schmidt jed

View GitHub Profile
@jed
jed / jsconf_does_disney.md
Created October 6, 2012 08:22
2012 JavaScript Roundup, Disney-style @ JSCONF EU 4ß

Objective-C (to the tune of Under the Sea)

If you're shipping iOS apps,

and dream of the bucks you'll make,

you might think of "going native",

but Xcode's a big headache.

@jed
jed / ec2-nodejs.sh
Created August 27, 2012 06:06
installing node on a new ec2 instance (amazon AMI)
sudo yum update
sudo yum install -y gcc-c++.x86_64
sudo yum install -y openssl-devel.x86_64
sudo yum install -y make.x86_64
sudo yum install -y git
git clone git://github.com/joyent/node.git
cd node
@jed
jed / adler32.js
Created July 21, 2012 05:03
non-obfuscated adler32
function adler32(string) {
var length = string.length
, modulus = 65521
, index = 0
, a = 1
, b = 0
while (index < length) {
a += string.charCodeAt(index++)
a %= modulus
@jed
jed / .gitignore
Created July 3, 2012 09:52
browserify-alias-test
node_modules
lib.js
@jed
jed / balcony.txt
Created June 8, 2012 15:11
project balcony
layout
======
XX: whole tile
xx: cut tile (20cm)
2cm deep gutter
---------------------------------+
xx xx xx xx xx xx xx xx xx xx xx |
[] XX XX XX [] XX XX XX XX [] XX |
@jed
jed / request.js
Created April 23, 2012 03:25
prototype plugin pattern idea to make middleware less magical
function Request(req, res) {
this.upstream = request
this.downstream = response
}
Request.prototype = {
start: function() {
// kick off the default chain of handlers
},
@jed
jed / lyrics.txt
Created April 15, 2012 06:57
baumkuchen by ohashi trio
回り出す木馬に おどけたふりして
小さな靴を鳴らして はしゃぐ君を見てた
何気なく開けてみる 大きな扉は
古ぼけた僕の大事な おもちゃ箱みたいさ
odoridasu mokuba ni odoketa furishite
chiisana kutsu o narashite hashagu kimi o miteta
nanigenaku aketemiru ookina tobira wa
furuboketa boku no daijina omochabako mitai sa
@jed
jed / results.txt
Created February 17, 2012 06:12
brew install redis
$ brew install redis
==> Downloading http://redis.googlecode.com/files/redis-2.4.7.tar.gz
File already downloaded in /Users/Jed/Library/Caches/Homebrew
==> make -C src
MAKE hiredis
CC ae.o
clang: warning: argument unused during compilation: '-rdynamic'
clang: warning: argument unused during compilation: '-ggdb'
/usr/bin/clang -c -Os -w -pipe -march=native -arch x86_64 -g -ggdb net.c
clang: warning: argument unused during compilation: '-ggdb'
@jed
jed / api.js
Created February 13, 2012 14:32
using uglify to turn javascript functions into DynamoDB query language
// just a quick brainstorm for my dynamo API: https://github.com/jed/dynamo
// is it worth it to use uglify-js to parse functions into ASTs, to be transformed into dynamo's non-standard query language?
// the good:
// - no need to learn new API, just use javascript to query
// - API ends up resembling well-known .map and .filter style
// - would be entirely optional, compiling into specifiable query objects
// the bad:
@jed
jed / recursiveIIFE.coffee
Created December 19, 2011 06:19
recursive IIFEs
upperCase = (str, cb) ->
do fn = (err, str) ->
if err
cb err
else if typeof str is 'function'
str fn # fn is this function, as of 1.2.1-pre
else
str = String str