Skip to content

Instantly share code, notes, and snippets.

#put this into .bash_profile and then use command adb-screenshot to take an android screenshot
#change "Screenshots" below to your target path
function adb-screenshot() { adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Screenshots/screen$(date +"%s").png ;}
#for zsh
function adb-screenshot() {
adb shell screencap /sdcard/screen.png
adb pull /sdcard/screen.png ~/Screenshots/screen$(date +"%s").png;}
tgehrs /
Last active April 28, 2024 12:44 — forked from medmunds/
Django FirstWorkingEmailBackend uses ESP status APIs to find an "up" ESP for sending
# *Untested* implementation of a Django email backend that checks
# several ESP status APIs to see which are working, and uses the first
# available one to send.
# This caches the ESP API status check results for one hour (by default).
# You can subscribe to webhook notifications on the ESP status pages
# to force status re-checks after ESPs update their status pages.
# See for discussion.
tgehrs /
Last active June 20, 2016 14:04 — forked from FriendlyTester/
BASH script to record Android display and download/delete the video
function adb-screenrecord(){
#name the file
filename=screen_record_$(date +"%s").mp4
# start recording
adb shell screenrecord --bit-rate 6000000 /sdcard/$filename &
# Get its PID