Skip to content

Instantly share code, notes, and snippets.

View dardo82's full-sized avatar
🏠
Working from home

Michele Venturi dardo82

🏠
Working from home
View GitHub Profile
@dardo82
dardo82 / UnTwitch-dl.sh
Created December 27, 2020 12:53
UnTwitch DLer
#!/bin/sh
CHANNEL="$1"
PHPSESSID="$(curl -s -I "https://untwitch.com/" \
| gawk -F '=|;' '/PHPSESSID/{print $2}')"
VIDEOID="$(curl -s "https://twitchrss.appspot.com/vod/$CHANNEL" \
| gawk -v RS='<|>' -v FS='/' '/\/videos\//{print $5; exit}')"
URL="twitch.tv%2Fvideos%2F$VIDEOID&format=Audio_Only&from=1&to=150"
curl -L "https://untwitch.com/" -d "url=$URL" -H "Cookie: PHPSESSID=$PHPSESSID" -o "$VIDEOID.mp4"
@dardo82
dardo82 / ich.applescript
Created December 7, 2020 03:38
Import Chrome History
#!/usr/bin/env osascript
# Import Chrome History
tell application "Safari" to activate
tell application "System Events"
keystroke "i" using {option down, command down}
key code {49, 48, 48, 49}
keystroke return
end tell
@dardo82
dardo82 / config
Last active April 24, 2022 22:26
MPV configuration
[default]
pause
keep-open
fullscreen
geometry=0:0
hwdec=vaapi
framedrop=vo
@dardo82
dardo82 / 9d-cf.py
Last active March 17, 2021 16:38
WebDriver DiceBot BitCoin
#!/usr/bin/env python
# 999dice.com claim faucet
import sys
import time
from selenium import webdriver as WD
from selenium.webdriver.common.by import By
@dardo82
dardo82 / InfoJobs.applescript
Last active December 7, 2020 04:14
Apply to InfoJobs
#!/usr/bin/env osascript
# Apply to InfoJobs offers.
tell application "Google Chrome" to ¬
tell front window's active tab to ¬
execute javascript ¬
"document.getElementById" & ¬
"('botonEnviar').click();"
@dardo82
dardo82 / kc-dl.py
Last active August 18, 2020 11:59
Kalee Carroll DLer
#!/usr/bin/env python
import sys
from selenium import webdriver as WD
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as WDW
from selenium.webdriver.support import expected_conditions as EC
CO = WD.ChromeOptions()
CO.binary_location = sys.argv[2]
@dardo82
dardo82 / audioDB.sh
Last active December 18, 2019 16:34
audioDB & fftExtract
#!/bin/zsh
SHOW=$1
ADB="$1.adb"
audioDB -d "${ADB}" -N
audioDB -d "${ADB}" -L
audioDB -d "${ADB}" -P
audioDB -d "${ADB}" -S
@dardo82
dardo82 / yt-rename.sh
Created November 28, 2019 02:54
YouTube renamer
#!/bin/sh
# Change video-files names from YTID-based to date-based ones.
for MP4 in ???????????@[0-9].mp4;do
ULDATE=$(youtube-dl -j ${MP4/@*} | awk -F\" '{print $28}')
AIRDATE=$(faketime $ULDATE date -v-mon +%F)
mv -v $MP4 ${AIRDATE}_${MP4/*@}
done
@dardo82
dardo82 / ig-dl.sh
Last active December 2, 2019 17:03
InstaGram DLer
#!/bin/sh
# Download all the photos of an instagram user, even if he/she has blocked you.
open "http://www.picbear.com/$1/";JS="document.body.innerHTML"
SCPT="'tell application \"Safari\" to do JavaScript \"$JS\" in front document'"
echo "Scroll to the bottom of the page and press Return.";read
eval osascript -e $SCPT|awk -v RS=\" '/_n.jpg$/{print $1}'|xargs -I @ curl -O @
@dardo82
dardo82 / auto-video-edit.sh
Last active September 16, 2022 01:53
Auto Video Edit
#!/bin/sh
SD="Foto/Persone/VIP/TeleVisione/RTV38/Carlotta_Comparini"
GDD="/Volumes/Misc Stuff/Google Drive/$USER/MultiMedia/Immagini"
ID=$(youtube-dl --get-id ytsearch:tadà_$(date -v-mon -v-0w +%d/%m))
VURL=$(curl -s "$(youtube-dl -g -f 135 youtu.be/$ID)" | gawk -v RS='<|>' '/"135"/{while($0!~/\/\//)getline; print}')
AURL=$(curl -s "$(youtube-dl -g -f 140 youtu.be/$ID)" | gawk -v RS='<|>' '/"140"/{while($0!~/\/\//)getline; print}')
cd $HOME/Pictures/$SD; youtube-dl --id --skip-download --write-auto-sub --sub-format=ttml --sub-lang=it youtu.be/$ID