Skip to content

Instantly share code, notes, and snippets.

View jhannah's full-sized avatar

Jay Hannah jhannah

View GitHub Profile
@jhannah
jhannah / gist:4659532da44743a01a6926ce914efb61
Last active January 28, 2023 21:13
Nebraska Bills Introduced after Jan 25th
Repo / HOWTO: https://github.com/jhannah/legislature_calendar/tree/main/experiments/CSV_dumps
So here are all the Nebraska Bills (LB)
NOT Resolutions (LR)
NOT Appropriation Bills (LB#####A)
introduced after Jan 25th of any year
sqlite> select h.date, b.bill_number, b.title, b.state_link
from bills b, history h
where b.bill_id = h.bill_id
@jhannah
jhannah / gist:772396697ab5ea4c7e8a0b09a9065fcb
Last active January 28, 2023 21:13
Nebraska legislature: Bills introduced on March 5th
Repo / HOWTO: https://github.com/jhannah/legislature_calendar/tree/main/experiments/CSV_dumps
Following up on this thread:
https://octodon.social/@deafferret/109759239190597753
Let's pick a random day of the year not in "the first 10 days of a session." I chose March 5th.
How many bills were Introduced on March 5th?
✗ ack -i "Date of introduction" `find ./ -name "history.csv"` | grep "\-03-05" | wc -l
@jhannah
jhannah / gist:c7dc48c532b1b3929143d4815639662b
Created January 12, 2023 21:41
Am I taking too much / too little time off?
With our "unlimited PTO" policy, I was curious if I've been, roughly, taking too much or too little time off.
So I dumped all my worked hours out of Tempo (Jira) since 2018.
Here's my source code:
https://github.com/jhannah/sandbox/blob/main/jhannah/hours.pl
And here's the result of running the program:
✗ perl hours.pl
Per year: 4 weeks off (PTO + sick) + 11 holidays
curl -w "@curl-format.txt" -o /dev/null -s https://www.google.com
time_namelookup: 0.010029s
time_connect: 0.043444s
time_appconnect: 0.099994s
time_pretransfer: 0.100094s
time_redirect: 0.000000s
time_starttransfer: 0.184069s
----------
time_total: 0.189819s
@jhannah
jhannah / gist:e1cda1d53f2ebb04a7204976a1477762
Created December 22, 2021 02:41
2021 Nebraska Legislature
https://legiscan.com/NE/datasets 107th Legislature CSV
#! env perl
use Modern::Perl;
use Text::CSV_XS;
no warnings "experimental";
my (%dates, $actions);
my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 });
open my $fh, "<:encoding(utf8)", "history.csv" or die $!;
@jhannah
jhannah / gist:4c74c240ba987edea6e5f0f72a342ab3
Created December 16, 2021 20:42
Amortization schedule w/ principle-only payments
Here's a little Perl script I wrote:
https://github.com/jhannah/sandbox/blob/main/amortize.pl
✗ ./amortize.pl
Usage:
amortize.pl --principle=176000 --periods=180 --interest_rate=2.13 \
--principle_payment=12:2000 \
--principle_payment=24:2000
Take out a $176,000 loan over 15 years at 2.13% APR.
@jhannah
jhannah / gist:7961433dcd9195f907d9d8e82ddb9564
Last active April 8, 2025 18:40
Mortgage: Amortization schedule / payments
2.13% APR
Payment 1: Aug 1 2021
$ pip3 install amortization (https://github.com/roniemartinez/amortization)
$ amortize --principal 176000 --period 180 --interest-rate 0.0213 --schedule
Number Amount Interest Principal Balance
-------- ---------- ---------- ----------- ----------
1 1,143.14 312.40 830.74 175,169.26 Aug 1 2021
2 1,143.14 310.93 832.21 174,337.05
3 1,143.14 309.45 833.69 173,503.36
@jhannah
jhannah / gist:9541cadd3081ddd1d8ba146173d0775a
Last active March 10, 2021 03:14
Google Civic Information API example
A random house I chose from Google Maps:
4215 S 28th St, Omaha, NE 68107
https://developers.google.com/civic-information/docs/v2/representatives/representativeInfoByAddress?apix_params=%7B%22address%22%3A%224215%20S%2028th%20St%2C%20Omaha%2C%20NE%2068107%22%7D
Here's a collapsible tool of this same data: https://jsoneditoronline.org/#left=cloud.fc62383d0a2d4d8d9fcc8a8cc1f54d06
{
"normalizedInput": {
"line1": "4215 South 28th Street",
@jhannah
jhannah / discord.md
Last active November 18, 2019 06:06
Discord audio output - 2 levels
  1. Download Virtual Audio Cable (VAC) - free to start
  2. Download Voice Meter - free to start
  3. Discord output goes to 1st (free) VAC
  4. Inside Voice Meter:
    1. Set hardware input to VAC
    2. Set hardware output to headphones
  5. Inside SLOBS:
    1. Create new audio device: VAC
  6. Should anything go wrong, Check Windows Sound Mixer:
  7. Check VAC, make sure Discord is unmuted.
@jhannah
jhannah / gist:13132fadbdbc3da5442ff9e12d59b3ed
Last active November 8, 2019 00:29
custom print run en.anaisfae.art/art shirts (Omaha, Nebraska USA)
1 shirt Reverie (Steph dark grey XXL)
1 shirt Divine (me XXLT)
2 shirts Nightbringer (me XXLT, Nick S)
1 shirt Offering (me XXLT)
"anaisfae.art" in font 'nantronte' on the top back.
5 shirts = $75 USD PayPal to [email protected]
print shop: $32-35 USD per shirt = $175 USD