Skip to content

Instantly share code, notes, and snippets.

Garrett Wilkin garrettwilkin

Block or report user

Report or block garrettwilkin

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
View gist:42a31d5e7d38dc30442f
{
"metadata": {
"name": "",
"signature": "sha256:bfb449ef2b39f66d75879e049a1f0d9796b61e32908ed1c1f3bd00ec7dcf56ee"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View hackingjournalism-apis.md

#API Partners at Hacking Journalism

##API Intros There will be API intros to some of the APIs. These will be running through the afternoon on Saturday.

  • 2:00 pm Embedly
  • 2:30 pm Parse.ly
  • 3:00 pm Twitter
  • 3:30 pm Enigma
  • 4:00 pm MuckRock
  • 4:30 pm Guardian
@garrettwilkin
garrettwilkin / data_stories.md
Created Sep 4, 2014
Data driven storytelling.
View data_stories.md

The Data Driven Narrative

As more data that describes politics, finance, governance, and social issues becomes available, new opportunities are created for technologists to inform the public. Here are a few great examples of tools which allow the user experience a situation and learn through interacting with the data.

  1. Rent vs Buy Calculator
  2. 2013 Federal Budget Proposal
  3. Senate Forecast
@garrettwilkin
garrettwilkin / views.py
Created Feb 12, 2015
views.py in django app that runs planout
View views.py
from django.shortcuts import render, HttpResponse
from django.http import HttpResponseNotAllowed, HttpResponseBadRequest
import logging
from planout.experiment import SimpleExperiment
from planout.experiment import DefaultExperiment
from planout.namespace import Namespace
from planout.namespace import SimpleNamespace
from planout.ops.random import *
import json
@garrettwilkin
garrettwilkin / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View apt-get & npm link logs
View mdns 0.0.5 node-waf -v configure build
garrett@li284-151:~/mdns/agnat-node_mdns-d979f84$ node-waf -v configure build
Setting srcdir to : /home/garrett/mdns/agnat-node_mdns-d979f84
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for header dns_sd.h : 13:04:38 runner system command -> ['/usr/bin/g++', '-g', '-I/usr/local/include', '../test.cpp', '-c', '-o', 'default/test_1.o']
@garrettwilkin
garrettwilkin / Failing at linking Hook.io
Created Feb 27, 2012
This is me, trying to install hook.io since it won't come down with NPM 1.1, i'm trying it manually
View Failing at linking Hook.io
Linking in the hook.io folder:
-----------------------------
garrett@li284-151:~/hook.io$ sudo npm link
npm WARN eyes@0.1.7 dependencies field should be hash of <name>:<version-range> pairs
npm http GET https://github.com/substack/socket.io-client/tarball/master
npm http 200 https://github.com/substack/socket.io-client/tarball/master
/usr/local/bin/hookio -> /usr/local/lib/node_modules/hook.io/bin/hookio
/usr/local/lib/node_modules/hook.io -> /home/garrett/hook.io
View Some crazy advanced stuff going on here...
for (var f in HTTP) {
typeof HTTP[f] === 'function' && (this.HTTP[f] = HTTP[f].bind(this));
}
for (var member in provider) {
if (typeof provider[member] === 'function') {
if (member === 'HTTP' || member === 'provider') {
throw new Error('API object or function name `' + member + '` is reserved');
}
@garrettwilkin
garrettwilkin / .vimrc
Created Apr 17, 2012
.vimrc file when jslint causes input errors
View .vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vungle manage Vundle
" required!
Bundle 'gmarik/vundle'
You can’t perform that action at this time.