Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Weiss keyboardsurfer

View GitHub Profile
@keyboardsurfer
keyboardsurfer / installFromBundle
Last active Aug 8, 2020
Build & extract a set of apk from an aab for a specific device and install the results on it.
View installFromBundle
#!/bin/sh
# Build & extract a set of apk from an aab for a specific device and install the results on it.
#
# This needs https://github.com/google/bundletool to be available as `bundletool`.
# Also **exactly** one device needs to be connected to adb.
# Usage: installFromBundle bundle.aab
# optional `--extract-apks` to keep the set on your workstation as well.
basename=${1%%.*}
keystore="~/.android/debug.keystore"
@keyboardsurfer
keyboardsurfer / apply_gitignore
Created Feb 2, 2015
applies changes to a .gitignore file to a repository
View apply_gitignore
git rm -r --cached && git add .
@keyboardsurfer
keyboardsurfer / studio64.vmoptions
Created Jan 26, 2015
My vmoptions for android studio
View studio64.vmoptions
-Xms1G
-Xmx8G
-XX:MaxPermSize=4G
-XX:ReservedCodeCacheSize=512m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djna.nosys=true
-Djna.boot.library.path=
@keyboardsurfer
keyboardsurfer / gw
Last active Mar 16, 2020
function to use gradle wrapper if it exists, else gradle
View gw
# Simply add this to your .bashrc, .zshrc or .whateverrc and re-source it.
# Afterwards you can use `gw` to invoke your local gradle wrapper if it exists.
function gw {
if [ -x "gradlew" ]; then
./gradlew $@
else
gradle $@
fi
}
@keyboardsurfer
keyboardsurfer / flavor_names_build.gradle
Last active Mar 1, 2019
Version names for application variants
View flavor_names_build.gradle
android {
applicationVariants.all { variant ->
def flavor = variant.mergedFlavor
def name = flavor.getVersionName()
def versionName = name + '-' + variant.properties.get('flavorName')
if (variant.buildType.isDebuggable()) {
versionName += '-debug';
}
flavor.versionName = versionName;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am keyboardsurfer on github.
  • I am keyboardsurfer (https://keybase.io/keyboardsurfer) on keybase.
  • I have a public key whose fingerprint is 815B F952 DCFC C8F8 59C2 E6C1 8424 F9C1 E763 A74C

To claim this, I am signing this object:

@keyboardsurfer
keyboardsurfer / build.gradle
Created Nov 18, 2013
SmartExtensionsAPI v2.1
View build.gradle
apply plugin: "android-library"
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5+'
@keyboardsurfer
keyboardsurfer / build.gradle
Created Nov 18, 2013
SmartExtensionUtil v2.1
View build.gradle
apply plugin: "android-library"
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5+'
@keyboardsurfer
keyboardsurfer / pom.xml
Created Nov 18, 2013
SmartExtensionUtil v2.1
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sonyericsson.extras.liveware.extension.util</groupId>
<artifactId>util</artifactId>
<version>2.1</version>
<packaging>apklib</packaging>
<name>SmartExtensionUtil</name>
@keyboardsurfer
keyboardsurfer / pom.xml
Created Nov 18, 2013
SmartExtensionsAPI v2.1
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>SmartExtensionAPI</name>
<groupId>com.sonyericsson.extras.liveware.aef</groupId>
<artifactId>api</artifactId>
<version>2.1</version>
<packaging>jar</packaging>
You can’t perform that action at this time.