Skip to content

Instantly share code, notes, and snippets.

View bengolder's full-sized avatar

Ben Golder bengolder

  • Oakland, CA, USA
  • 13:41 (UTC -07:00)
View GitHub Profile
@bengolder
bengolder / center-aligned_form---multiple_fields.html
Last active September 7, 2018 17:45
GCF 5.0 Layout HTML Sketches (doesn't yet include signpost or confirmation types)
<!DOCTYPE html>
<html>
<head>
<!-- The title should just be the main question in the center-aligned form -->
<!-- If there are two questions, We define an explicit title -->
<title>Let's calculate your monthly income. | GetCalfresh.org</title>
<!-- When there are errors, prepend them -->
<title>We need you to fix 2 answers on this page. | Let's calculate your monthly income. | GetCalfresh.org</title>
<fieldset>
<legend id="dob__legend">
<span class="errors">Feb 30th does not exist</span>
<span class="form-question">When did you enter this world?</span>
<span class="text--help">Like, born or whatever</span>
</legend>
<label id="dob_month__label" for="dob_month" class="sr-only">Month</label>
<select name="dob[month]" id="dob_month" aria-labelledby="dob__legend dob_month__label">
<option value="1">January</option>
...
@bengolder
bengolder / example.html
Created February 9, 2018 17:44
keyboard navigation HTML examples
<!-- Don't mess with tab index -->
<div tabindex="3">This is BAD</div>
<!-- Use semantic tags to structure the page -->
<!-- Don't skip heading levels -->
<!-- Use a single h1 for the page title -->
<main>
<article>
<header>
<h1>The title of this page.</h1>
@bengolder
bengolder / examples.rb
Created February 9, 2018 17:15
Axe matchers example
# Gemfile
group :test do
gem "axe-matchers"
end
# feature spec
RSpec.feature "Medicaid app" do
scenario "with maximum info", :js do
on_pages "Introduction" do
expect(page).to be_accessible
@bengolder
bengolder / followups_query.rb
Created December 11, 2017 22:39
SNAP application Follow up query
SnapApplication.where("sms_consented = ? AND id >= 205 AND id <= 361", true,).each do |app|
puts [
app.id,
app.primary_member.first_name,
app.primary_member.last_name,
app.email,
app.phone_number,
app.sms_consented,
].join("\t")
end
@bengolder
bengolder / jetbrains_shortcuts.md
Last active October 24, 2017 22:47
JetBrains Shortcuts for RubyMine & PyCharm

JetBrains Shortcuts for RubyMine & PyCharm

Key Combo Action
ShiftO Open a file by file name
O Open a symbol (class or function name)
E Show recent files
ShiftShift Search Everywhere
K Prep for git commit (click on a file and use F7 to navigate through diffs)
CtrlShiftR Run the current test scope (based on cursor location)
@bengolder
bengolder / loggin_requirements.md
Last active July 27, 2017 18:51
CJIS Audit Logging Requirements

Event Types

The following events shall be logged:

  1. Successful and unsuccessful system log-on attempts.

  2. Successful and unsuccessful attempts to use:

    1. access permission on a user account, file, directory or other system resource;
    2. create permission on a user account, file, directory or other system resource;

Definitely agree with the county selection stuff, looks far better

  • Caveat: it feels like a significant innovation for multi-jurisdiction selection (not lots of comparables or known patterns)
  • Could use some validation, how should we validate this selection technique?
  • Can we isolate and test w/ usertesting.com?
    • Possible test questions that ask same task:
      • Where have you lived in California?
      • Where do you have friends in California?
      • Where do you have family in California?
  • What would be the most proximate alternatives?
    • it'll probably be text or copy changes

Access Controls and Auditability

Goals:

  • Default to requiring authentication, intentionally override where necessary
  • Default to checking for object or queryset permissions, intentionally override where necessary
  • Default to logging access and actions for later audit, override where necessary
  • Ensure maintainability by creating one well-known way to implement, and adding checks to ensure proper implementation

What do we want in our audit logs?

Event Refactor

Reasons

  • ApplicationEvents are hyper focused on applicants. We need events focused on visitors
  • We Also need org user events
  • we want full funnel metrics (from visitor to applicants to followups and on)
  • We will need auditable events
  • types and uses of events are conflated
  • hard to know if where we send PII to mixpanel