Skip to content

Instantly share code, notes, and snippets.

View bhoggard's full-sized avatar

Barry Hoggard bhoggard

View GitHub Profile
@bhoggard
bhoggard / init.lua
Last active September 13, 2026 23:31
Claude's guess at Dave Thomas (pragdave)'s neovim config
-- ~/.config/nvim/init.lua
--
-- A GUESSED reconstruction of Dave Thomas's (pragdave) Neovim config.
-- Dave has never published his actual dotfiles or given a talk on this setup,
-- so nothing here is confirmed -- it's inferred from public clues:
--
-- 1. He forked nvim-lua/kickstart.nvim on GitHub, so this uses kickstart's
-- structure: single init.lua, lazy.nvim as the plugin manager, minimal
-- "understand every line" philosophy rather than a mega-distro.
-- 2. He recommended oil.nvim on X ("edit your filesystem like a buffer").
@bhoggard
bhoggard / dedupe_bitwarden.py
Created September 11, 2026 02:09
Remove duplicate items from a Bitwarden JSON export
#!/usr/bin/env python3
"""Remove duplicate items from a Bitwarden JSON export.
An item is considered a duplicate of another if all of its meaningful
content matches (name, login/card/identity/secure-note fields, folder,
etc.) once volatile bookkeeping fields are ignored:
id, creationDate, revisionDate, passwordHistory
When duplicates are found, the item with the earliest creationDate is kept
(the "original"); the rest are dropped.
@bhoggard
bhoggard / .iex.exs
Created September 4, 2026 19:55
elixir IEx config
IEx.configure(
colors: [
enabled: true,
eval_result: [ :cyan, :bright ],
eval_error: [ :light_magenta ],
],
default_prompt: [
"\r\e[38;5;220m", # a pale gold
"%prefix", # IEx context
"\e[38;5;112m(%counter)", # forest green expression count
@bhoggard
bhoggard / Vagrantfile
Last active January 31, 2026 05:26
Vagrant file using utm for Mac (kubernetes course)
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-22.04"
config.vm.provider "vmware_desktop" do |v|
v.memory = 8192
v.cpus = 2
end
config.vm.define "cp-node" do |cp|
cp.vm.hostname = "cp"
@bhoggard
bhoggard / ubuntu-notes.md
Last active August 10, 2024 18:08
Ubuntu notes

Ubuntu Notes

Upgrade snap store. This command will tell you the PID you need to kill before the command will succeed.

sudo snap refresh snap-store

Install ruby prequisites

sudo apt-get install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-devsudo

@bhoggard
bhoggard / subscription_created.json
Created March 8, 2024 14:45
chargebee webhook events for subscriptions
{
"id": "ev_169vvoU3YUvqS75n",
"occurred_at": 1707265233,
"source": "admin_console",
"user": "admin@vvrkshop.art",
"object": "event",
"api_version": "v2",
"content": {
"subscription": {
"id": "169vvoU3YUvoI75i",
update auth.users set raw_user_meta_data=JSONB_BUILD_OBJECT('netvvrk_role', 'admin');
@bhoggard
bhoggard / page.sh
Last active September 4, 2023 23:51
Create Redwood.js app
➜ storytest git:(main) yarn rw g page home /
✔ Generating page files...
✔ Successfully wrote file `./web/src/pages/HomePage/HomePage.stories.jsx`
✔ Successfully wrote file `./web/src/pages/HomePage/HomePage.test.jsx`
✔ Successfully wrote file `./web/src/pages/HomePage/HomePage.jsx`
✔ Updating routes file...
✔ Generating types...
✔ One more thing...
Page created! A note about <MetaTags>:
At the top of your newly created page is a <MetaTags> component,
@bhoggard
bhoggard / learning.py
Last active March 16, 2023 20:27
Python notes
# reversing array/list
mylist[::-1]
# slices are up to, not including, 2nd number
list = [1,2,3,4,5]
list[1:3] # => [2, 3]