I hereby claim:
- I am alexshpilkin on github.
- I am alexshpilkin (https://keybase.io/alexshpilkin) on keybase.
- I have a public key ASAbZo8Qp8U-zCBRPlyofF38flV9f0EAAp_LQXFMwtwrgwo
To claim this, I am signing this object:
#!/bin/sh -eu | |
set -o pipefail # FIXME bashism | |
BASE=http://dir.alumni57.ru | |
ROOT=$BASE/ | |
LMAP='{ "А": "a", "Б": "b", "В": "v", "Г": "g", "Д": "d", "Е": "e", "К": "k", "М": "m" }' | |
curl -sS "$ROOT" | pup 'article h2 a:first-child json{}' \ | |
| jq -r '.[] | "\(.text)\t\(.href)"' | sort -nk1 \ | |
| while read year url; do |
Download the RKN list from https://github.com/zapret-info/z-i, massage it into | |
a Mikrotik script that manages a firewall address list, and put it up on a web | |
server. Note well that the list is gigantic---more than 80,000 entries as of | |
2018-04-28---so be sure to check if your router can handle it in advance (for | |
example, hAP Lite, with its measly 32M of memory, can’t). | |
On the router side, do something like | |
/tool fetch url="https://sheaf.site/rkn.rsc" dst-path=rkn.rsc | |
:import rkn.src |
#!/bin/sh -eu | |
DOMAIN=lointa.in | |
JOURNAL=/srv/dns/$DOMAIN | |
fail() { echo "Status: $1"; echo "Content-Type: text/plain"; echo; echo "$REQUEST_METHOD"; exit; } | |
if [ -z "$PATH_INFO" ]; then | |
echo "Status: 308 Permanent Redirect" | |
echo "Content-Length: 0"; |
#!/bin/sh -eu | |
set -o pipefail | |
temp=$(mktemp) | |
trap "rm -f '$temp'" EXIT | |
curl -sS "$1" \ | |
| pup 'script[src*="main-base.bundle"] + script text{}' \ | |
| sed -Ee '1d;$d' -e 's/window\[[^]]*\]\((.*)\)/\1/' -e 's/\\x3[Cc]/</g' -e 's/\\x3[Ee]/>/g' \ | |
| jq .value >"$temp" |
#!/bin/sh -eu | |
set -o pipefail | |
# mkdir sub; for file in *.mp4; do n=${file#*#}; n=${n%% *}; mv "$file" "sub/$(printf '%02d - Episode %d.mp4' $n $n)"; done | |
myvi() { | |
youtube-dl -c -R inf --socket-timeout 1 -o "$2" $( | |
curl -sS 'http://animeonline.su/zend/anime/myvi/index/id/'"$1" \ | |
| sed -Ene 's/.*"url": +"([^"]*)".*/\1/p' | head -1 \ | |
| sed 's|player/embed/html|watch|' |
#!/bin/sh -eu | |
set -o pipefail # FIXME bashism | |
pdftotext -q -layout "$1" - \ | |
| iconv -t iso8859-1//translit | iconv -f georgian-ps \ | |
| "$0.post" |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
from matplotlib import pyplot as plt | |
from numpy import arange | |
def find(func, iterable): | |
result = None | |
for i, elem in enumerate(iterable): | |
if func(elem): | |
assert result is None |
#!/bin/sh -eu | |
# FIXME doesn't do URL decoding | |
list=; trap 'rm -f "$list"' EXIT; list=$(mktemp) | |
url=$1; path=${2-} | |
echo "DIR $path" | |
curl -sSL# -o "$list" "$url" | |
<"$list" pup 'pre img:not([alt="[DIR]"]) + a attr{href}' | tail +2 | \ |
.PHONY: all clean | |
all: blocked.png blocked.svg | |
clean: | |
rm -f backorder.hist ru.hist blocked.png blocked.svg | |
blocked.png blocked.svg: blocked ru.hist backorder.hist | |
./$< | |
backorder.hist: backorder.csv hist |