This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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;} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *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 https://github.com/anymail/django-anymail/issues/31 for discussion. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
PID=$! |