Skip to content

Instantly share code, notes, and snippets.

View mlagerberg's full-sized avatar

Mathijs "Mat" Lagerberg mlagerberg

View GitHub Profile
@mlagerberg
mlagerberg / Jenkinsfile
Last active July 4, 2018 14:39
[Common build.gradle stuff.] Adds Lint, Findbugs, Checkstyle and PMD, uses release config keys from global properties, adds debug icon overlay, etc. #android #gradle
node('android') {
stage('Checkout') {
checkout scm
}
stage('Build') {
try {
@mlagerberg
mlagerberg / rpi-install-lite.sh
Last active April 28, 2019 00:50
[rpi-install-lite] Installs common stuff on a fresh Raspbian installation, without user input #rpi
#!/bin/bash
############################################################################
#
# Installs and configures many things useful for a fresh Rasbian install.
# All things configured are described in this repo:
# https://github.com/mlagerberg/raspberry-pi-setup
# A more complete version of this script (that requires user input) can
# be found here: https://gist.github.com/mlagerberg/df0e433f984b4c3595f7
#
# Created by Mathijs Lagerberg, 2017
@mlagerberg
mlagerberg / adb.sh
Last active November 21, 2017 09:12
[ADB control script that simplifies working with multiple devices] #android #adb
#!/bin/bash
# Get list of only the device identifiers
# 1 list devices
# 2 grep away the line 'list of devices'
# 3 grep away newline at the end
# 4 cut off everything but the first part (identifier)
ALL=`adb devices -l`
#LIST=`adb devices | grep -v devices | grep device | cut -f1`
LIST=`echo "$ALL" | grep -v devices | grep device | awk '{print $1}'`
@mlagerberg
mlagerberg / record.py
Created August 30, 2022 11:57
Android ADB Record touch events as a macro
#!/usr/bin/env python3
import subprocess
import sys
import time
#
# Usage:
# python record_taps.py /dev/input/event3 output_file.sh
# Find out your input event name by running:
# adb shell getevent -lp