Skip to content

Instantly share code, notes, and snippets.

View jkwmoore's full-sized avatar

James Moore jkwmoore

View GitHub Profile
@jkwmoore
jkwmoore / setup-bw-ssh-agent.sh
Last active June 3, 2025 12:15
A script to get Bitwarden SSH agent working inside WSL2 Ubuntu
#!/bin/bash
# This code is licensed under MIT license https://choosealicense.com/licenses/mit/
#
# Note: I have only tested lightly and this seems to work. I won't take the blame if this makes your
# machine catch fire.
#
# Thanks to Aaron and the original work discussed here:
# https://www.rebelpeon.com/bitwarden-ssh-agent-on-wsl2/
#
# If you want to run this script as is you can:
@jkwmoore
jkwmoore / test-zed-notifications.sh
Last active October 14, 2023 15:23
The script serves as a simple way to verify the ZED (ZFS Event Daemon) email notification system by simulating a scrub operation.
#!/bin/bash
# This script creates a sparse ZFS filesystem with a random pool name, scrubs it, and removes it to test ZED email notifications.
# Generate a random pool name
pool_name="test_$(date +%s | sha256sum | base64 | head -c 10)"
# Generate a random filename for the sparse file
sparse_file_path="/tmp/sparse_file_$(date +%s | sha256sum | base64 | head -c 10)"
# Create a sparse file with a size of 512MB