Skip to content

Instantly share code, notes, and snippets.

View rafaelje's full-sized avatar
:octocat:
on fire!

Rafa H. rafaelje

:octocat:
on fire!
View GitHub Profile
@rafaelje
rafaelje / take.sh
Last active February 5, 2020 03:45
This script is for taking a screen shot of an Android device.
#! /bin/bash
## This script is for taking a screen shot of an Android device. MACOS - Linux
##
## Note the script generates screenshot_yyyyMMddHHmmss.png and screenshot_yyyyMMddHHmmss_s.png
## under /sdcard on the device and copies it to the current working directory.
## IMPORTANT RUN this command chmod 755 take.sh
##
file=screenshot_$(date "+%Y%m%d%H%M%S").png
@rafaelje
rafaelje / runMultipleInstrumentedTest.sh
Created July 15, 2018 22:31
Run an instrumented test many times on Android
# from this link https://medium.com/@jim.zack.hu/repeating-espresso-tests-efficiently-83965c509dfd
for i in {1..100}
do
echo Test Number $i
adb shell am instrument -w -e class org.flyve.inventory.agent.Someclass org.flyve.inventory.agent.test/android.support.test.runner.AndroidJUnitRunner
done
@rafaelje
rafaelje / Android Snack
Created July 26, 2017 19:21
Snack on android
private void snack(View view, Context context, String message, String action) {
Snackbar.make(view, message, Snackbar.LENGTH_LONG)
.setActionTextColor(context.getResources().getColor(R.color.snackbar_action))
.show();
}
private void snack(View view, Context context, String message, String action, View.OnClickListener callback) {
Snackbar.make(view, message, Snackbar.LENGTH_LONG)
.setActionTextColor(context.getResources().getColor(R.color.snackbar_action))
.setAction(action, callback)

Keybase proof

I hereby claim:

  • I am rafaelje on github.
  • I am rafaelje (https://keybase.io/rafaelje) on keybase.
  • I have a public key whose fingerprint is 7F60 FE0F EF62 A6DC 82D2 53FE 3EB7 D1BB 5AC0 DBE8

To claim this, I am signing this object: