Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thecristen
thecristen / README.md
Last active August 29, 2015 14:05 — forked from bycoffe/README.md

This is forked from bycoffe!!! Please see there for more instruction.

I am going to modify this to show cool (but made up) data.

@thecristen
thecristen / fixtures.rake
Last active August 29, 2015 14:27 — forked from ZachBeta/fixtures.rake
Rake task to create fixtures from test database in Rails 3.1
#put in lib/tasks/fixtures.rake
namespace :db do
namespace :fixtures do
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
task :dump => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_migrations"]
ActiveRecord::Base.establish_connection(:development)
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
@thecristen
thecristen / getPrettyJSON.rb
Created August 24, 2015 21:22
take a url that returns a json response and print it all pretty
require 'json'
require 'net/http'
def getPrettyJSON(url)
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
p = JSON.parse(response.body)
return JSON.pretty_generate(p)
@thecristen
thecristen / a11y-checklist-standards.md
Last active March 12, 2016 13:56
forked off IBM Web accessibility checklist - Version 5.2

IBM Web accessibility checklist - Version 5.2

http://www-03.ibm.com/able/guidelines/web/accessweb.html

  • 1.1 Text alternatives: Provide text alternatives for all non-text content so that it can be changed into other forms people need, such as large print, Braille, speech, symbols or simpler language.
  • 1.1a Text alternatives. All non-text content that is presented to the user has a text alternative that serves the equivalent purpose.
  • 1.1b Non-text content. A descriptive label is provided for time-based media, including live audio-only and live video-only content. Non-text content that is used to confirm that content is being accessed by a person rather than a computer is available in different forms to accommodate multiple disabilities.
  • 1.1c Image maps. Client-side image maps are used and alternative text is provided for image map hot spots. Equivalent text links are provided if a server-side image map is used.
  • [ ]
@thecristen
thecristen / README.md
Created March 13, 2016 21:01 — forked from awoodruff/README.md
Dot density map

This is an attempt at a slightly D3-ish way of drawing a dot density map on a canvas element. In short, each polygon is drawn (invisibly) with a unique color, then random points are thrown at polygon bounding boxes and the pixel color is used for a point-in-polygon test. This example draws one dot for every 2 people in central Boston census blocks, for a total of approximately 132,000 dots.

@thecristen
thecristen / .block
Last active October 26, 2017 20:21
Accessible country selector map widget
license: cc-by-sa-3.0
height: 800
border: no
We can't make this file beautiful and searchable because it's too large.
"CASE_NUM","CASE_YR","REF_MRKR","ACCD_DTE","ROAD_SYS","NUM_OF_FATALITIES","NUM_OF_INJURIES","REPORTABLE","POLICE_DEPT","INTERSECT_NUM","MUNI","PRECINCT","NUM_OF_VEH","ACCD_TYP","LOCN","TRAF_CNTL","LIGHT_COND","WEATHER","ROAD_CHAR","ROAD_SURF_COND","COLLISION_TYP","PED_LOC","PED_ACTN","EXT_OF_INJURIES","REGN_CNTY_CDE","LOW_NODE","HIGH_NODE","ACCD_TME","RPT_AGCY","DMV_ACCD_CLSF","ERR_CDE","COMM_VEH_ACC_IND","HIGHWAY_IND","INTERSECT_IND","UTM_NORTHING","UTM_EASTING","GEO_SEGMENT_ID","GEO_NODE_ID","GEO_NODE_DISTANCE","GEO_NODE_DIRECTION","GEO_LCODE"
"33274808",2010,"","2010-01-05 00:00:00","12",1,0,"Y","03030","","01","007",1,"03","Y","01","1","1","1","1","09","2","14","K","N3","","","2010-01-05 16:02:00","NYC PD","1","011","3","N","Y",4508040.91,585391.79,429082113,169972,0,"3",2
"33308985",2010,"","2010-01-02 00:00:00","09",0,1,"Y","03030","","01","030",1,"02","Y","02","1","2","1","2","09","2","13","C","N3","","","2010-01-02 07:00:00","NYC PD","2","011","1","N","N",0,0,0,0,0,"",12
"33309028",2010,"","2010-01-02