Skip to content

Instantly share code, notes, and snippets.

@flxai
flxai / README.md
Last active January 4, 2022 23:44
Unlock OpenSSH keys using passphrases from KeePassXC database

About

This script unlocks multiple OpenSSH keys that reside in a common directory, e.g. ~/.ssh/keys, using passphrases stored in a KeepassXC database, e.g. ~/.keepass.kdbx.

Installation

Download the script and make it executable, e.g. using

$ url="https://gist.githubusercontent.com/flxai/14ddcaf8c25979846cb159c8eff82e32/raw/59eb4b1d5716f19d54b7f2bc73fc88d152006cff/ssh-keyring"
@flxai
flxai / README.md
Last active January 3, 2022 20:59
Gruvbox style variant for matplotlib

Download & installation

Download the gruvbox-colored.mplstyle to the according directory:

$ url="https://gist.githubusercontent.com/flxai/ccb46e725272943d62325a2e8a1fae4c/raw/81c54b723cd69a5f82e673a2f2df6ddc5ac5dc5e/gruvbox-colored.mplstyle"
$ mkdir -p ~/.config/matplotlib/stylelib
$ curl "$url" -o ~/.config/matplotlib/stylelib/gruvbox-colored.mplstyle
@flxai
flxai / dump-waboorrt.sh
Last active January 1, 2022 19:34
Dump & analyze waboorrt game logs via API
#!/usr/bin/env bash
# Dump waboorrt game logs
rid=0
lid=
mkdir -p data
if [[ ! -f data/ids.lst ]]; then
echo -n > data/ids.lst
echo -n > data/elo.jsonl
echo -n "Downloading ids"
while [[ "$rid" != "$lid" ]]; do
@flxai
flxai / corona-gdp.ipynb
Last active November 1, 2021 20:06
Correlation between corona deaths per million and GDP per capita
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flxai
flxai / README.md
Created October 28, 2021 19:47
c3sets.de client in bash using mpv and git

c3sets.de in bash

Install git and mpv, place somewhere and execute. It gives a menu like the following that allows you to select the set:

1) [15 Jahre Chaosdorf] Couchsofa - Spaaaaaace                          79) [gpn17] Morelle
2) [18 Jahre Chaosdorf] vidister - Topfschlagen an der Tschunkbar       80) [gpn17] Rio
3) [20 Jahre Chaosdorf] Couchsofa - Der Gute Stoff Muss Brennbar Sein   81) [gpn17] Tasmo
4) [20 Jahre Entropia] Couchsofa - Peleus and Thetis                    82) [gpn18] Alexeyan - I Made the Nerds Dance
5) [29c3] Tasmo - Poppen Pt2                                            83) [gpn18] Bam - Deployment Day
@flxai
flxai / README.md
Created October 2, 2021 11:38
SomaFM client in bash using mpv and pup

SomaFM in bash

Install pup and mpv, place somewhere and execute. It gives a menu like the following that allows you to select the station:

Getting radio stations...
-#O=#   #   #
 1) doomed           12) gsclassic        23) 7soul           34) missioncontrol
 2) dronezone        13) synphaera        24) seventies       35) sf1033
 3) deepspaceone     14) n5md             25) u80s            36) scanner
@flxai
flxai / README.md
Created March 13, 2021 01:56
Get 10 year nominal yields on US government bonds from the Federal Reserve

These two lines download the 10 year nominal yields on US government bonds from the Federal Reserve. The 10 year government bond yield is considered a standard indicator of long-term interest rates. It was inspired by this repo.

@flxai
flxai / ssh-keyring
Created March 7, 2021 02:24
Unlock SSH keys using passphrases stored in KeePassXC database
#!/usr/bin/env bash
# Unlock ssh keys using passphrases stored in keepassxc database
if [[ $# -lt 2 ]]; then
echo -e "Usage:\n${0##*/} KEEPASS_DB KEY_DIR"
exit 1
fi
# Some variables
kpdb="$1"
@flxai
flxai / linear-extrapolation.ipynb
Last active March 2, 2021 21:05
Linear Extrapolation within Pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flxai
flxai / google-trends-historic-daily-precision.ipynb
Last active February 15, 2021 16:20
Collect Google Trend historic data with daily precision