Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

npodonnell npodonnell

🎯
Focusing
View GitHub Profile
@npodonnell
npodonnell / special_characters.md
Last active January 30, 2023 10:04
Special Characters
View special_characters.md

Special Characters

N. P. O'Donnell, 2023

Typing These Characters

On Linux, Hold ctrl + shift + u at the same time, release all 3, then type the 4 hex characters of the character you'd like.

Codes

View html-template-with-header-footer.html
@npodonnell
npodonnell / uniswapv3_notes.md
Last active November 15, 2022 08:48
UniswapV3 Notes
View uniswapv3_notes.md
@npodonnell
npodonnell / wg-switcher.sh
Created July 18, 2022 03:30
Wireguard switcher
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
@npodonnell
npodonnell / run-in-parallel.sh
Last active January 20, 2022 20:08
Run in parallel
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 / luks_encryption_cheatsheet.md
Last active December 14, 2022 19:58
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 / xen_cheatsheet.md
Last active December 27, 2021 16:05
Xen Cheatsheet
View xen_cheatsheet.md

Xen Cheatsheet

N. P. O'Donnell, 2021

Run without sudo

There may be other ways to do this, but I use the following alias:

alias xen="sudo xen $@"
@npodonnell
npodonnell / virtualization_notes.md
Last active January 13, 2023 11:25
Virtualization Notes
View virtualization_notes.md

Virtualization Notes

N. P. O'Donnell, 2021

Find out if your x86 CPU supports KVM Virtualization

egrep -c '(vmx|svm)' /proc/cpuinfo
@npodonnell
npodonnell / ubuntu-2110-in-docker.sh
Created October 25, 2021 18:47
Ubuntu 21.10 in docker
View ubuntu-2110-in-docker.sh
#!/usr/bin/env bash
#
# Creates a persistent, SSHable ubuntu 21.10 in a container, including tmux.
docker stop my-ubuntu-ctr
docker rm my-ubuntu-ctr
docker rmi my-ubuntu
docker build -t my-ubuntu - << HERE
FROM ubuntu:21.10
@npodonnell
npodonnell / docker_api_cheatsheet.md
Last active December 29, 2021 13:56
Docker API Cheatsheet
View docker_api_cheatsheet.md

Docker Python API Cheatsheet

N. P. O'Donnell, 2021

Installing and Importing

Installing:

pip install docker