Skip to content

Instantly share code, notes, and snippets.

View austynmahoney's full-sized avatar

Austyn Mahoney austynmahoney

  • Blizzard Entertainment
  • Orange County, California
View GitHub Profile
@austynmahoney
austynmahoney / jenkins_auto_upgrade.sh
Created May 6, 2013 22:32
Jenkins upgrade script
#!/bin/bash
TOMCAT=/mnt/android/apache-tomcat-7.0.39
echo "Stopping Tomcat"
$TOMCAT/bin/catalina.sh stop
cd $TOMCAT/webapps
echo "Removing jenkins"
rm -rf jenkins
rm -rf jenkins.war
echo "Downloading latest Jenkins version"
public class RenderScriptUtil {
private static final float DEFAULT_BLUR_RADIUS = 25f;
private RenderScriptUtil() {
}
public static BitmapDrawable blurImage(Context context, int resource) {
return blurImage(context, resource, DEFAULT_BLUR_RADIUS);
}
@austynmahoney
austynmahoney / .travis.yml
Created May 1, 2014 19:49
Example Travis build script using their new Android build environment
language: android
jdk: oraclejdk7
env:
matrix:
- ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
android:
components:
- platform-tools
- build-tools-19.0.3
@austynmahoney
austynmahoney / CachedRefreshable.java
Last active September 26, 2016 15:15
RxJava Refreshable Pattern
public abstract class CachedRefreshable<P, T> extends Refreshable<P, T> {
protected abstract Observable<T> getSourceObservable(P parameters);
/**
* Return the Observable that gets data from a cached source.
*
* @return Observable from cache item, or null if the cache misses.
*/
protected abstract Observable<T> getCachedObservable(P parameters);
@austynmahoney
austynmahoney / apksigner.sh
Created July 27, 2018 04:02
Android APK Signer
# MIT License
#
# Copyright (c) 2018 Austyn Mahoney
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: