Skip to content

Instantly share code, notes, and snippets.

@zas
zas / renew-gpgkey.md
Last active July 4, 2022 20:39 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@zas
zas / sha256github_pubkey.sh
Created February 28, 2022 20:49
Calculate sha256 hash from a pub key to compare to github deploy key
#!/bin/bash
# calculate sha256 hash from a pub key to compare to github deploy key
KEY=$1
KEYPATH="~/.ssh/${KEY}.pub"
ssh-keygen -E sha256 -l -f "$KEYPATH"
@zas
zas / sonicping.md
Created May 17, 2021 13:04
sonar-like icmp ping

Sonic Ping

Emit a sound on each icmp reply.

Requirements

sudo apt install tcpdump sox
@zas
zas / README.md
Last active June 22, 2023 21:04
Klim Dash resume after suspend fix / Linux Mint 20.1 / Ubuntu 20.04
# Linux Mint Tricia 19.3
# Installed version was 5.50
# Headphones do not default to A2DP Sink
# fix: upgrade manually to 5.54
sudo apt install libdbus-1-dev libudev-dev libical-dev libreadline-dev
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.54.tar.xz
tar xz bluez-5.54.tar.xz
cd bluez-5.54/
./configure
from PyQt5.QtCore import QStandardPaths
def get_qt_enum(cls, enum):
d = {}
for key in dir(cls):
value = getattr(cls, key)
if isinstance(value, enum):
d[key] = value
return sorted(d, key=lambda k:d[k])
#!/bin/bash
systemctl stop ip-blacklist.service && rm -rf /etc/systemd/system/ip-blacklist.service /etc/ip-blacklist/ && systemctl daemon-reload
DONE:
kiki
herb
lemmy
hip
burnside
cage
yehudi
wetton
bootsy

Remove old docker install:

sudo apt-get remove docker docker-engine docker.io containerd runc

Remove previous old version configs:

class P1():
@property
def name(self):
return getattr(self, 'NAME', self.__class__.__name__)
@property
def title(self):
return getattr(self, 'TITLE', self.name)