Skip to content

Instantly share code, notes, and snippets.

View bengolder's full-sized avatar

Ben Golder bengolder

  • Binti
  • Oakland, CA, USA
  • 08:28 (UTC -08:00)
View GitHub Profile
{
"fields": [
{
"Arrested outside SF": "No"
},
{
"How did you hear about the Clean Slate Program": "From a wonderful friend"
},
{
"US Citizen": "Yes"
@bengolder
bengolder / get_fields_result.json
Created May 18, 2016 02:55
PDFParser sample `get_fields` output
{
"appearance": {
"font": 0,
"fontSize": 1,
"fontColor": 2
},
"fields": [
{
"name": "Given Name Text Box",
"value": "Gaurav",
SELECT
patients.id as patient_id,
count(distinct vaccines.immunization_date)
FROM patients, vaccines
WHERE
patients.id = vaccines.patient_id
/* make sure they are between 2 and 5 years old. */
AND "patients"."age" BETWEEN 2 AND 5
/* make sure they have never had a varicella vaccine of any sort */
AND patients.id NOT IN (
[{'name': 'Address City', 'type': 'text'},
{'name': 'Address State', 'type': 'text'},
{'name': 'Address Street', 'type': 'text'},
{'name': 'Address Zip', 'type': 'text'},
{'name': 'Arrested outside SF',
'options': ['No', 'Off', 'Yes'],
'type': 'button'},
{'name': 'Cell phone number', 'type': 'text'},
{'name': 'Charged with a crime',
'options': ['No', 'Off', 'Yes'],
@bengolder
bengolder / field_data.py
Created March 13, 2016 01:12
Output from pdftk_wrapper with a larger sample of field types
{'Check Box1': {'FieldFlags': '0',
'FieldJustification': 'Left',
'FieldName': 'Check Box1',
'FieldStateOption': ['Off', 'Yes'],
'FieldType': 'Button',
'FieldValue': 'Yes',
'fdf': {'escaped_name': 'Check Box1',
'name': 'Check Box1',
'name_span': (243, 253),
'value_template': '/Yes',
@bengolder
bengolder / deco.py
Created March 5, 2016 00:14
Some interesting behavior of decorators and patching
from deco_lib import my_decorator
@my_decorator
def my_view():
print("in the view!")
@bengolder
bengolder / css.md
Created July 2, 2015 19:05
UI components for screener style guide

What we currently have

UI Pieces

  • layout
    • header bar
    • width/layout breaks
    • page titles
  • images (& thumbnails)
  • maps
- organization: Daily Planet
main_phone: 804-783-2505
locations:
- name: The Daily Planet
address: 517 W Grace St.
phone: 804-783-2505
services:
- primary care
- oral health
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width" />
<title>touch test</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.5/p5.min.js"></script>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">