Skip to content

Instantly share code, notes, and snippets.

To get the desired element from XPath you need
1- the element before the desired element
2- the element after the desired element
3- element attributes
## Any attributes will suffice. I mean any attributes, Not only the very popular ones like [id,class,herf]
## For example
## data-tags attribute from safebooru will work
## You don't need to specify the exact value. You just need to specify part of the value, as long full element attribute contain a part of what you did specify
# this the first option. if it didn't work. go to option 2
adb shell cmd overlay disable com.android.internal.systemui.navbar.gestural
adb shell cmd overlay enable com.android.internal.systemui.navbar.threebutton
# install any a launcher you like before option 2
let download_all_req = document.querySelectorAll("i[title='Download Rule']")
for ( let i=0; i<download_all_req.length; i++)
{setTimeout(function(){download_all_req[i].click()}, i * 500)}
#fast
$newfile=""; for($i=1; $i -le 70; $i++) {$newfile += GC "$i.html"} $newfile | out-file "target.html"
#slow
for($i=1; $i -le 70; $i++){Get-Content "$i.html" >> joinedFile.html}
dtoverlay=gpio-shutdown,gpio_pin=21
adb shell cmd appops set <package_name> NO_ISOLATED_STORAGE allow
adb shell cmd appops set your-package-name android:no_isolated_storage allow
sudo apt install xserver-xorg-core xinit icewm
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d/
sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
#edit the autologin.conf as follows
[Service]
su -mm -c mount -t ext4 -o nosuid,nodev,noexec,noatime /dev/block/mmcblk1p1 /data/media/0/sdcard
restorecon -rv /data/media/0/sdcard
chown -R media_rw:media_rw /data/media/0/sdcard
chmod -R 775 /data/media/0/sdcard
su -mm -c mount -t sdcardfs -o nosuid,nodev,noexec,noatime,mask=7,gid=9997 /data/media/0/sdcard /mnt/runtime/write/emulated/0/sdcard
find . -type f -iname "*.sh" -execdir sh generate.mp3.sh {} \;
.\ffmpeg.exe -i [input file] -ss [start time] -to [end time] -c copy [output]
#This will detect the duration automatically for you. You just need to specify the start time. This is useful for removing the first 30 second for example. The filename is Regexed and the output is 1.ogg
Get-ChildItem | Where-Object {$_.Name -match “\[\d\d\].*ogg”} | ForEach-Object {.\ffmpeg.exe -i $_.Name -ss 0 -to ((.\ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $_.Name) -7) -c copy 1.ogg}
#The filename is Regexed and the output is 1.ogg. But you need to enter the end Time