Skip to content

Instantly share code, notes, and snippets.

View m-rey's full-sized avatar
🏳️‍⚧️
Hack the planet!

Mæve Rey m-rey

🏳️‍⚧️
Hack the planet!
  • Nuremberg, Germany
View GitHub Profile
@m-rey
m-rey / covid_test_pw.sh
Created October 15, 2020 11:41
get the password of password protected covid-19 test result pdf by EcoCare
#!/bin/sh
# NAME
# covid_test_pw.sh - get the password of your password protected covid-19 test result pdf by EcoCare
#
# SYNOPSIS
# covid_test_pw.sh FILE
#
# DESCRIPTION
# Normally the password is sent via SMS to your phone.
@m-rey
m-rey / urlcheck.sh
Last active November 13, 2020 17:07
script to check if list of urls is reachable (2xx HTTP response)
#!/bin/bash
while read line; do url_return=($(curl -s -o /dev/null -IL -m 10 -w "%{http_code} %{url_effective}" "$line")); if [ ${url_return[1]} -ge 200 ] && [ ${url_return[1]} -lt 300 ] ; then echo "${url_return[@]:1}">>"url_reachable.txt"; else echo "${url_return[@]:1}">>"url_failed.txt"; fi; done<url.txt
#!/bin/sh
# change $server to ssh server
# if you are using the terminal emulator "kitty", try:
kitty +kitten ssh $server
# if you are not using kitty or the command above somehow doesn't work, try:
infocmp -a $TERM | ssh myserver tic -x -o \~/.terminfo /dev/stdin
# if it still doesn't work, try:
@m-rey
m-rey / install_fire_code_fonts.sh
Created June 16, 2020 12:02
script to install Fire Code fonts
#!/bin/sh
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts
for type in Bold Light Medium Regular Retina; do
wget -O ~/.local/share/fonts/FiraCode-${type}.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true";
done
fc-cache -f
@m-rey
m-rey / waybar-module_minecraft-online-users
Created April 30, 2020 14:03
Waybar module to display how many users are connected to a minecraft server. Displays usernames on left click and opens the TLauncher Minecraft client flatpak on right click.
"custom/minecraft": {
"format": "⬢ {}",
"interval": 10,
"exec": "printf '\\x06\\x00\\x00\\x00\\x00\\x00\\x01\\x01\\x00' | nc -N $SERVER_IP $SERVER_PORT | tr -cd '[:print:]' | jq -r '.players.online, .players.max'| xargs printf '%d/%d'",
"on-click": "printf '\\x06\\x00\\x00\\x00\\x00\\x00\\x01\\x01\\x00' | nc -N $SERVER_IP $SERVER_PORT | tr -cd '[:print:]' | jq -r '.players.sample[] | .name' | xargs -0 notify-send 'online users'",
"on-click-right": "flatpak run org.tlauncher.TLauncher"
}
@m-rey
m-rey / install_codecs.sh
Created April 16, 2020 10:22
Gist to easily install missing codecs in openSUSE
#!/bin/sh
sudo zypper in opi && sudo opi codecs
@m-rey
m-rey / reset_pulseaudio_settings.sh
Created November 7, 2019 13:12
Sometimes pulseaudio doesn't work, even after restarting it (`pulseaudio -k && pulseaudio --start`). This removes the config and thus may fix the problem.
# see:
# https://bbs.archlinux.org/viewtopic.php?pid=1243988#p1243988
# https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting
# (re)moves the config
mv .config/pulse .config/pulse_broken
@m-rey
m-rey / wire_on_tails.md
Last active July 17, 2019 09:22 — forked from blackpidgeon/HowTo.md
Installing Wire on Tails

Installing Wire on Tails

Wire is an encrypted messaging app, available for many different platforms. It is possible to install on Tails, a secure Linux on an USB Stick.

Configure Tails

You will need a Persistent Volume. Check the Tails docs if you need to create one

Enable Persistent Dotfiles.

  1. Open the "Configure Persistent Volume" application. You find it in the Tails application menu in the Group named "Tails".
  2. Enable "Dotfiles" at the bottom of the list and Save the changes.
@m-rey
m-rey / fix_pgp_pub_key_not_found.sh
Created March 1, 2019 14:25
Fix: Public Key of Ultimately Trusted Key $key Not Found
#!/bin/bash
gpg --check-trustdb 2>&1| grep 'not found' | awk '{print $8}' >bad-keys.txt
gpg --export-ownertrust > ownertrust-gpg.txt
mv ~/.gnupg/trustdb.gpg ~/.gnupg/trustdb.gpg-broken
for KEY in `cat bad-keys.txt` ; do sed -i "/$KEY/d" ownertrust-gpg.txt ; done
gpg --import-ownertrust ownertrust-gpg.txt
rm bad-keys.txt ownertrust-gpg.txt
@m-rey
m-rey / delete_printer_history.sh
Last active January 29, 2019 17:39
delete your printer history from printer
#!/bin/sh
#set variable USER and PRINTER accordingly
sudo cancel -E -a -x -u $USER $PRINTER