Skip to content

Instantly share code, notes, and snippets.

View neuthral's full-sized avatar
🦌
bubbling

neuthral neuthral

🦌
bubbling
View GitHub Profile
@neuthral
neuthral / android_hacks.sh
Created March 14, 2026 14:29
[android hacks] running commands from an array in bash
#!/bin/bash
tabs=(
"adb shell settings put system rakuten_denwa 0"
"adb shell settings put system send_security_reports 0"
"adb shell settings put secure send_action_app_error 0"
"adb shell settings put global activity_starts_logging_enabled 0"
"adb shell cmd power set-fixed-performance-mode-enabled true"
"adb shell settings put global package_verifier_user_consent -1"
"adb shell settings put global sem_enhanced_cpu_responsiveness 1"

running ollama serve and running deepseek-r1 as the shell of a new user, now when we login as the user we get the ollama deepseek prompt

sudo chsh deep /home/deep/deepscript

deepscript

 #!/bin/bash
@neuthral
neuthral / clickmacro.sh
Last active March 24, 2025 14:37
click macro for cheating or saving your mouse buttons
#!/bin/bash
while true
do
NUMLOCK=$(numlockx status)
if [ "$NUMLOCK" == "Numlock is on" ]
then
xdotool click --delay $(( ( RANDOM % $1 ) + 1 )) 1 > /dev/null 2>&1
fi
done
@neuthral
neuthral / powertop-custom.md
Last active May 16, 2024 08:35
powertop custom startup service

on ubuntu 22.04 i need to have powertop run on startup as a service as powertop --auto-tune to set all devices on "good" power saving status but this also disables mouse and keyboard so its very annoying to have to wake up the device before using it again after 5 seconds

powertune.sh script sets all devices on powersave except usb

edit powertop.service to start yourt script in the correct location in ExecStart=(path to script) copy the service to: /etc/systemd/system/powertop.service

@neuthral
neuthral / json
Created February 23, 2024 15:26
phantomsandmonsters.com ublock filter to actually view the blog decently
! 2024-02-23 https://www.phantomsandmonsters.com
www.phantomsandmonsters.com##div.separator > span > .separator
www.phantomsandmonsters.com##div.separator > span > div > div
||www.phantomsandmonsters.com/ezoimgfmt/blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOOyxs-r7qPL9LPnK1BGUAtiwqBNFp0ZzT1-Kd76B8HM9KS2d6RBuWrXSK8lWAqtXZaJQeKsiLHBPftawQa8n-Wckei2SPKXkXwQrIH3OmQCMBjGbE1DKDZGIV1jrkRleQ_08xgjxWrVmULpB-KsQw7Xa1XBZVq2_TCKD9z6LUngglcAK/w320-h91/buymeacoffee.JPG?ezimgfmt=rs:336x107/rscb1/ng:webp/ngcb1$image
www.phantomsandmonsters.com##div .post-body > div > div.separator
www.phantomsandmonsters.com##div .post-body > div > div > div.separator
www.phantomsandmonsters.com##div .post-body > div > center > div.separator
www.phantomsandmonsters.com##div > center > center > center > center
www.phantomsandmonsters.com##div.separator > p
www.phantomsandmonsters.com##div .post-body > div > span > span > div
@neuthral
neuthral / img-encode.js
Created March 16, 2023 11:06
js encode image data to ascii and back to Uint8Array
const fs = require("fs");
let imageFile = fs.readFileSync('image.jpg', null).buffer
let imgArray = new Uint8Array(imageFile)
let text = ''
imgArray.forEach(n => {
text += String.fromCharCode(n + 256)
})
console.table(imgArray, text, '\n')
@neuthral
neuthral / transmission_add_trackers.sh
Created November 26, 2022 11:48
add list of trackers to transmission downloads
#!/bin/bash
# Get transmission credentials, if set
if [[ -n "$TRANSMISSION_USER" && -n "$TRANSMISSION_PASS" ]]; then
auth="${TRANSMISSION_USER:-user}:${TRANSMISSION_PASS:-password}"
else
auth=
fi
#https://gist.github.com/neuthral/3690548c19a7740a9620794bc4537568/raw/62791f6884897420c96c86c121529f1ef1671b84/alive_trackers_26_11_2022.txt
#https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt
@neuthral
neuthral / reduce.sh
Created November 23, 2022 03:00
count together numbers in a string until only one number from 1 - 9 remains [??vortex math??]
#!/bin/bash
STRING=$1
NUM=0
until [[ $STRING -lt 10 ]] do;
foreach n in $(echo $STRING | fold -w1); do
echo "$NUM + $n";
((NUM=NUM+n));
echo " = $NUM";
done;
@neuthral
neuthral / clean-sub.sh
Created October 9, 2022 21:52
clean youtube subtitle files and clean-up them for reading
echo $1
echo "Removing --> time stuff"
sed -i '/-->/d' $1
echo "Removing empty lines"
grep "\S" $1 > $1.txt
echo "wrap long lines to 96 characters"
fold -sw 96 $1.txt > $1.txt.fix
@neuthral
neuthral / youtube-get-sub.sh
Created October 8, 2022 09:02
youtube get video subtitles and cleant up the file for readability
youtube-get-subs() {
echo "getting filenames..."
filename=$(youtube-dl --simulate --get-title $1)-$(youtube-dl --simulate --get-id $1)
echo "Downloading video data"
youtube-dl --continue --write-auto-sub --sub-format vtt --sub-lang en --write-thumbnail --write-description --skip-download $1
echo $filename
echo "Removing --> time stuff"
sed -i '/-->/d' $filename.en.vtt
echo "Removing empty lines"
grep "\S" $filename.en.vtt > $filename.txt