Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block ptrin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ptrin / 0-add-id-to-error-div.jsx
Last active Nov 13, 2019
Formik a11y examples
View 0-add-id-to-error-div.jsx
<ErrorMessage name="firstName">
{msg => (
<div id="firstName-error" className="invalid-feedback">
ptrin /
Created Jul 14, 2019
Fable Consulting Opportunity

Consulting opportunity:

At Fable, we’ve built an online platform that connects researchers, designers, and developers to people with disabilities, with the goal of making it easier to create accessible digital products.

We have upcoming projects that involve conducting accessibility research remotely, through moderated and unmoderated research, on various digital products. We are looking for someone who can manage a project, conduct the research, and lead the writing of reports. We don’t have exact dates of the projects yet, but anticipate some starting in August and completing before November. Further clarification on dates is expected soon.

What you’ll do:

  • Learn about the client’s digital products and production workflow to identify and establish user journeys for testing, a configuration matrix, and reporting structure
  • Use Fable’s platform to
#!/usr/bin/env python
import csv
import os
import re
import sys
print "Input file of pages to assess: "+sys.argv[1]
def slug(str):
"""Replace non-alphanumeric characters with hyphen"""
View Import and

Import and backup

  • Monthly dumps from phones, sometimes camera to ~/Pictures on laptop
  • Every time the external HD is mounted, the script runs to sync the ~/Pictures directory to the backup dir on the external - sometimes when I'm paranoid I run it manually and check to be sure it's working correctly
if [ -d "/Volumes/My Book" ]; then
    rsync -a /Users/perry/Pictures /Volumes/My\ Book/_backup;
    rsync -a /Users/perry/Library/Application\ Support/Google/Picasa3 /Volumes/My\ Book/_backup/Picasa\ Metadata;
ptrin / scrape.rb
Last active Aug 29, 2015
Small script to scrape plane data and download images from Canadian Warplane Heritage Museum website
View scrape.rb
require "fileutils"
require "httparty"
require "json"
require "nokogiri"
require "open-uri"
# strip domain from URL
def strip_domain(url)
View testui.js
var jsonTemplates = {
"test": '{' + "\n" +
' "property": "value"' + "\n" +
View index.js
var bodyParser = require('body-parser'),
express = require('express'),
http = require('http'),
sio = require('');
var app = express();
var server = http.createServer(app);
View vimrc
Plugin 'SirVer/ultisnips'
Plugin 'aalvarado/ultisnips-snippets'
Plugin 'rstacruz/vim-ultisnips-css'
def get_file_list(dir=options.source_dir):
""" Returns list of all html files in specified directory (recursive) """
fileList = []
print dir
for root, subFolders, files in os.walk(dir):
for file in files:
filepath = os.path.join(root,file)
if ".html" in filepath:
View gist:4134009
.something {
.something-else {
You can’t perform that action at this time.