Skip to content

Instantly share code, notes, and snippets.

var db = window.indexedDB.open("/tdlib/dbfs", 21);
db.onsuccess = function(e) {
var db = e.target.result;
var databaseout = db.transaction(["FILE_DATA"]).objectStore("FILE_DATA").index('timestamp').getAll()
databaseout.onsuccess = function(e) {
databaseoutput = e.target.result}
};
@cpuuntery
cpuuntery / miniplayer.js
Created December 4, 2020 11:28
youtube fix
document.querySelector('ytd-player[context="WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_CHANNEL_TRAILER"]').remove()
.\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
find . -type f -iname "*.sh" -execdir sh generate.mp3.sh {} \;
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
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]
adb shell cmd appops set <package_name> NO_ISOLATED_STORAGE allow
adb shell cmd appops set your-package-name android:no_isolated_storage allow
dtoverlay=gpio-shutdown,gpio_pin=21
#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}
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)}