Skip to content

Instantly share code, notes, and snippets.

View jbpadgett's full-sized avatar

Jeffery Padgett jbpadgett

  • Texas, USA
View GitHub Profile
@bespokoid
bespokoid / SpaceVim.md
Last active May 20, 2024 23:27
SpaceVim cheatsheet #tools
@dminca
dminca / unlock_yubikey.md
Last active August 18, 2023 05:18
YubiKey - unblock PIN after locking it with 3 wrong PIN attempts

Unlock YubiKey ⚠️

After entering the wrong password 3 times your YubiKey is locked in order to avoid brute-forcing the password. Luckily, there's a way of unlocking yourself.

⚠️ you will lose all data on it

gpg2 --card-status
Application ID ...: D2760001240102010006042126520000
@roustem
roustem / Setting-up-Windows-WSL1.md
Last active February 25, 2024 07:12
Setting-up-Windows-WSL1
@ixdy
ixdy / yubikey4-ssh-macos.md
Last active April 12, 2024 20:19
Setting up ssh public key authentication on macOS using a YubiKey 4

Setting up ssh public key authentication on macOS using a YubiKey 4

I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:

Basic setup notes

  1. I used a YubiKey 4, while the blog describes using a YubiKey NEO. I'm sure a YubiKey 5 would also work. I'm also running macOS 10.13.6.
  2. I installed GPGTools as recommended. However, as I'll note later, it seems that gpg-agent only automatically starts when gpg is used; for ssh, you'll need to ensure it's running.
  3. Before generating your keys, decide what key size you want to use. If you run the list command inside gpg --edit-card, look for the Key attributes line to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:
Key attributes ...: rsa2048 rsa2048 rsa2048
@fnky
fnky / ANSI.md
Last active May 22, 2024 08:06
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27

VIM-GO

Plugin https://github.com/fatih/vim-go
Tutorial https://github.com/fatih/vim-go-tutorial
Vimrc https://github.com/fatih/dotfiles/blob/master/vimrc

Run

Commands

  • File :GoRun %
  • Package :GoRun
  • Debug :GoDebugStart
@shortjared
shortjared / list.txt
Last active May 20, 2024 07:26
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@sonodar
sonodar / get_ssm_parameters.js
Last active April 3, 2024 06:24
Get secret parameters from Amazon EC2 Parameter Store
if (process.argv.length < 3) {
throw `Usage: ${process.argv[1]} path_prefix`
}
const PATH_PREFIX = process.argv[2]
const path = require('path')
const AWS = require('aws-sdk')
const ssm = new AWS.SSM()
function getParametersByPath(nextToken, callback) {
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active May 20, 2024 09:52
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@rubencaro
rubencaro / setup_go.md
Last active April 28, 2024 21:52
Golang installation guide

Golang installation guide

Since Golang version 1.11 this process is finally (almost) as easy as it should (!!). You can see full docs here. For older guides see here.

These are my notes, not a generic solution. They are not meant to work anywhere outside my machines. Update version numbers to whatever are the current ones while you do this.

Installing everything needed the first time

Install asdf and its golang plugin, then install golang