Skip to content

Instantly share code, notes, and snippets.

@uahim
uahim / Convert_iframe_to_link.js
Last active March 16, 2016 18:40 — forked from ihsoy-s/Convert_iframe_to_link.js
[greasemonkey] Convert embedded YouTube and Vimeo to link
#!/usr/bin/env python3
import argparse
import codecs
import http.client
import http.server
import json
import re
import sys
import time
@uahim
uahim / ninite.js
Created June 1, 2016 17:38
adds some crucial functionality (buttons) to Ninite batch download page
// ==UserScript==
// @name Ninite download helper
// @author mihau
// @version 0.5
// @description adds some crucial functionality to Ninite batch download page
// @include http*://www.ninite.com/*
// @include http*://ninite.com/*
// ==/UserScript==
function buildthedllink() {
// ==UserScript==
// @name stop (actually: pause) youtube html5 player on loading
// @author mihau
// @version 0.1
// @include http*://*.youtube.com/*
// @include http*://youtube.com/*
// ==/UserScript==
function ytstop() {
setTimeout("buttoncheck()", 200);
}
@echo off
for /F "tokens=*" %%A in ('dir /b *.mp4') do call :mvkitnow %%A
goto :EOF
:mvkitnow <bookid>
SET ofilex=%ofile:.mp4=%
echo.
"C:\Program Files\MKVToolNix\mkvmerge.exe" --ui-language en --output "%ofilex%.mkv" --language 0:und --language 1:und ^"^(^" ^"%1^" ^"^)^" --track-order 0:0,0:1
"C:\Program Files\MKVToolNix\mkvalidator.exe" %ofilex%.mkv
||rp-online.de/info/adblocker/*
! add this to your "my filters" list in uBlock and voila, you're done
@uahim
uahim / adownl.js
Last active August 12, 2019 18:34 — forked from t3k4y/adownl.js
basic tampermonkey js to get video url
// ==UserScript==
// @name teka artedownloader
// @namespace http://tampermonkey.net/
// @version 0.2.1
// @description try to take over the world!
// @author You
// @match https://www.arte.tv/de/videos/*
// @match https://www.arte.tv/fr/videos/*
// @grant GM_download
// ==/UserScript==
@echo off
set curl=curl -s -A "%ua%"
set spde=%temp%\spiegelde.tmp
for /f "delims=" %%x in ('getclip') do set userchoice=%%x
REM set /p userchoice="url: "
for /f "delims=" %%x in ('%curl% %userchoice% ^| .\grep.exe "&#34;JWPlayer&#34;" ^|.\sed.exe -f spiegelde.sed ^|jq -r "[.apiUrl,.mediaId]|join(\"/v2/media/\")"') do set jsonfl=%%x
import json
import os
import re
import shutil
import string
import sys
import tempfile
import urllib.request
import win32clipboard
from bs4 import BeautifulSoup
@uahim
uahim / spotify_embed_tracklist_bookmarklet.js
Last active August 5, 2020 22:22
throws a properly structured tracklist on embedded playlists
javascript:
var i,j=0,output="";
for (var i = 0, l = document.getElementsByTagName("span").length - 1; i < l; ++i) {
if (i == 0 || i == 1) {
continue;
}
if (i % 2 == 0) {
j++;
if (j < 10) {
var k = j.toString();