Skip to content

Instantly share code, notes, and snippets.

View pkarman's full-sized avatar

Peter Karman pkarman

View GitHub Profile
@pkarman
pkarman / peter-karman-at-state-co-us-gpg-public-key
Created March 20, 2026 02:51
peter-karman-at-state-co-us-gpg-public-key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEaXNi/xYJKwYBBAHaRw8BAQdAx9KVyFtwfL0HHJcGHmbvoGUytsNjHcvif+q0
aabF4Ye0MFBldGVyIEthcm1hbiAoQ08ga2V5KSA8cGV0ZXIua2FybWFuQHN0YXRl
LmNvLnVzPoiTBBMWCgA7FiEE50kqYbFq9a5GUIuWuBDQhTfkcWgFAmlzYv8CGwMF
CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQuBDQhTfkcWibOQD9FeqH88zq
G+t3W0UZWShgugShj+6bq/Az0FibLdsJL98A/0hUWD4ROThmN9O8j81kMCieLAL2
LLf8R3gpln7NGcIJuDgEaXNi/xIKKwYBBAGXVQEFAQEHQGTbfW5LIISJy/2byHOk
ipn9uyK8F5XNetwaLvbr3foJAwEIB4h4BBgWCgAgFiEE50kqYbFq9a5GUIuWuBDQ
hTfkcWgFAmlzYv8CGwwACgkQuBDQhTfkcWjATQEAtzsIxnqMpJHFGFYR3CPrP28H
@pkarman
pkarman / github-team-norms-template.md
Last active August 21, 2021 00:04
Team norms for projects that use GitHub

Norms for teams that use GitHub

This template is designed as a list of examples, questions and/or prompts for teams to discuss as they build norms around using GitHub.

Repo layout

We prefer a directory layout that looks like:

  • README.md
  • CONTRIBUTING.md
@pkarman
pkarman / code-review-questions.md
Created April 14, 2021 20:10
things I value in a code review
  • Are there tests?
  • Are tests clearly testing (at least) the AC?
  • Are variables named helpfully?
  • Are methods and classes named helpfully?
  • Do code quality checks pass?
  • Were any code quality checks disabled?
  • Are comments helpful? (Do they repeat what's in the code, or explain why? prefer the latter)
SELECT "appeals".*
FROM "appeals"
WHERE "appeals"."established_at" IS NOT NULL
AND ( ( appeals.updated_at >= '2021/01/01' )
OR ( appeals.id IN (SELECT "request_issues"."decision_review_id"
FROM "request_issues"
WHERE ( request_issues.updated_at >=
'2021/01/01' )
AND
( request_issues.decision_review_type = 'Appeal' )
@pkarman
pkarman / caseflow-sso-notes.txt
Created May 28, 2020 19:23
Caseflow SSO notes
* How does Rails handle sessions?
* How does Rails handle authentication?
* How does SSO work?
* What went wrong?
@pkarman
pkarman / caseflow.csv
Created February 27, 2020 23:25
Caseflow schema
Table Column Type Required Primary Key Unique Index Description
advance_on_docket_motions
advance_on_docket_motions created_at datetime ∗ true false false
advance_on_docket_motions granted boolean false false false Whether VLJ has determined that there is sufficient cause to fast-track an appeal, i.e. grant or deny the motion to AOD.
advance_on_docket_motions id integer (8) PK true true false
advance_on_docket_motions person_id integer (8) FK false false false true Appellant ID
advance_on_docket_motions reason string false false false VLJ's rationale for their decision on motion to AOD.
advance_on_docket_motions updated_at datetime ∗ true false false true
advance_on_docket_motions user_id integer (8) FK false false false true
allocations
@pkarman
pkarman / open-tasks.rb
Created February 26, 2020 21:29
create csv of open tasks
vh = BusinessLine.find_by(url: 'vha')
rows = vha.tasks.open.includes(:appeal).order(id: :asc).map do
|t| [
t.appeal.intake&.user&.css_id,
t.id,
"https://appeals.cf.ds.va.gov/decision_reviews/vha/tasks/#{t.id}",
t.appeal_id,
t.appeal_type,
t.appeal.veteran_file_number,
t.created_at
RequestStore[:current_user] = User.system_user
rca = RampClosedAppeal.find 72882
# this should end in error
rca.reclose!
vacols_case_id = 3415206
# double check at each step
@pkarman
pkarman / Makefile
Last active November 21, 2018 16:53
ready:
h=`docker-compose ps | grep healthy`; while [ "$$h" == "" ]; do h=`docker-compose ps | grep healthy`; echo $$h; sleep 1; done
up:
docker-compose up -d
run: up ready
foreman start
test: clean
@pkarman
pkarman / bootstrap.pl
Created August 15, 2018 20:18
bootstrap PRX ID/Exchange/Metrics/Publish in dev
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dump qw( dump );
sub run {
my $c = shift;
my $cmd = "docker-compose -f my-docker-compose.yml run id -- $c";
print $cmd, $/;
my @out = `$cmd`;