Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

npodonnell npodonnell

🎯
Focusing
View GitHub Profile
View ssh_cheatsheet.md

SSH Cheatsheet

N. P. O'Donnell, 2020

Specify a Key

To have SSH use a specific key use the -i flag:

ssh -i <path/to/key> <remote host>
View uniswapv3_notes.md
View wg-switcher.sh
#!/usr/bin/env bash
#
# Switch between Wireguard tunnels located in /etc/wireguard/
# Each tunnel should be defined with a config file, eg. wg0.conf
#
# N. P. O'Donnell, 2022
if [[ $# -ne 1 ]]; then
echo "Usage: $0 [OPTIONS] [<new tunnel>]"
echo
View git_cheatsheet.md

Git Cheatsheet

N. P. O'Donnell, 2020

Remotes

List all commits on all remotes:

for c in $(git rev-list --remotes); do git show $c | head -n8; done | less
View random_commands.md

Random Commands

And Stuff ... mostly for Ubuntu/Debian

N. P. O'Donnell, 2021

Disable tap-to-click

synclient MaxTapTime=0
@npodonnell
npodonnell / luks_encryption_cheatsheet.md
Last active Mar 13, 2022
LUKS Encryption Cheatsheet
View luks_encryption_cheatsheet.md

LUKS Encryption Cheatsheet

N. P. O'Donnell, 2021

Before you do anything, ensure you have cryptsetup installed:

sudo apt-get install -y cryptsetup
@npodonnell
npodonnell / bitcoind_ubuntu_setup.md
Last active Mar 12, 2022
Bitcoind Ubuntu Setup
View bitcoind_ubuntu_setup.md

Bitcoind Ubuntu Setup

N. P. O'Donnell, 2021

Getting Bitcoind

ARCH=x86_64
BITCOIN_VERSION=0.21.0
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-$ARCH-linux-gnu.tar.gz
View run-in-parallel.sh
#!/usr/bin/env bash
NTOK=3
do_cmd() {
echo "Command start $1"
sleep 5
echo "Command end $1"
return 1
}
@npodonnell
npodonnell / make-repo.sh
Last active Dec 29, 2021
Quickly Make Git Repos
View make-repo.sh
#!/usr/bin/env sh
# make-repo
# Creates a bare, named git repo on the server side
# N. P. O'Donnell, 2020 - 2021
REPO_BASE=/git
REPO_NAME=$1
REPO_DIR=$REPO_BASE/$REPO_NAME.git
HOSTNAME=$(hostname)