Skip to content

Instantly share code, notes, and snippets.

Jake Wharton JakeWharton

Block or report user

Report or block JakeWharton

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
@JakeWharton
JakeWharton / 19.1.0_to_20.0.0.diff
Last active Aug 29, 2015
Public API changes between support-v4 19.1.0 to 20.0.0. Created with https://github.com/JakeWharton/jardiff
View 19.1.0_to_20.0.0.diff
diff -U 0 -N support-v4-19.1.0/android.support.v4.BuildConfig support-v4-20.0.0/android.support.v4.BuildConfig
--- support-v4-19.1.0/android.support.v4.BuildConfig 1969-12-31 16:00:00.000000000 -0800
+++ support-v4-20.0.0/android.support.v4.BuildConfig 2014-06-26 19:59:59.000000000 -0700
@@ -0,0 +1,9 @@
+public final class android.support.v4.BuildConfig {
+ public static final boolean DEBUG;
+ public static final java.lang.String PACKAGE_NAME;
+ public static final java.lang.String BUILD_TYPE;
+ public static final java.lang.String FLAVOR;
+ public static final int VERSION_CODE;
View keybase.md

Keybase proof

I hereby claim:

  • I am JakeWharton on github.
  • I am jakewharton (https://keybase.io/jakewharton) on keybase.
  • I have a public key whose fingerprint is 90EE 1978 7A7B CF6F D37A 1E91 80C0 8B1C 2910 0955

To claim this, I am signing this object:

@JakeWharton
JakeWharton / seven_seg.py
Created Apr 14, 2009
Python function to generate seven-segment number strings. Derived from Knio.
View seven_seg.py
def seven_seg(x):
'''
_ _ _ _ _ _ _ _
|_||_| ||_ |_ |_| _| _| || |
_||_| ||_| _| | _||_ ||_|
1111101101 = 1005
1101110001 = 881
1101111100 = 892
@JakeWharton
JakeWharton / gist:154713
Created Jul 25, 2009
Rudimentary implementation of pyy_tag/html_tag in C#
View gist:154713
using System;
using System.Text;
using System.Reflection;
namespace pyysharp
{
public abstract class HtmlTag
{
private static string TAB = " ";
@JakeWharton
JakeWharton / Impersonator.cs
Created Nov 5, 2009
Allows you to execute code under another user's privileges.
View Impersonator.cs
using System;
using System.Runtime.InteropServices;
using System.Security.Principal;
namespace JakeWharton
{
public class Impersonator : IDisposable
{
private WindowsImpersonationContext ImpersonatedUser = null;
private IntPtr UserHandle;
@JakeWharton
JakeWharton / hookpuller.py
Created Nov 7, 2009
Takes a GitHub service hook POST and automatically updates the associated repo.
View hookpuller.py
#!/usr/bin/env python
'''
Takes a GitHub service hook POST and automatically updates the associated repo.
'''
__license__ = '''
Copyright 2009 Jake Wharton
hookpuller is free software: you can redistribute it and/or modify
@JakeWharton
JakeWharton / post-receive
Created Apr 9, 2010
git post-receive hook for updating Trac 0.12
View post-receive
#!/usr/bin/python
import sys
import subprocess
GIT_PATH = '/usr/bin/git'
TRAC_ADMIN_PATH = '/usr/local/bin/trac-admin'
VALID_BRANCHES = ['master']
TRAC_ENV = '/path/to/trac'
View music-converter.pl
#!/usr/bin/perl -w
use strict;
use warnings;
use File::Basename;
use Getopt::Long;
#########################################################
# Flac to Mp3 Perl Converter - Terminal Edition
# Created by: Somnorific
# Based on: Scripts by Falkano and Nick Sklaventitis
@JakeWharton
JakeWharton / gist:506573
Created Aug 3, 2010
Disable any lazy loading of table properties by magical reflection voodoo
View gist:506573
namespace JakeWharton.Utilities
{
public static class DataContextExtensions
{
/// <summary>
/// Disable any lazy loading of table properties by magical reflection voodoo.
///
/// See: http://stackoverflow.com/questions/3388276/disable-all-lazy-loading-or-force-eager-loading-for-a-linq-context
/// And: http://stackoverflow.com/questions/3396426/iterating-tables-in-a-context-and-the-properties-of-those-tables
/// And: http://stackoverflow.com/questions/3397843/how-to-determine-lazy-loaded-properties-at-runtime-on-a-linq-table
View gist:545944
extended device statistics
device r/s w/s kr/s kw/s wait actv svc_t %w %b
cmdk0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
cmdk1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
cmdk2 3.0 0.0 96.0 0.0 0.0 0.0 0.2 0 0
sd1 3.0 0.0 96.0 0.0 0.0 0.0 0.3 0 0
sd2 3.0 0.0 96.0 0.0 0.0 0.0 0.7 0 0
sd3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd4 3.0 0.0 96.0 0.0 0.0 0.0 0.7 0 0
extended device statistics
You can’t perform that action at this time.