Skip to content

Instantly share code, notes, and snippets.

View Saoneth's full-sized avatar

Rafał Stańczyk Saoneth

View GitHub Profile
#!/bin/sh
docker run -t -e UID="$(id -u)" -e GID="$(id -g)" -v "$PWD":/w -w /tmp --rm alpine sh -c 'wget "https://github.com/Tomas-M/iotop/archive/master.zip" && unzip master.zip && cd iotop-master && apk add gcc make ncurses-dev linux-headers ncurses-static musl-dev && V=1 LIBS="-no-pie -static -static-libgcc -static-libstdc++" make && strip -s iotop && chown "$UID:$GID" iotop && chmod +x iotop && mv iotop /w/'
{"aar":"Afaraf","abk":"Abkhazian","ace":"Achinese","ach":"Acoli","ada":"Adangme","ady":"Adygei","afa":"Afro-Asiatic Languages","afh":"Afrihili","afr":"Afrikaans","ain":"Ainu","aka":"Akan","akk":"Akkadian","alb":"Shqip","sqi":"Shqip","ale":"Aleut","alg":"Algonquian Languages","alt":"Southern Altai","amh":"አማርኛ","ang":"English Old (ca.450-1100)","anp":"Angika","apa":"Apache Languages","ara":"العربية","arc":"Imperial Aramaic (700-300 BCE)","arg":"Aragonés","arm":"Հայերեն","hye":"Հայերեն","arn":"Mapuche","arp":"Arapaho","art":"Artificial Languages","arw":"Arawak","asm":"অসমীয়া","ast":"Asturian","ath":"Athapascan Languages","aus":"Australian Languages","ava":"авар мацӀ","ave":"Avesta","awa":"Awadhi","aym":"Aymar Aru","aze":"Azərbaycan Dili","bad":"Banda Languages","bai":"Bamileke Languages","bak":"башҡорт теле","bal":"Baluchi","bam":"Bamanankan","ban":"Balinese","baq":"Euskara","eus":"Euskara","bas":"Basa","bat":"Baltic Languages","bej":"Bedawiyet","bel":"Беларуская","bem":"Bemba","ben":"বাংলা","ber":"Berber Lang
// ==UserScript==
// @name Steam: convert ARS currency to another
// @namespace http://tampermonkey.net/
// @version 0.9
// @author Saoneth
// @match https://store.steampowered.com/*
// @match https://steamcommunity.com/*
// @grant GM.xmlHttpRequest
// @grant GM.setValue
// @grant GM.getValue
@Saoneth
Saoneth / puttyShortcuts.au3
Created October 6, 2017 21:34
Paste using alt+v in putty
Func ActiveProcess()
Local $Processlist = ProcessList()
Local $Pid = WinGetProcess(WinGetHandle("[active]"))
For $i = 1 To $Processlist[0][0]
If $Processlist[$i][1] = $Pid Then Return $Processlist[$i][0]
Next
EndFunc
Func PuttyPaste()
If ActiveProcess() = "putty.exe" Then Send("{LSHIFT down}{INSERT}{LSHIFT up}")
EndFunc
@Saoneth
Saoneth / watch.bat
Created June 2, 2017 22:06
Watches directory for .url files and launches them with firefox
@echo off
:s
for %%a in (*.url) do (
"C:\Program Files\Firefox Developer Edition\firefox.exe" "%%a"
del "%%a"
)
ping 127.0.0.1 -n 2 > nul
goto s
pause
@Saoneth
Saoneth / generate.js
Last active June 9, 2017 15:47
Static Google Map
#!/usr/bin/env phantomjs
var page = require('webpage').create(),
system = require('system'),
args = system.args;
if (args.length !== 4) {
console.log('Usage: ' + args[0] + ' ID WIDTHxHEIGHT LOCATION');
phantom.exit();
}
// ==UserScript==
// @name KBogu Master
// @namespace http://saoneth.pl/
// @version 6.6.6.6
// @description try to take over the world of kbogu!
// @author Saoneth
// @match http://testy.kbogu.man.szczecin.pl/client/
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Bato.to Mobile Theme
// @namespace http://saoneth.pl/
// @version 0.3
// @description try to take over the world!
// @author Saoneth
// @match http://bato.to/*
// @match https://bato.to/*
// @grant none
// @updateURL https://gist.github.com/Saoneth/fee6e837ec2fd97fccf343184fa6e0dc/raw/batoto_mobile.user.js
@Saoneth
Saoneth / dl.bat
Last active June 9, 2017 15:50
Download torrent file by file
FOR /L %%G IN (%2,1,%3) DO aria2c --peer-id-prefix="-UT2210-" --user-agent="uTorrent/2210(25110)" --file-allocation=none --seed-time=0 --bt-tracker=udp://tracker.openbittorrent.com:80/announce --select-file=%%G %1
// ==UserScript==
// @name Batoto One Page Reader
// @namespace http://saoneth.pl/
// @version 0.9
// @description try to take over the world!
// @author Saoneth
// @match http://bato.to/reader
// @grant none
// @updateURL https://gist.github.com/Saoneth/2eb44537a2d1e5098f25234328245ded/raw/batoto.user.js
// @run-at document-start