Skip to content

Instantly share code, notes, and snippets.

View kjkent's full-sized avatar
:shipit:

Kristopher James Kent kjkent

:shipit:
View GitHub Profile
@artizirk
artizirk / gnupg_scdaemon.md
Last active April 22, 2025 18:10
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

@patrickmslatteryvt
patrickmslatteryvt / gist:d531c5ae4598fd4c9d508833bde6c7c0
Last active July 24, 2023 07:05
Install/update SOPS to latest on Fedora
# Install/update SOPS to latest on Fedora - https://github.com/getsops/sops
# This script requires jq installed to parse the API return from GitHub
echo "[+] Install/upgrade SOPS"
which jq | grep -o jq > /dev/null && : || dnf install -y jq
SOPS_VERSION=$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq .tag_name | tr -d '"')
dnf install -y https://github.com/getsops/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION:1}-1.x86_64.rpm
sops --version
# sops 3.7.3 (latest)
@mwilliammyers
mwilliammyers / updatedb.conf
Last active June 2, 2024 21:35
/etc/updatedb.conf
# locate --regex '.*\/(\w+[^\.]\w+$)+'
PRUNE_BIND_MOUNTS="yes"
PRUNENAMES=".git .bzr .hg .svn Trash Cache cache .cache logs fonts font Frameworks atom .atom apm .apm .ansible .idea libreoffice node_modules .node-gyp .npm ipynb_checkpoints dist-packages site-packages .eggs build help icons modules samples Template Templates template templates snapd locale .pycharm_helpers pycharm_helpers .google-chrome google-chrome __pycache__ pack generated_completions .cargo"
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /home/.ecryptfs /var/lib/schroot /usr/share/man /usr/share/perl5 /usr/share/perl /usr/share/doc /usr/share/sound /opt/pycharm-professional"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs devtmpfs fuse.mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ceph fuse.ceph fuse.rozofs ecryptfs fusesmb"
@newvertex
newvertex / KeyPressEvent.js
Created September 17, 2016 10:24
Example: Detect keypress event in Node.js console app
var readline = require('readline');
readline.emitKeypressEvents(process.stdin);
if (process.stdin.isTTY)
process.stdin.setRawMode(true);
process.stdin.on('keypress', (chunk, key) => {
if (key && key.name == 'q')
process.exit();
@carlessanagustin
carlessanagustin / Nginx_Cheat_Sheet.md
Last active April 21, 2025 02:32
Nginx Cheat Sheet
@uglide
uglide / chroot.sh
Last active May 5, 2025 16:35
Chroot to Installed system on LVM
#!/bin/bash
fdisk -lu
pvscan
vgscan
vgchange -a y
lvscan
mount /dev/ubuntu-vg/root /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
@MaxLaumeister
MaxLaumeister / Grub_Powerup.md
Last active February 7, 2025 17:53
Grub Init Tune: Mario Bros. Mushroom Powerup

Grub Init Tune - Mario Bros. Mushroom Powerup

This Grub Init Tune will make your computer sound like a Super Mushroom every time you turn it on! This only works for the Grub bootloader - this generally means you need to have Linux (or other Grub-based OS) installed.

Here's the code, which goes in your /etc/default/grub file:

GRUB_INIT_TUNE="1750 523 1 392 1 523 1 659 1 784 1 1047 1 784 1 415 1 523 1 622 1 831 1 622 1 831 1 1046 1 1244 1 1661 1 1244 1 466 1 587 1 698 1 932 1 1195 1 1397 1 1865 1 1397 1"

Installation Instructions