Skip to content

Instantly share code, notes, and snippets.

View luisadha's full-sized avatar
🇵🇸
Free Palestine

Luis Adha luisadha

🇵🇸
Free Palestine
View GitHub Profile
#!/bin/bash
echo "# begin build properties"
echo "# autogenerated by buildinfo.sh"
echo "ro.build.id=$BUILD_ID"
echo "ro.build.display.id=$BUILD_DISPLAY_ID"
echo "ro.build.version.incremental=$BUILD_NUMBER"
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
echo "ro.build.version.preview_sdk_fingerprint=$PLATFORM_PREVIEW_SDK_FINGERPRINT"
@luisadha
luisadha / playx.sh
Last active February 2, 2023 11:27
#
#!/bin/bash
# Usage : cd /some/dir/containing/mediafiles
# bash playx
# Dec: playing random media files on working directory
# dependencies :
# - memerlukan mpv untuk membuat subproses agar berjalan mengikuti proses java dan mengumpulkan informasi file yang diperlukan
# - bc package untuk menghitung agar subproses berjalan dengan baik
#!/bin/bash
OUTFD='/sdcard/Download/dircontent_sdcard.txt'
export OUTFD
cd /sdcard
clear
ls -ap --color | grep '/' > $OUTFD
@luisadha
luisadha / cleanup_termux-downloads.sh
Last active January 8, 2023 17:21
When this file is touched a popup will appear "Open file with" select Termux. then if it says Save file in ~/download/, then touch Open Directory
echo "Clean up the file termux downloaded?"
echo $(pwd)
read REPLY
rm -rf $(pwd)/*
local CHECK_GPU=$(su -c dumpsys SurfaceFlinger | awk '/GLES: / { print $3 $4}' )
CHECK_GPU=${CHECK_GPU-'FAIL'}
local CHECK_CPU=$(if [ "$(getprop|grep ro.product.board)" != "$(cat /proc/cpuinfo|grep Hardware)" ]; then echo $(getprop ro.product.board); else echo $(cat /proc/cpuinfo|grep Hardware); fi)
local CHECK_MEM=$(echo "$(free -m | xargs | awk '{print "" $17 "/" $8 " MB"}') ")
echo ""
echo -e "${G} %=,_ _,=%${D}"
echo -e "${G} ,\*?&&&&&&&&&&?*/, \tTERM: $TERM"
echo -e "${G} &&&&&${R}*${G}&&&&&&&${R}*${G}&&&& ${D}\tSHELL: $SHELL"
echo -e "${G} &&&&&&&&&&&&&&&&&&&&${D} \tCPU: $CHECK_CPU "
echo -e "${G} &&&&&&&&&&&&&&&&&&&&${D} \tGPU: $CHECK_GPU "
@luisadha
luisadha / gist:eeac5834894bab60a1288089188c87ba
Created December 6, 2022 15:40
Memeriksa perangkat apakah mendukung a/b pertisi
getprop ro.build.ab_update
@luisadha
luisadha / ranpper.sh
Created November 14, 2022 00:01
Install wallpaper randomly in the selected directory
#!/system/bin/sh
# date Thu May 9 19:00:28 WIB 2019
# Script untuk secara acak memilih gambar lalu mengaturnya menjadi wallpaper dari file dalam directory
# (28.05.2019)Teu
# Honeycoffe
# Requipment
# - Directory Containing Pictures
# - Busybox installed in your device
@luisadha
luisadha / inpreference.rc
Last active November 10, 2022 23:50
Used to capture Terminal Emulator settings via initial command, type 'source inpreference.rc'
# Copy pasta ke initial langsung
: ' exit
echo -e "
| Command line: $0
| Terminal type: ${TERM}
| HOME folder: ${HOME}
| Initial command:
0\texit"; history
'
@luisadha
luisadha / dialog_progressbar.sh
Created November 9, 2022 15:32
rebuild script dialog_progressbar.sh from internet source
#!/bin/bash
# heavily inspired by http://fitnr.com/showing-file-download-progress-using-wget.html
URL=$1
wget --progress=dot "$URL" 2>&1 |\
grep "%" |\
sed -u -e "s,\.,,g" | awk '{print $2}' | sed -u -e "s,\%,,g" | dialog --gauge "Download $(basename $URL) " 10 100
@luisadha
luisadha / ft.sh
Created November 2, 2022 16:21
ft command for force output always true (0).
#!/system/bin/sh
#
# FT stands for (force true) to use Disableprecmd in prompt
# MIT License, Copyleft (c) 2021 Luis Adha.
# This is asset of kalip.sh
# Usage: ft [command]
# or: ft ./file