Skip to content

Instantly share code, notes, and snippets.

View tommeagher's full-sized avatar

Tom Meagher tommeagher

View GitHub Profile
@GabeIsman
GabeIsman / notes.md
Last active January 18, 2017 21:18
Some quick notes on introducing a basic programmer's tool kit to new programmers.

The Keyboard

This may sound obvious, but typing is a lot faster than navigating with the mouse. Whenever possible you should be using hotkeys. You will become faster at doing everything on a computer. If you find yourself doing something over and over again, find a way to make it faster. Get in the habit of automating these repetitive tasks.

OS X

  • Cmd+tab flips between running programs, in order of last used.
  • Cmd+~ flips between open windows of a running program.
  • Cmd+space opens a search bar for finding anything: app, file, etc.
  • Cmd+, open the preferences/settings of the active program.

Iterm

@cjwinchester
cjwinchester / lol.py
Created May 5, 2016 23:20
hey buddy i got something for you here [fishes around in pocket]
import turtle
t = turtle.Pen()
t.left(180)
t.up()
t.forward(60)
t.down()
t.right(90)
t.forward(60)
t.left(90)
@dannguyen
dannguyen / _README.md
Last active January 20, 2016 07:16
Scripts to autodownload and organize the California kindergarten immunization data files

Fetching and collating the California Kindergarten immunization data in Python and Bash

by Dan Nguyen @dancow

tl;dr: a quick example of practicing reproducible data journalism, and somewhat timely given the recent school vaccination law signed by California Gov. Jerry Brown

These are scripts that are part of the mundaneprogramming.github.io repo for SRCCON 2015 and will soon have their own entry/explanation on that site. They aren't meant to be best/canonical practices (e.g. I felt like using csv.DictWriter so there it is), nor do I guarantee that they work. But you're free to run them to see what happens. All they currently do is download the relevant spreadsheets and compile them into a file, which ends up being one of the most tedious parts of the entire investigation due to how the [files are organized on the home

@risatrix
risatrix / gist:ceabdf7e8d00f9dbdd38
Last active February 10, 2016 23:13
Texas Tribune Pull Request Template

Here's our template for what should go in a pull request. This seems overly-verbose, but will help us:

  • manage technical debt
  • link pull requests to sprint tasks
  • give future developers a lot more context
  • give reviewers the context they need to understand the problem you're trying to solve and the acceptance criteria you're trying to meet.

It's nice, but not required to fill everything out when you first open your pull request. This template shouldn't be a barrier to contributing code - and you can open a PR with the words WIP in front, to let us know it's not quite there yet, then go back and update information at any time.

@tommeagher
tommeagher / #NICAR18 advice
Last active March 9, 2018 13:47
Note to self for #NICAR16
Next year, try to:
* Drink more water.
* Drink less coffee, beer and whiskey.
* Eat a vegetable, it won't kill you.
* Get up and hit the gym in the morning.
* Leave the hotel at least once every day.
* Bring extra charging cords and a powerstrip. Write your name on the supplies you lend out. (@ecarewgrovum)
* Eat meals with parties of 4. It's much easier to get a table in a busy town. For big groups, just get drinks.
* Split into smaller groups, if you take a large party to dinner, and you have to wait forever. (@chrislkeller)
class Document < ActiveRecord::Base
include HTTParty
format :json
base_uri "https://www.documentcloud.org"
debug_output $stdout # optional
def update_published_url
self.class.put("/api/documents/#{self.dc_id}.json",
basic_auth: {
username: ENV['DOCUMENTCLOUD_USERNAME'],
# These are shell functions to quickly create pansharpened RGB images ready for color correction
# from a set of raw Landsat 8 TIF files in a given directory.
# For example:
# l8_pansharp LC81690352014169LGN00
# Creates:
# LC81690352014169LGN00_rgb_pansharp.tif
# l8_rush_pansharp downloads a L8 tile from Google Storage (if they have it), extracts the relevant bands, then creates the pansharpened output.
@bertspaan
bertspaan / README.md
Created January 2, 2014 15:28
Python script to convert DBF database file to CSV