Skip to content

Instantly share code, notes, and snippets.

@zas
zas / renew-gpgkey.md
Last active Jul 4, 2022 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key
View renew-gpgkey.md

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 Feb 28, 2022
Calculate sha256 hash from a pub key to compare to github deploy key
View sha256github_pubkey.sh
#!/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
sonar-like icmp ping
View sonicping.md

Sonic Ping

Emit a sound on each icmp reply.

Requirements

sudo apt install tcpdump sox
@zas
zas / README.md
Created Apr 3, 2021
Klim Dash resume after suspend fix / Linux Mint 20.1 / Ubuntu 20.04
View README.md
View fix_blutooth_ad2p_sony_wh-1000XM3.txt
# 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
View list_std_paths.py
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])
View uninstall_ip_blacklist.sh
#!/bin/bash
systemctl stop ip-blacklist.service && rm -rf /etc/systemd/system/ip-blacklist.service /etc/ip-blacklist/ && systemctl daemon-reload
View gist:ae47b6fd446af17151513c3aa5a4e9a8
DONE:
kiki
herb
lemmy
hip
burnside
cage
yehudi
wetton
bootsy
View docker_install.md

Remove old docker install:

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

Remove previous old version configs:

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