Skip to content

Instantly share code, notes, and snippets.


Jim Montgomery jimmont

View GitHub Profile
eligrey / object-watch.js
Created Apr 30, 2010 polyfill in ES5
View object-watch.js
* polyfill
* 2012-04-03
* By Eli Grey,
* Public Domain.
FrankGrimm / nodepost-1.js
Created Nov 9, 2010
HTTP body in node.js
View nodepost-1.js
var http = require('http');
http.createServer(function (req, res) {
// set up some routes
switch(req.url) {
case '/':
console.log("[501] " + req.method + " to " + req.url);
res.writeHead(501, "Not implemented", {'Content-Type': 'text/html'});
res.end('<html><head><title>501 - Not implemented</title></head><body><h1>Not implemented!</h1></body></html>');
rpavlik / fix_homebrew.rb
Created Jan 6, 2011 — forked from mxcl/install_homebrew.markdown
Fix permissions on /usr/local for Homebrew
View fix_homebrew.rb
# This script fixes /usr/local only.
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
darktable / app.yaml
Created Mar 16, 2011
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
View app.yaml
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
clee / binary-plist.js
Created Jun 3, 2011
initial binary plist implementation in nodejs
View binary-plist.js
#!/usr/bin/env node
var fs = require('fs');
var sys = require('sys');
var bin = require('binary');
function bytesize(n) {
// JavaScript can't handle 64-bit ints natively.
// TODO: hack it up anyway.
// (n & 0xFFFFFFFF00000000) ? 8 : ...
nateps / gist:1172490
Created Aug 26, 2011
Hide the address bar in a fullscreen iPhone or Android web app
View gist:1172490
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
html, body {
margin: 0;
padding: 0;
Rnhatch / index.html
Last active Apr 12, 2017
D3 Blocks: Play with transitions and color scales of 1000 blocks.
View index.html
<!DOCTYPE html>
<!--<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />-->
<title>Tutorial: introduction to D3</title>
<script type="text/javascript" src="array.js"></script>
<script type="text/javascript" src="string.js"></script>
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
reid /
Created Dec 31, 2011
Garage door opener with Arduino

iPhone Garage Remote

Instead of buying two door remotes, I bought one and control it with my iPhone.


First, I stole nearly everything from Their version uses parts I could not find and requires a $6 iPhone app. Let's improve on that.

Almost everything can be found at RadioShack.

paulirish / rAF.js
Last active Jan 15, 2021
requestAnimationFrame polyfill
View rAF.js
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
joshbirk / samplerest.js
Created Feb 3, 2012
Sample of using passport w/ mult strategies
View samplerest.js
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
You can’t perform that action at this time.