Jason Wyatt Feinstein jasonwyatt

View buttdialed-privacy.md

Privacy Policy

Butt Dialed, and its creator, will NOT transmit your contact information or call log anywhere. It's that simple.

View salted_passwords.py
1 2 3 4 5 6 7 8 9
import base64
import uuid
import hashlib
 
def hash_password(password, salt=None):
if salt is None:
salt = uuid.uuid4().hex
 
hashed_password = hashlib.sha512(password + salt).hexdigest()
View mongobackup.py
1 2 3 4 5 6 7 8 9
#!/usr/bin/env python
import os
import argparse
import logging
import datetime
import urlparse
import subprocess
 
logging.basicConfig(level=logging.INFO)
View bounceserver.js
1 2 3 4 5 6 7 8 9 10
/**
* bounceserver.js
* License: MIT (http://www.opensource.org/licenses/mit-license.php/)
* Author: Jason Feinstein (jason.feinstein@gmail.com)
*
* Instructions:
* 1. Install node.js: http://nodejs.org
* 2. run this file, listing the bounce addresses like so:
* node bounceserver.js http://mybounceaddress:1111/ http://google.com
* 3. Start sending requests to the server. They will be bounced properly!
View passwordgen.py
1 2 3 4 5 6 7 8 9
def random_string(n_chars):
'''Generates a random string of length n_chars.
 
>>> random_string(5)
'FM>ro'
>>> random_string(8)
'"K^V]J|/'
>>> random_string(32)
')tTu,2"s`ke`MF0}qWd.-&__C8OEksQy'
View googlemaps.js
1 2 3 4 5 6 7 8
(function(){
var callback = function(){},
callbackName = 'gmapscallback'+(new Date()).getTime();
window[callbackName] = callback;
define(['http://maps.googleapis.com/maps/api/js?sensor=true&callback=' + callbackName], function(){
return google.maps;
});
})();
View tl_trac_beautifier.user.js
1 2 3 4 5 6 7 8 9 10
// ==UserScript==
// @name TL Trac Beautifier
// @namespace https://dev.transloc.com
// @description Makes Trac look much better.
// @include https://dev.transloc.com/*
// ==/UserScript==
 
var $;
 
// Add jQuery
View debouncer.js
1 2 3 4 5 6 7 8 9
function debounce(fn, debounceDuration){
// summary:
// Returns a debounced function that will make sure the given
// function is not triggered too much.
// fn: Function
// Function to debounce.
// debounceDuration: Number
// OPTIONAL. The amount of time in milliseconds for which we
// will debounce the function. (defaults to 100ms)
View MySingleton.js
1 2 3 4 5 6 7 8 9 10
define(function(){
var instance = null;
 
function MySingleton(){
if(instance !== null){
throw new Error("Cannot instantiate more than one MySingleton, use MySingleton.getInstance()");
}
this.initialize();
}
View polylinefade.js
1 2 3 4 5 6 7 8 9 10
function fadeOut(line, keepAround, fadeDuration){
keepAround = keepAround || 1000;
fadeDuration = fadeDuration || 500;
 
setTimeout(function(){
var startingOpacity = line.strokeOpacity,
startTime = (new Date()).getTime();
function step(){
var currentTime = (new Date()).getTime(),
Something went wrong with that request. Please try again.