Skip to content

Instantly share code, notes, and snippets.

View nicholashoule's full-sized avatar
📖
🎲 🎲 🎲 🎲 🎲

Nicholas Houle nicholashoule

📖
🎲 🎲 🎲 🎲 🎲
View GitHub Profile
@nicholashoule
nicholashoule / bash-checks.md
Last active November 5, 2026 14:38
Bash commands for validating email addresses and phone numbers

Bash

Email Addresses

Valid Email Addresses:

# Valid email filter (ERE)
grep -Ei '^[A-Za-z0-9._%+-]+@[A-Za-z0-9][A-Za-z0-9.-]*\.[A-Za-z]{2,}$' input

# Valid email filter (ERE) - Strict
@nicholashoule
nicholashoule / random.md
Last active November 5, 2026 14:33
Linux, macOS, and Windows Random commands

Random

DESCRIPTION

Linux provides cryptographic randomness through /dev/random and /dev/urandom, both backed by the kernel’s central entropy pool. Modern kernels seed and maintain this pool using diverse sources—interrupt timing, CPU jitter, hardware RNGs, and virtualization-provided entropy. On current systems (kernel 5.4+), these built‑in mechanisms are typically sufficient without additional entropy services. Starting from Linux kernel v5.4, the GitHub - jirka-h/haveged inspired algorithm has been included in the Linux kernel.

Random commands

Linux

@nicholashoule
nicholashoule / network-information.md
Last active November 5, 2026 14:35
Linux, macOS, and Windows commands for network information

Network information

Default Gateway

Linux:   ip route | awk '/^default/ { print $3 }'
macOS:   route -n get default | awk '/gateway/ {print $2}'
Windows: (Get-NetRoute -DestinationPrefix "0.0.0.0/0").NextHop

IP Address

@nicholashoule
nicholashoule / rsync.md
Last active March 12, 2026 07:50
Rsync and SSH

Rsync and SSH

rsync --help

Options
 -v, --verbose               increase verbosity
 -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
 -r, --recursive             recurse into directories
 -n, --dry-run               perform a trial run with no changes made
@nicholashoule
nicholashoule / gitbranches.md
Last active April 27, 2026 06:11
Git prune and delete merged local branches

Git prune and delete

Git installation

macOS

brew install git
@nicholashoule
nicholashoule / gitcherrypick.md
Last active March 12, 2026 06:39
Cherry pick a merge and create a pull request for the master branch

Git - cherry-pick

macOS

brew install git

Windows