I hereby claim:
- I am dvdbng on github.
- I am bengoa (https://keybase.io/bengoa) on keybase.
- I have a public key whose fingerprint is 96A5 554D 451B 813E 0642 F48B 8C88 3382 7C5F 60F4
To claim this, I am signing this object:
mkdir ~/vim | |
cd ~/vim | |
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
# Compiled on Jul 20 2017 | |
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
export VIMRUNTIME="$HOME/vim/runtime" | |
export PATH="$HOME/vim:$PATH" | |
cd - |
import requests | |
import os | |
import time | |
import base64 | |
import hmac | |
import hashlib | |
from decimal import Decimal, getcontext | |
API_URL = 'https://api.pro.coinbase.com' |
/* | |
Note: Due to CORS, this only works in chromium with disabled web security. | |
Start chrome like this: chromium-browser --disable-web-security --user-data-dir=/tmp/chrometmp | |
Load the page you want and paste the script in the web console. | |
This will save a snapshoot of the DOM and inline all CSS and images so that usually the page will | |
look exactly the same, but there is no javascript in the page. | |
Note that the generated file can be large in size, because the same URL might be inlined more than once. | |
*/ | |
var CSS_IMPORT = /@import\s*["']([^"']+)["']/g |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
""" | |
Usage: subscene-dl <subscene url> > file.srt | |
Example: | |
subscene-dl https://subscene.com/subtitles/mr-mercedes-second-season/english/1864622 > Mr.Mercedes.S02E09.WEBRip.x264-ION10.srt | |
""" | |
from lxml import html | |
import requests |
#!/usr/bin/env python3 | |
# This changes the playback speed to a different speed when there is and when there isn't subtitles. | |
# You need to activate the Lua HTTP interface in VLC and | |
# configure the password here, then run the script with a .srt as first argument. | |
# Ended up not being very nice because VLC janks for a few milliseconds when the playback speed changes | |
import requests | |
import pysrt | |
import sys |
#!/usr/bin/python3 | |
""" | |
LPT: If your original subtitles are not .srt, convert them using ffmpeg | |
""" | |
import sys | |
import pysrt | |
def merge_subtitles(srts): |
#!/usr/bin/python3 | |
import sys | |
import re | |
import pysrt | |
import pinyin | |
def to_pinyin(text): | |
pinyins = pinyin.get(text, delimiter=" ").split(' ') |
#!/bin/bash | |
cat /etc/dictionaries-common/words | grep -P '^[a-z]{1,10}$' | shuf -n 4 | tr '\n' '-' | sed 's/-$/\n/' |
#!/bin/bash | |
# Usage: ./btc-balance address | |
satoshis="$(curl https://insight.bitpay.com/api/addr/"$1"/balance)" | |
btc="$(echo "$satoshis/100000000" | bc -l)" | |
echo $btc |