Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am wmbest2 on github.
  • I am wmbest2 (https://keybase.io/wmbest2) on keybase.
  • I have a public key ASC4OJiOEDEqF34Y2pK4S39PjpbjlA7SCUAaQEzFXmqYego

To claim this, I am signing this object:

@wmbest2
wmbest2 / backup_appdata
Created October 25, 2013 02:00
shell script for app backup
View backup_appdata
#!/bin/bash
adb backup -f /tmp/data.ab -noapk $1
dd if=/tmp/data.ab bs=1 skip=24 | /usr/local/Cellar/openssl/1.0.1e/bin/openssl zlib -d | tar -xvf -
rm /tmp/data.ab
@wmbest2
wmbest2 / example.html
Last active December 17, 2015 07:28
ctrl-click directive
View example.html
<span ctrl-click="someFuncInMyController()">Hello World</span>
@wmbest2
wmbest2 / test-runner
Created March 23, 2012 15:48
Python script to generate test commands
View test-runner
#! /usr/bin/python
import curses
import sys
import os
runners = ["android.test.InstrumenationTestRunner"
, "pl.polidea.instrumentation.PolideaInstrumentationTestRunner"]
create = ["Add class", "Run Tests"]
@wmbest2
wmbest2 / change.sh
Created February 9, 2012 14:56
Command line to bulk change a Package Name
View change.sh
find . -name "*.java" | xargs perl -pi -e "s/com.vokal.XXX/com.vokal.YYY/g"
@wmbest2
wmbest2 / adb_install.sh
Created August 17, 2011 19:28 — forked from scottferg/adb_install.sh
Small shell script to easily deploy an Android debug build to all connected devices using adb
View adb_install.sh
#!/bin/bash
file="bin/*-debug.apk"
uninstall=0
while getopts "ruf:" opt; do
case $opt in
r)
file="bin/*-release.apk"
;;
u)
uninstall=1
View CustomerListTest.java
package com.vokal.petcheck.test;
import android.app.Activity;
import android.app.Instrumentation;
import android.content.Intent;
import android.content.IntentFilter;
import android.test.ActivityInstrumentationTestCase2;
import android.test.TouchUtils;
import android.util.Log;
import android.view.KeyEvent;
@wmbest2
wmbest2 / LoginActivity.java
Created March 17, 2011 18:35
LoginActivity with persistant AsyncTasks
View LoginActivity.java
package com.vokal.petcheck;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wmbest.countdown"
android:versionCode="1"
android:versionName="1.0">
<application android:label="TEST WIDGET" android:icon="@drawable/icon">
<receiver android:name="CountdownWidget"
android:label="Jill's Widget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
View ManhuntNearbyGuys.java
if(manhuntInputValidation.isProviderAvailable() && Code.LONGITUDE!=0.0 && Code.LATITUDE!=0.0){
mHashMap.put(TAG_GETGPSMEN_LON,""+Code.LONGITUDE );
mHashMap.put(TAG_GETGPSMEN_LAT, ""+Code.LATITUDE);
}
else
{
Toast.makeText(ManhuntNearbyGuys.this,"Your location cannot be located!", Toast.LENGTH_SHORT).show();
}
manhuntHttpBinder = new ManhuntHttpBinder(mHashMap,Code._GETGPSMEN,ManhuntNearbyGuys.this,manhuntInputValidation);