Skip to content

Instantly share code, notes, and snippets.

View rhowe's full-sized avatar
💭
Just being

Russell Howe rhowe

💭
Just being
View GitHub Profile
@rhowe
rhowe / 6.sh
Created December 6, 2019 18:49
AOC2019day6part1
#!/bin/bash
set -eu
set -o pipefail
orrery=/dev/shm/orrery
cd "$(dirname "$0")"
rm -rf "$orrery"
mkdir "$orrery"
@rhowe
rhowe / 3-2.sh
Last active December 5, 2019 18:55
AOC2019day3part2
#!/bin/bash
set -eu
set -o pipefail
xorigin=1000
yorigin=1000
wires=()
@rhowe
rhowe / 5-2.sh
Created December 5, 2019 13:31
AOC2019day5part2
#!/bin/bash
set -eu
IFS=, read -r -a ram < "$1"
getval() {
case $1 in
0) echo "${ram[$2]}" ;;
1) echo "$2" ;;
@rhowe
rhowe / gnucash-to-postgres.xsl
Created August 14, 2018 21:47
Convert a gnucash save file into a postgres database
<?xml version="1.0" ?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cd="http://www.gnucash.org/XML/cd"
xmlns:book="http://www.gnucash.org/XML/book"
xmlns:gnc="http://www.gnucash.org/XML/gnc"
xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
xmlns:trn="http://www.gnucash.org/XML/trn"
xmlns:split="http://www.gnucash.org/XML/split"
xmlns:act="http://www.gnucash.org/XML/act"