Skip to content

Instantly share code, notes, and snippets.

View mjarkk's full-sized avatar
🗿

Mark Kopenga mjarkk

🗿
View GitHub Profile
@mjarkk
mjarkk / s9_adb_change_resolution.sh
Created November 11, 2022 21:17
Change the screen resolution of the samsung galaxy s9 using adb
adb shell
# Most battery efficent
wm size 720x1480
wm density 280
# Original
wm size 1440x2960
wm density 560
<?php
function max_mem_usage()
{
$bytes = memory_get_peak_usage();
$units = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB');
$mod = 1024;
$power = $bytes > 0 ? floor(log($bytes, $mod)) : 0;
return sprintf('%01.2f %s', $bytes / pow($mod, $power), $units[$power]);
}
func main() {
os.Remove("prompt.txt")
promptFile, err := os.Create("prompt.txt")
if err != nil {
log.WithError(err).Fatal("Error creating prompt.txt")
}
defer promptFile.Close()
err = filepath.WalkDir("go-backend", func(path string, d fs.DirEntry, err error) error {
if !strings.HasSuffix(path, ".go") {