Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Michele Venturi dardo82

🏠
Working from home
View GitHub Profile
@dardo82
dardo82 / RTV38-dl.sh
Last active Mar 8, 2021
Save $1 secs of RTV38 stream
View RTV38-dl.sh
#! /bin/sh
# Saves a given number of seconds of the RTV38 live stream.
PLURL="http://streamcdng18-845d8509d2cb4f249dd0b2ae5755b6c2.msvdn.net/live/S12268608/CXHH7K39hg9K/playlist.m3u8"
DATE="$(date +%F)"; timeout -15 $1 youtube-dl -o $DATE $PLURL; mv -v $DATE.{part,mp4}
View UnTwitch-dl.sh
#!/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 Dec 7, 2020
Import Chrome History
View ich.applescript
#!/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 Mar 12, 2021
MPV configuration
View config
[default]
pause
keep-open
fullscreen
geometry=0:0
hwdec=vaapi
framedrop=vo
@dardo82
dardo82 / 9d-cf.py
Last active Mar 17, 2021
WebDriver DiceBot BitCoin
View 9d-cf.py
#!/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
View InfoJobs.applescript
#!/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 Aug 18, 2020
Kalee Carroll DLer
View kc-dl.py
#!/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 Dec 18, 2019
audioDB & fftExtract
View audioDB.sh
#!/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 Nov 28, 2019
YouTube renamer
View yt-rename.sh
#!/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 Dec 2, 2019
InstaGram DLer
View ig-dl.sh
#!/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 @