Skip to content

Instantly share code, notes, and snippets.

🏁
Victory lap

gregory tomlinson gtzilla

🏁
Victory lap
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
View BitsMetricViews.js
//
// BitsMetricViews.js
// bitly2
//
// Created by gregory tomlinson on 2011-05-12.
// Copyright 2011 the public domain. All rights reserved.
//
/*
Usage:
View rokuAttack.js
//
// rokuAttack.js
// 7codes
//
// Created by gregory tomlinson on 2011-05-08.
// Copyright 2011 the public domain. All rights reserved.
//
/*
Dependency
View CallerQueue.js
//
// CallerQueue.js
// 7codes
//
// Created by gregory tomlinson on 2011-05-10.
// Copyright 2011 the public domain. All rights reserved.
//
/*
Dependency, jQuery 1.5.2+
@gtzilla
gtzilla / install gist commandline
Created Apr 26, 2011
one liner for installing the gist commandline tool mac OSX
View install gist commandline
curl -s -L http://gt-co.de/hOaVwe > gist && chmod 755 gist && sudo mv gist /usr/local/bin/gist
View phantom_url_check.js
//
// phantom_test.js
// bit_spam
//
// Created by gregory tomlinson on 2011-04-23.
// Copyright 2011 the public domain. All rights reserved.
//
// requires phantomjs (sudo port -v install phantomjs)
// -- requires qt4-(os) aka qt4-mac
View js closure
(function(window) {
function super_private() {
console.log("only called from inside, aka private");
}
window.myPublicObj=function() {
super_private();
View php-serve.py
#!/usr/bin/env python
"""
Add php-serve.py to your PATH, then, from whatever directory is the root
of your PHP application, just run:
$ php-serve.py
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;
[].shift.apply(args);
return function() {
var _args = args;
[].push.apply(_args, arguments);
return func.apply(func, _args);
};
};
View obfuscate source
#!/bin/python
htmls=""
for letter in html:
formatted_letter="{0:{fill}{width}b}".format(ord(letter), width=7, fill="0")
htmls+=formatted_letter
return self.code_pattern % htmls.replace("0", " ").replace("1", "\t")
@gtzilla
gtzilla / Bash Profile venv delay load
Created Jan 31, 2011
Delay sourcing virtualenvwrapper.sh until first call to workon
View Bash Profile venv delay load
## delay sourcing venv to workon call
## replace "source /Library/Frameworks/Python.framework/Versions/2.6/bin/virtualenvwrapper.sh"
## with below block
function load_env {
if [ type -p workon &> /dev/null ]; then
# nothing, source is loaded
workon "$@"
else
unalias workon
source /Library/Frameworks/Python.framework/Versions/2.6/bin/virtualenvwrapper.sh
You can’t perform that action at this time.