From 95a25da0f1cedbaca5bbdf9f62b36cc9e534560f Mon Sep 17 00:00:00 2001 From: Gregor Feierabend <23300469@sun.ac.za> Date: Thu, 17 Jun 2021 01:00:47 +0200 Subject: [PATCH] config update --- .scripts/adbreconnect.sh | 1 + .scripts/emulator.sh | 4 ++++ .scripts/emulator_snap.sh | 4 ++++ .scripts/headless.sh | 4 +++- .scripts/uncolor.pl | 11 +++++++++++ .scripts/unctex.pl | 13 +++++++++++++ 6 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 .scripts/adbreconnect.sh create mode 100755 .scripts/emulator.sh create mode 100755 .scripts/emulator_snap.sh create mode 100755 .scripts/uncolor.pl create mode 100755 .scripts/unctex.pl 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}";