Skip to content

Instantly share code, notes, and snippets.

View jasonwyatt's full-sized avatar
:shipit:
Typing, probably

Jason Feinstein jasonwyatt

:shipit:
Typing, probably
  • Robinhood
  • Seattle, WA
  • 10:35 (UTC -07:00)
  • X @jasonwyatt
View GitHub Profile
@jasonwyatt
jasonwyatt / tl_trac_beautifier.user.js
Created November 28, 2011 16:58
TransLoc Trac Beautifier
// ==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
@jasonwyatt
jasonwyatt / googlemaps.js
Created February 21, 2012 16:55
Google Maps RequireJS Module
(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;
});
})();
@jasonwyatt
jasonwyatt / passwordgen.py
Created March 8, 2012 16:28
Random String Generator (Passwords)
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'
@jasonwyatt
jasonwyatt / bounceserver.js
Created July 11, 2012 02:58
Node.js server which will bounce requests to other servers.
/**
* 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!
@jasonwyatt
jasonwyatt / mongobackup.py
Created January 10, 2013 00:33
Python script to back up MongoDB databases given a MongoDB URL and output directory path. If no Mongo URL is given, it will default to checking for a MONGOLAB_URI config variable with `heroku config`.
#!/usr/bin/env python
import os
import argparse
import logging
import datetime
import urlparse
import subprocess
logging.basicConfig(level=logging.INFO)
@jasonwyatt
jasonwyatt / salted_passwords.py
Created January 10, 2013 01:30
Functions for hashing passwords, generating salts, and testing input passwords.
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()
@jasonwyatt
jasonwyatt / buttdialed-privacy.md
Created November 6, 2013 05:39
Butt Dialed Privacy Policy

Privacy Policy

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

@jasonwyatt
jasonwyatt / themes-debug.xml
Last active January 29, 2016 21:06 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
@jasonwyatt
jasonwyatt / build.gradle
Created May 14, 2017 16:32
Android DebugPort 2.0 App build.gradle
dependencies {
debugCompile 'com.github.jasonwyatt.Android-DebugPort:lib:2.0.0'
releaseCompile 'com.github.jasonwyatt.Android-DebugPort:lib-noop:2.0.0'
}
@jasonwyatt
jasonwyatt / build.gradle
Created May 14, 2017 16:33
Android DebugPort 2.0 root build.gradle
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}