Skip to content

Instantly share code, notes, and snippets.


gregory tomlinson gtzilla

Block or report user

Report or block gtzilla

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
gtzilla / Vagrantfile
Created Oct 15, 2019 — forked from gabrielelana/Vagrantfile
How to create a VirtualBox machine with encrypted storage with Vagrant
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
PASSWORD_PATH = ".password"
PASSWORD_ID_PATH = ".password_id"
# Make sure to have installed vagrant-triggers plugin
# > vagrant plugin install vagrant-triggers
# After the first `vagrant up` stop the VM and execute the following steps
View Contract Killer

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

gtzilla / arity_check.js
Created Sep 28, 2011 — forked from j2labs/arity_check.js
Node.js friendly form of the arity checking decorator for javascript
View arity_check.js
exports.arity_decorator = function(fun) {
function wrapped() {
if(arguments.length != fun.length)
throw new Error("Y U NO USE RIGHT?!")
fun.apply(this, arguments)
return wrapped;
View gist:1247115
> function foo(x,y) {
if(arguments.length > 2) throw new Error("Stupid no method overloading lameness error");
... args =, ",");
... console.log('X:' + x + ' Y:' + y + ' Args:' + args)
... }
> foo(1,2)
X:1 Y:2 Args:1,2
> foo(1,2,3,4,5)
X:1 Y:2 Args:1,2,3,4,5
#!/usr/bin/env python
Add to your PATH, then, from whatever directory is the root
of your PHP application, just run:
You can optionally specify a port number as an argument. By default,
port 8000 is used:
View functools.js
var partial = exports.partial = function partial(fn) {
var args = arguments,
func = fn;
return function() {
var _args = args;
[].push.apply(_args, arguments);
return func.apply(func, _args);
#!/usr/bin/env python
### Requires latest boto (cuz I checked in code to boto a moment ago)
import uuid
from boto.mturk.connection import MTurkConnection
from boto.mturk.question import Question, QuestionForm, QuestionContent
from boto.mturk.question import AnswerSpecification, FreeTextAnswer
from boto.mturk.question import Overview
#from boto.mturk.qualification import Qualifications # these exist!
import pylibmc
import Queue
import logging
import functools
This is a transparent pool library that wraps a pylibmc client
from MemcachePool import mc
View Auto Refresh CSS Bookmarklet
You can’t perform that action at this time.