Skip to content

Instantly share code, notes, and snippets.

View jhannah's full-sized avatar

Jay Hannah jhannah

View GitHub Profile
@jhannah
jhannah / gist:66bbd0f6ef8f16a9b36420d17c556c8d
Last active August 18, 2023 00:51
YOLO'ing crazy scary freshli-cli git stuff for funsies
-----------------------------------------------------------------------------------------------
So I'm taking my Fork:
https://github.com/jhannah/freshli-cli of the real repo
https://github.com/corgibytes/freshli-cli
And doing CRAZY SCARY STUFF to try to help.
Thread: https://mastodon.social/@[email protected]/110900945626250599
Using tecniques from https://stackoverflow.com/a/37001417/4656035
@jhannah
jhannah / mn.md
Last active May 24, 2023 18:11
Minnesota progressive bills passed 2023

"How about some good political news for once? Minnesota passed like 35 bills because their moderates actually decided to work with progressives to get things done" ~from Twitter thread

cool worker stuff:

  • all employees statewide get paid leave
  • non-compete agreements are banned
  • uber and lyft drivers have more protections
  • and more!

cool education stuff:

  • school lunch is free for everyone
@jhannah
jhannah / gist:4abd9672807eb7201a6db35360ad98c4
Created March 3, 2023 18:47
lol huey's vet records make him look like he's a cage fighter who is losing waaaay too many of his fights
02/27/2023 12:00 AM Antisedan Injection - 5mg/ml 1.00
02/27/2023 12:00 AM Canine Bordetella Oral Vaccination Watch Video 1.00
02/27/2023 12:00 AM Canine DA2PP-L Vaccination Watch Video 1.00
02/27/2023 12:00 AM Sedation, IV Dexdomitor/Torbutrol 1.00
02/27/2023 12:00 AM Examination w/ Vaccinations Watch Video 1.00
02/27/2023 12:00 AM Heartworm Test, Antigen Well Watch Video Interactive Animal 1.00
02/20/2023 12:00 AM Acepromazine 25mg 2.00
02/20/2023 12:00 AM Examination w/ Vaccinations Watch Video 1.00
02/20/2023 12:00 AM Gabapentin 600mg Tablets 3.00
02/20/2023 12:00 AM Trazodone 100mg tablets 8.00
@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 September 8, 2025 02:41
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