Skip to content

Instantly share code, notes, and snippets.

View shanewholloway's full-sized avatar
🗜️
I may be slow to respond.

Shane Holloway shanewholloway

🗜️
I may be slow to respond.
View GitHub Profile
@shanewholloway
shanewholloway / objFromForm.js
Created December 11, 2012 22:12
objFromForm.js is a small set of javascript to populate and restore a form to Javascript objects — and therefore JSON.
// [© 2012 Bellite.io](http://bellite.io)
// Open Source as [CC BY-SA 3.0](http://creativecommons.org/licenses/by-sa/3.0/)
// vim: sw=2 ts=2 expandtab
(function(exports) {
"use strict";
function objFromForm(form, dispatch) {
if (!form || form.nodeName!="FORM") return;
dispatch = dispatch || objFromForm.dispatch
var res={}, elem, fn
@shanewholloway
shanewholloway / microweb.js
Created December 11, 2012 22:11
microweb.js creates very basic structure for implementing a tiny NodeJS server
// [© 2012 Bellite.io](http://bellite.io)
// Open Source as [CC BY-SA 3.0](http://creativecommons.org/licenses/by-sa/3.0/)
// vim: sw=2 ts=2 expandtab
"use strict";
var
path = require('path'), fs = require('fs'),
http = require('http'), url = require('url'),
querystring = require('querystring')
exports.createMicroWebServer = createMicroWebServer;
@shanewholloway
shanewholloway / gist:3536969
Created August 30, 2012 18:35
Convert Billings.app exported slip ".bex" file into Freckle-style CSV
import csv
import glob
import plistlib
clientProject = 'My Project'
for filename in glob.glob("*.bex"):
root = plistlib.readPlist(filename)
with open(filename+'.csv', 'wb') as out:
out = csv.writer(out)
out.writerow(['Date', 'Person', 'Client/Project', 'Minutes', 'Tags', 'Description', 'Billable', 'Invoiced', 'Invoice Reference'])
.boxy {
margin: 15px;
outline: 1px dashed red;
width: 200px;
height: 150px;
border: 1px solid white;
padding: 10px;
position: relative;
}
.boxy>div {