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
@luisadha
luisadha / playmusicv1.0.sh
Created October 25, 2022 11:30
SCRIPT: Program Play simple music from your music player via terminal
#!/system/bin/sh
# Author: Luis Adha
# This code is released to the public domain.
# The author gave permission to use this code snippet in your script.
# Script name: playmusic.sh
# Version: v0.1
# Build date: Teu Dec 21 13:59:21 WIB 2021
GRAY='\e[1;30m'
@luisadha
luisadha / cu
Created October 23, 2022 08:31
Cu is a function referring to gnu coreutils for easier and more efficient use.
[ -z "$PS1" ] && return # bashcheck is only called via function
cu()
{
local program="$1"
local help="$*";
if [ -z "$program" ]; then echo "cu: Try \`cu --help' "; exit 1
elif [ "$program" == "--help" ]; then coreutils --help;
elif [ "$program" == "--version" ]; then coreutils --version;
else eval cmd=--coreutils-prog=$1; coreutils $cmd $help; fi
}
@luisadha
luisadha / hostnamchanger.sh
Last active October 23, 2022 08:24
For modify system hostname.
#!/system/bin/sh
# Author: luisadha
# Script to change system hostname, reboot to restore it.
# **Su binaries needed & busybox too**
local file="$0: $1: No such file or directory"
local usage="usage:\thostnamchanger FILE... "
[ $# -lt 1 ] && echo $usage && return 1
[ ! -f $1 ] && echo $file && return 1
local arg="$*";