diff --git a/.scripts/adbreconnect.sh b/.scripts/adbreconnect.sh new file mode 100755 index 0000000..83c2470 --- /dev/null +++ b/.scripts/adbreconnect.sh @@ -0,0 +1 @@ +adb root && adb shell svc data disable && adb shell svc data enable diff --git a/.scripts/emulator.sh b/.scripts/emulator.sh new file mode 100755 index 0000000..ab07f4a --- /dev/null +++ b/.scripts/emulator.sh @@ -0,0 +1,4 @@ +#!/bin/zsh +emulator -accel on -avd thePhone -gpu host -camera-back webcam1 -camera-front webcam1 -delay-adb -no-boot-anim -no-snapshot-load +#emulator -accel on -avd thePhone -gpu host -camera-back webcam1 -camera-front webcam1 -delay-adb -no-boot-anim -no-window +adb kill-server diff --git a/.scripts/emulator_snap.sh b/.scripts/emulator_snap.sh new file mode 100755 index 0000000..5ae98eb --- /dev/null +++ b/.scripts/emulator_snap.sh @@ -0,0 +1,4 @@ +#!/bin/zsh +emulator -accel on -avd thePhone -gpu host -camera-back webcam1 -camera-front webcam1 -delay-adb -no-boot-anim -no-window +adb kill-server + diff --git a/.scripts/headless.sh b/.scripts/headless.sh index 7aa959c..8bcdbe4 100755 --- a/.scripts/headless.sh +++ b/.scripts/headless.sh @@ -1,3 +1,5 @@ #!/bin/zsh -emulator -accel on -avd thePhone -gpu host -delay-adb -no-boot-anim -no-window -no-snapshot-load +#emulator -accel on -avd thePhone -gpu host -delay-adb -no-boot-anim -no-window -no-snapshot-load -detect-image-hang +emulator -accel on -avd thePhone -gpu host -delay-adb -no-boot-anim -no-window -detect-image-hang -use-system-libs -cores 4 +#emulator -accel on -avd thePhone -gpu host -delay-adb -no-boot-anim -no-window adb kill-server diff --git a/.scripts/uncolor.pl b/.scripts/uncolor.pl new file mode 100755 index 0000000..06342cd --- /dev/null +++ b/.scripts/uncolor.pl @@ -0,0 +1,11 @@ +#!/usr/bin/env perl +## https://stackoverflow.com/questions/17998978/removing-colors-from-output +## uncolor — remove terminal escape sequences such as color changes +while (<>) { + s/ \e[ #%()*+\-.\/]. | + \e\[ [ -?]* [@-~] | # CSI ... Cmd + \e\] .*? (?:\e\\|[\a\x9c]) | # OSC ... (ST|BEL) + \e[P^_] .*? (?:\e\\|\x9c) | # (DCS|PM|APC) ... ST + \e. //xg; + print; +} diff --git a/.scripts/unctex.pl b/.scripts/unctex.pl new file mode 100755 index 0000000..726a976 --- /dev/null +++ b/.scripts/unctex.pl @@ -0,0 +1,13 @@ +#!/usr/bin/env perl +## https://stackoverflow.com/questions/17998978/removing-colors-from-output +## uncolor — remove terminal escape sequences such as color changes +print "\\begin{minted}{bc}\n"; +while (<>) { + s/ \e[ #%()*+\-.\/]. | + \e\[ [ -?]* [@-~] | # CSI ... Cmd + \e\] .*? (?:\e\\|[\a\x9c]) | # OSC ... (ST|BEL) + \e[P^_] .*? (?:\e\\|\x9c) | # (DCS|PM|APC) ... ST + \e. //xg; + print; +} +print "\\end{minted}";