Skip to content

Instantly share code, notes, and snippets.

View greglinch's full-sized avatar

Greg Linch greglinch

View GitHub Profile
@dwillis
dwillis / talks.md
Last active August 29, 2015 13:56
Lightning Talks NICAR 2014 Lineup
  1. Refactoring; or Why Your Code Sucks and How to Fix It, Christopher Groskopf
  2. A Few of My Favorite Wee Things, Lena Groeger
  3. Natural Language Processing in the kitchen, Anthony Pesce
  4. Five (more) algorithms in five (more) minutes, Chase Davis
  5. What we can learn from terrible data viz, Katie Park
  6. Practical Calculus, Steven Rich
  7. Detecting What Isn't There, Sisi Wei
  8. The whole internet in 5 minutes!, Jeremy Bowers
  9. How to Raise an Army, Tyler Fisher
  10. You Must Learn, Ben Welsh
@gotoplanb
gotoplanb / testrail-508-html
Last active August 29, 2015 14:00
508 checklist
* [ ] A1: Do images that convey contextual content have equivalent alternative text specified in the alt attribute of the img element?
* [ ] A2: Do images that are purely decorative, and not contextual, have empty, or null, alternative text specified, e.g. alt=""?
* [ ] A3: Does the alternate text convey contextual relevance to the page it is on?
* [ ] A4: Do images that convey complex content have longdesc attributes or equivalent text content available elsewhere on the page?
* [ ] A5: Does text content contained in images disappear when images are not available, i.e. is there text contained in the images?
* [ ] A6: Do image map area elements have the link destination correctly titled? If the title attribute is used, it ought not to duplicate the alt text.
* [ ] A7: Do form non-text controls, e.g. input type image, provide a text alternative that identifies the purpose of the non-text control?
* [ ] A8: Do noframes elements have appropriate equivalent or alternative content for user agents that do not suppor
@cmod
cmod / twitter_notifications_only.css
Created September 16, 2014 14:38
Twitter Notifications
/*
Just the Notifications, please
==============================
1. Make a Fluid (http://fluidapp.com/) instance of https://twitter.com/i/notifications
2. Apply the below CSS as a Userstyles stylesheet
3. Enjoy just the conversation, not the timeline
Why?
function menu_order_filter($menu) {
//
// reorder the menu here by operating on $menu
// which is an array with position => 'url';
// separators will appear as
// 'separator1', 'separator2' ... 'separator-last'
//
// example:
// Array
// (
@eyeseast
eyeseast / install.md
Last active September 20, 2015 01:17
Starting software for a programmer-journalist
@onyxfish
onyxfish / Advice from #djangocon 2010 Django-in-Journalism open-session
Created September 9, 2010 17:31
Advice from #djangocon 2010 Django-in-Journalism open-session
Suggestions from the 11 hackers at the table:
* Use connection pooling (pgpool).
* Don't expect reporters to get excited until you can show them something. (Find a way to appeal to reporters interests.)
* Only update what's changed. (e.g. on election results: show changes, not raw numbers)
* Use the AP's "dbready" format for election results.
* Use CSV for everything.
* Use pdb with runserver for debugging.
* Beware circular imports when using Haystack.
* Make the case for building news apps with government data. (Niran will provide numbers showing that people look at it.)
@eyeseast
eyeseast / documentcloud.py
Created December 15, 2010 03:00
A simple python wrapper for the DocumentCloud API
import httplib2
import urllib
try:
import json
except ImportError:
import simplejson as json
# create a global Http object so we can reuse connections
http = httplib2.Http('.cache')
<?php
/* use a regular expression to remove inline comments. in this case, everything gets removed if it's inside double at signs. @@so you could CQ this@@ */
function filter_remove_inline_comments($content) {
return preg_replace('/@@.*?@@/', '', $content);
}
add_filter('the_content', 'filter_remove_inline_comments', 5);
?>
var stateToAP = function(state) {
var STATES = [
["Alabama", "AL", "Ala.", 1],
['Alaska', "AK", "Alaska", 2],
["Arizona", "AZ", "Ariz.", 4],
["Arkansas", 'AR', "Ark.", 5],
["California", "CA", "Calif.", 6],
["Colorado", "CO", "Colo.", 8],
["Connecticut", "CT", "Conn.", 9],
["Delaware", "DE", "Del.", "10"],