Skip to content

Instantly share code, notes, and snippets.

View chuckntaylor's full-sized avatar

Charles Taylor chuckntaylor

View GitHub Profile
@chuckntaylor
chuckntaylor / gitCommands.md
Last active April 10, 2024 13:39
Git branch commands

Common Git Branch Commands

A collection of git commands that I commonly use, but can never remember.

Pushing a new branch to a remote repository

git push -u origin branchName
@chuckntaylor
chuckntaylor / closingPort.md
Last active April 5, 2024 15:04
Closing a port

How to close a port on Mac

In Terminal, type the following command to find the process ID (PID) of the port. Replace PORT_NUMBER with the actual port number you want to close.

sudo lsof -i :PORT_NUMBER

Copy the PID number, then use the following command to kill the process using the PID you found.

@chuckntaylor
chuckntaylor / gpg_yubikey_switch.md
Last active November 16, 2021 02:39
Remove GPG Yubikey, and enable another one

[OPTIONAL] list the keygrip IDs using

gpg --list-secret-keys --with-keygrip

If ALL your private keys are on external cards like the Yubikey, you can delete them all using:

rm -r ~/.gnupg/private-keys-v1.d