- don't blow your deadline
- don't be wrong
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # Fixing key bindings for `irb` | |
# | |
# when your ruby comes from `brew`, `rbenv`, and arrow keys don't work in your `irb` | |
brew upgrade readline rbenv ruby-install # ensure we have the `readline` library, and a recent version of `ruby-install` which will link to it properly when building `ruby`. | |
rbenv install <your-favourite-ruby-version> # rebuild ruby. | |
# watch out for the message 'ruby-build: use readline from homebrew' in output from the command above, | |
# then, go get some coffee. | |
# ... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright (c) 2015, Paul Ford, [email protected] | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from random import choice | |
import time | |
b = webdriver.Firefox() | |
b.get("http://www.nytimes.com/interactive/2013/09/02/sports/tennis/tennis-grunts-soundboard.html") | |
grunt_div = b.find_element_by_id('nytmm') | |
face_divs = grunt_div.find_elements_by_tag_name('div') | |
interval = [float(s)/100 for s in range(50,151,1)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage: | |
When generating a page: | |
var abTest = new AbTest('your-test-slug'); | |
if (abTest.variation == 0) | |
$('#thediv').addClass('red'); | |
else if (abTest.variation == 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data Reporter | |
The Huffington Post is looking for a data reporter to join our data journalism desk. | |
You'll work on a small team in the Huffington Post newsroom in New York City, using math and | |
computer programming to help readers explore and understand the data behind the news. You'll | |
pitch, design and develop data-driven news stories, interactive databases, and static, interactive | |
and real-time graphics. | |
You're passionate about finding and telling stories through data. You have good news |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 | |
from django.http import HttpResponseRedirect, Http404, HttpResponse | |
from django.template import RequestContext | |
from django.core.cache import cache | |
import iso8601 | |
from pollster import Pollster | |
def presidentmatch(request): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'nokogiri' | |
class PublicFileCrawler | |
def initialize(params={}) | |
@call_sign = params[:call_sign] | |
@url = "https://stations.fcc.gov/station-profile/#{@call_sign}/political-files/browse-%3e2012" | |
@checked = {} | |
@found = {} |
NewerOlder