Skip to content

Instantly share code, notes, and snippets.

View joelpurra's full-sized avatar
Working remotely

Joel Purra joelpurra

Working remotely
View GitHub Profile
isDipesh /
Created August 8, 2022 07:00
Pacman Fix: error: key "..." could not be imported | error: required key missing from keyring

One of the common errors after running updates on your Arch Linux system:

error: key "..." could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.


bjoern-r / 103.conf
Last active March 4, 2024 04:04
Proxmox VE (privileged) lxc container for running kodi with GPU, keyboard and sound
arch: amd64
cores: 2
hostname: kodipriv
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=56:94:2A:9A:8E:1B,ip=dhcp,ip6=auto,type=veth
ostype: ubuntu
parent: before_first_boot
rootfs: encrypted_zfs:subvol-103-disk-0,size=8G
swap: 512
lxc.cgroup2.devices.allow: c 226:* rwm
weinbrenner / FixCS.GOinUbuntu21.10.txt
Created January 4, 2022 07:18
Fix CS.GO lib problem in Ubuntu 21.10
# After upgrading Ubuntu to 21.10 CS.GO in Steam for Linux stopped working
# (@see
# and
# )
# Here is how I fixed it:
# 0) Exit Steam, make sure it is not running anymore
$ ps aux | grep steam
morfikov /
Last active February 26, 2024 01:49 — forked from telenieko/
Sample files to enable wireless on Debian initramfs
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless
echo "$PREREQ"
case $1 in
izzyleung /
Last active June 5, 2024 03:23
Update your WireGuard public key in Mullvad via its public API

Generate a new pair of keys via wg

$ wg genkey | tee privatekey | wg pubkey > publickey

Rotate your public key via the same logic as in Mullvad's source code:

  • Step 1: Obtaining an access token:
$ curl -fsSL -X POST \
    -H 'Content-Type: application/json' \
aliicex /
Last active February 10, 2024 00:06
Faux-implementing IPv6 Policy-Based Routing on OpenWRT

Stangri's VPN Policy Routing package is a mainstay of my OpenWRT builds. It works great for IPv4, but I couldn't, for the life of me, get it working with IPv6. Instead, I had to faux-implement PBR as follows.

My VPN provider only gave me a single IP address with a /128 prefix, so I was forced to use NAT6. This left me with a stanza in my firewall config that looks like this; note the masq6 option

config zone
	option name 'wan_vpn'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
Snuggle /
Last active January 12, 2024 12:19 — forked from artizirk/
OpenPGP SSH access with Yubikey and GnuPG

OpenPGP SSH access with Yubikey and GnuPG

Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.

Yubikey Config under Ubuntu

To reset and disable not used modes on Yubikey you need the ykman program

You can install it using those commands

G-UK / Debootstrap Debian Arm64 OS for Raspberry Pi 3 &
Last active April 20, 2024 16:00
Build a 64bit Debian OS for the Raspberry Pi using Debootstrap


The objective of these instructions is to create a complete Arm64 OS (Userland and Kernel) using Debian Debootstrap and RPI-Update for use on the Raspberry Pi 3 and 4.


  • An existing Debian/Raspbian system (any architecture will do)
  • An empty SD card formatted as per a standard Raspbian installation mounted to /mnt/sd on the build system
    • 1st Partition 0-256MB = FAT32 (Mount to /mnt/sd/boot)
    • 2nd Partition 256MB+ = EXT4 (Mount to /mnt/sd)

Set-up basic Debian system

AfroThundr3007730 /
Created June 23, 2019 17:48
Create an on-demand SSH-based SOCKS5 proxy via systemd socket activation
# These steps will allow the setup of an on-demand SSH proxy
# Three unit files will be created to serve this purpose:
# ssh-socks-helper.socket - The listening socket providing activation
# ssh-socks-helper.service - A systemd proxy to pass the socket fd
# ssh-socks.service - The actual SSH service providing the tunnel
cat <<'EOF' > ~/.config/systemd/user/ssh-socks-helper.socket
Description=Proxy Helper Socket for Bastion SOCKS5 Proxy
artizirk /
Last active June 14, 2024 22:21
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO