Skip to content

Instantly share code, notes, and snippets.

Avram Lyon avram

Block or report user

Report or block avram

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
@stevenringo
stevenringo / reinvent-2017-youtube.md
Created Dec 3, 2017
Links to YouTube recordings of AWS re:Invent 2017 sessions
View reinvent-2017-youtube.md

| Title | Description

@JakeWharton
JakeWharton / dex.sh
Last active Dec 1, 2018
`classes.dex` method count helpers. Requires smali/baksmali from https://code.google.com/p/smali/ and dexdump from the build-tools in the Android SDK be on your PATH.
View dex.sh
function dex-method-count() {
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
}
function dex-method-count-by-package() {
dir=$(mktemp -d -t dex)
baksmali $1 -o $dir
for pkg in `find $dir/* -type d`; do
smali $pkg -o $pkg/classes.dex
count=$(dex-method-count $pkg/classes.dex)
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.')
View tomcat deploy build.gradle
apply plugin: 'java'
apply plugin : 'war'
group = 'com.cadrlife'
version = '1.0.0'
buildscript {
repositories {
mavenCentral()
}
@JakeWharton
JakeWharton / OkHttpStack.java
Created May 21, 2013
A `HttpStack` implementation for Volley that uses OkHttp as its transport.
View OkHttpStack.java
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
* uses OkHttp as its transport.
*/
@ryantenney
ryantenney / xkcd-calendar.hs
Created May 28, 2012 — forked from clockfort/xkcd-calendar.hs
xkcd calendar calculator
View xkcd-calendar.hs
import Data.Numbers.Primes
second = 1
minute = 60*second
hour = 60*minute
day = 1444*minute
month = 30*day
year = 12*month
daysPerXKCDYear = 30*12
You can’t perform that action at this time.