Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am fqxp on github.
* I am frankploss (https://keybase.io/frankploss) on keybase.
* I have a public key whose fingerprint is 6CD9 696C D7E3 D355 F7F4 F73C 3B2A 7B6B 065C 00B0
To claim this, I am signing this object:
@fqxp
fqxp / cheese
Last active June 10, 2022 09:56
#!/bin/bash
# Cheese taken from https://en.wikipedia.org/wiki/Cheese_Shop_sketch
shuf -n 1 - <<CHEESE
Cheese
Red Leicester
Tilsit
Caerphilly
Bel Paese
@fqxp
fqxp / git-info
Created September 7, 2020 09:55
`git info` command to show commits on current branch, whether a rebase to master is necessary and whether you need force-push
#!/bin/bash
CURRENT_BRANCH=$(git branch | grep '^\* ' | sed 's#..\(.*\)#\1#')
CURRENT_BRANCH_LENGTH=$(echo -n $CURRENT_BRANCH | wc -c)
echo
echo -e "\e[38;2;185;202;74mBranch »$CURRENT_BRANCH«"
echo -e "─────────$(printf '─%.0s' $(seq 1 $CURRENT_BRANCH_LENGTH))\e[0m"
echo
echo -e "\e[38;2;185;202;74m⯈ Commits on this branch\e[0m"
@fqxp
fqxp / tmux-panes-completion.zsh
Created September 4, 2020 10:17
Zsh completion for words from all tmux panes using FZF
_complete_tmux_pane_words() {
local -a w
if [[ -z "$TMUX_PANE" ]]; then
_message "not running inside tmux!"
return 1
fi
_tmux_capture_pane() {
tmux capture-pane -J -p $@ |
@fqxp
fqxp / bitwarden2pass
Created July 13, 2020 09:14
bitwarden2pass
#!/usr/bin/env python3
#
# Prerequisites:
# * Install bitwarden-cli (ArchLinux: bitwarden-cli package)
# and run `bw login` and `bw unlock` and set the API TOKEN thats
# printed as a result.
#
# Usage:
# 1. Simply run `bitwarden2pass`.
# 2. Voilà!
@fqxp
fqxp / Leankit-show-tags-all-the-time.user.js
Last active March 31, 2020 20:33
Userscript: Leankit - Show Tags all the Time in the board (not only on hover) - Instructions: 1. Install »Tampermonkey« add-on 2. Click on »Raw« on this page 3. Click »Install«
// ==UserScript==
// @name Leankit: Show Tags all the Time
// @namespace http://fqxp.de/
// @version 0.1
// @description Show tags of tickets in Leankit in the ticket instead of only when hovering over the tag icon
// @author Frank Ploss <[email protected]>
// @match https://*.leankit.com/board/*
// @match https://*.leankit.com/card/*
// @grant none
// @run-at document-end
@fqxp
fqxp / wtf
Created October 11, 2019 11:26
outputs WTF
#!/bin/bash
base64 -d <<EOF | mplayer -cache 1024 -
AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAFD+FtZGF0AAACrgYF//+q
3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE1NSByMjkxNyAwYTg0ZDk4IC0gSC4yNjQvTVBF
Ry00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxOCAtIGh0dHA6Ly93d3cudmlkZW9sYW4u
b3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFs
eXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVk
X3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBk
ZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTYg
bG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRl
### Keybase proof
I hereby claim:
* I am fqxp on github.
* I am fqxp (https://keybase.io/fqxp) on keybase.
* I have a public key ASA5ljZZaKUycWUAWv7Tjt6d9kCvKrWW52utlqDNAmd9OAo
To claim this, I am signing this object:
@fqxp
fqxp / gitlab-pipeline-status
Last active June 11, 2019 08:16
gitlab-pipeline-status: outputs status of last build pipeline from gitlab (install and configure gitlab CLI from https://github.com/NARKOZ/gitlab/ first)
#!/bin/bash
if ! git status >/dev/null 2>&1 ; then
echo "not a git repository"
exit 1
fi
PROJECT_NAME=$(git remote get-url origin | sed 's#.*:\(.*\)\.git#\1#')
BRANCH=$(git branch|grep '^\*'|cut -d\ -f2)
PIPELINE_SUCCESS=$(gitlab pipelines $PROJECT_NAME "{ per_page: 100 }" | grep $BRANCH | head -1 | cut -d\| -f 5)
@fqxp
fqxp / lastpass2pass
Last active August 11, 2017 14:20
Export LastPass passwords to pass (https://www.passwordstore.org/)
#!/usr/bin/env python3
#
# Prerequisites:
# * Install lpass command (ArchLinux: lastpass-cli package)
# and run `lpass login` once
# * or export passwords from Lastpass in CVS format.
# * Create a file `.lastpass2pass.blacklist` in your $HOME and optionally
# enter group names to be blacklisted, one per line.
#
# Usage: