Skip to content

Instantly share code, notes, and snippets.

#!/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
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();
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();
// ==UserScript==
// @name deezertitlefix
// @namespace deezer
// @description deezer!
// @include https://www.deezer.com/*
// @exclude https://www.deezer.com/*/playlist/*
// @version 1
// @run-at load
// @grant GM_addStyle
// ==/UserScript==
#!/bin/bash
#requires Cygwin, netcat, Autohotkey, focus_firefox.ahk and Nircmdc on Windows
while true
do
content=$(echo foobar | nc.exe -l -p 999 | sed -r -n "$ s/\n//;$ p")
cmd /c focus_firefox.ahk
if test $content = "volup"
WinWait, Netflix - Mozilla Firefox,
IfWinNotActive, Netflix - Mozilla Firefox, , WinActivate, Netflix - Mozilla Firefox,
WinWaitActive, Netflix - Mozilla Firefox,
Sleep, 100
Return