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
  • 23:46 (UTC -07:00)
  • X @jasonwyatt
View GitHub Profile
def getAaptPath = { ->
def sdkDir = android.sdkDirectory
def buildToolsDir = new File(sdkDir, "build-tools")
def versions = buildToolsDir.list()
def latestBuildToolsDir = new File(buildToolsDir, versions[-1])
return "${new File(latestBuildToolsDir, "aapt").absoluteFile}"
}
@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" }
}
}
@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 / 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 / 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 / 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 / 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 / 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 / polylinefade.js
Created November 18, 2010 17:13
Fade out a google maps polyline.
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(),
dojo.require('dojo.window');
dojo.addOnLoad(function(){
var body = dojo.body(),
footerId = 'footer'; // change this to whatever your footer's id is.
function adjustFooter(){
dojo.create('div', {style: 'clear:both', id: 'adjustFooter'}, body);
var bodySize = dojo.marginBox(body),
windowSize = dojo.window.getBox(),
changes = { 'bottom': '0px', 'clear': '', 'position': 'absolute' };