Skip to content

Instantly share code, notes, and snippets.

View geoffeg's full-sized avatar
🏠
Working from home

Geoffrey Gallaway geoffeg

🏠
Working from home
View GitHub Profile
@geoffeg
geoffeg / nixos-luks-btrfs.sh
Created April 24, 2024 01:50
Encrypted NixOS (including swap and /boot) using btrfs
cryptsetup --verify-passphrase -v luksFormat /dev/sda3
cryptsetup --verify-passphrase -v luksFormat /dev/sda1
cryptsetup --verify-passphrase -v luksFormat /dev/sda2
cryptsetup open /dev/sda1 cryptboot
cryptsetup open /dev/sda2 cryptswap
cryptsetup open /dev/sda3 cryptroot
mkfs.vfat -n boot /dev/mapper/cryptboot
mkswap /dev/mapper/cryptswap
/* Copyright 2021 Craig Gardner
* ~/qmk_firmware/keyboards/leafcutterlabs/bigknob/keymaps/zoom
* To build:
* qmk compile -kb leafcutterlabs/bigknob -km zoom
*/
#include QMK_KEYBOARD_H
#define _MAIN 0
@geoffeg
geoffeg / route.json
Last active August 28, 2020 19:44
route api response
{
"route" : "KMSY SQS J35 MEM KSTL",
"summary" : {
"distance" : 553,
"time" : 83,
"ground-speed" : 436,
"altitude" : 37000
},
"segments" : [
{
#!/bin/sh
set -e
set -x
PRIVATE_INTERFACE=vpn
# Add the separate network namespace
ip netns add ${PRIVATE_INTERFACE}
# Add the new wg0 interface in the default namespace
#!/bin/bash
BLOG_ROOT=~/geoffeg.org/htdocs/blog
cp templates/feed-header.tmpl $BLOG_ROOT/feed.xml
cp templates/list-header.tmpl $BLOG_ROOT/index.html
find posts -not -path '*/\.*' -type f -iname '*.md' -print0 | sort |
while IFS= read -r -d '' POST; do
echo $POST
POST_TITLE=$(head -n1 "$POST" | cut -c3-)
#!/usr/bin/env bash
declare -r TMP_TOKEN_FILE="$HOME/.op_tmux_token_tmp"
declare -r OPT_SUBDOMAIN="my"
declare -r OPT_VAULT="personal"
op_login() {
op signin "$OPT_SUBDOMAIN" --output=raw > "$TMP_TOKEN_FILE"
clear
}
#!/bin/bash
osascript <<'END' 2>&1 >/dev/null
tell application "iTerm2"
set windowId to (unique id of current session of current window)
create window with profile "opterm" command "bash -l /Users/geoff/bin/opterm " & windowId
end tell
END
#!/bin/bash
password=`~/bin/opfzf`
iTermSessionId=$1
osascript <<END
tell application "iTerm2"
repeat with aWindow in windows
repeat with aTab in tabs of aWindow
repeat with aSession in sessions of aTab
set theSessionId to unique id of aSession
if theSessionId is "$iTermSessionId" then
@geoffeg
geoffeg / LICENSE
Last active August 3, 2018 00:34 — forked from dfm/LICENSE
XKCD-style plots in d3
Copyright (c) 2012–2013 Daniel Foreman-Mackey
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all

Keybase proof

I hereby claim:

  • I am geoffeg on github.
  • I am geoffeg (https://keybase.io/geoffeg) on keybase.
  • I have a public key ASDt4wfM96aNVo5MdNdwDG7KoyjTslVX1QaGwNRC9glb_wo

To claim this, I am signing this object: