Skip to content

Instantly share code, notes, and snippets.

View albertsun's full-sized avatar

Albert Sun albertsun

View GitHub Profile

Data, Narratives and Uncertainty

Ideas for 2014

Dots

December has been a contemplative month, and January is going to be hectic.

I don't believe in setting goals or making resolutions for the New Year. Usually I just let the New Year pass by. But there are ideas circulating in my head that I know I want to spend more time figuring out in 2014 — these ideas are half-baked but I don't want to forget them.

One idea I'm grappling with is the relationship between data and narrative and how to communicate uncertainty.

@albertsun
albertsun / .gitconfig
Created October 3, 2013 20:39
git aliases
[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit --all
dfb = log --left-right --graph --cherry-pick --oneline
@albertsun
albertsun / gist:1934619
Created February 28, 2012 19:37
brew install -v postgresql
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.3/postgresql-9.1.3.tar.bz2
File already downloaded in /Users/204377/Library/Caches/Homebrew
/usr/bin/tar xf /Users/204377/Library/Caches/Homebrew/postgresql-9.1.3.tar.bz2
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.3 --datadir=/usr/local/Cellar/postgresql/9.1.3/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-ossp-uuid --with-python --with-perl ARCHFLAGS='-arch x86_64'
./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.3 --datadir=/usr/local/Cellar/postgresql/9.1.3/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-ossp-uuid --with-python --with-perl ARCHFLAGS='-arch x86_64'
checking build system type... x86_64-appl
# Make sure ctypes can find simple tiles
import ctypes
from ctypes import *
from ctypes.util import find_library
library = ctypes.CDLL(find_library("simple-tiles"))
simplet_map_new = library.simplet_map_new
simplet_map_new.restype = POINTER(c_void_p)
map_p = simplet_map_new()
print(type(map_p))
@albertsun
albertsun / gist:1820839
Created February 13, 2012 22:00
kind of fun
/* run on
http://www.nytimes.com/interactive/2012/02/13/us/politics/2013-budget-proposal-graphic.html
*/
setInterval(function(){ console.log("grav .3"); nytg.c.force.gravity(0.05).start();}, 3000);
setTimeout(function(){
setInterval(function() { console.log("grav 0"); nytg.c.force.gravity(0).start(); }, 3000)
}, 2000);
setInterval(function(){ console.log("grav .3"); nytg.c.force.gravity(0.05).start();}, 3000);
setTimeout(function(){
setInterval(function() { console.log("grav 0"); nytg.c.force.gravity(0).start(); }, 3000)
@albertsun
albertsun / .tmux.conf
Created February 13, 2012 19:27
tmux conf
unbind C-b
set -g prefix `
set -g default-terminal "screen-256color"
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]'
set-window-option -g window-status-current-bg red
@albertsun
albertsun / dostuff.py
Created February 12, 2012 21:33
management command
from django.core.management.base import NoArgsCommand, CommandError
from django.core import management
class Command(NoArgsCommand):
help="Run a command"
def get_version(self):
return "0.1"
def handle_noargs(self, **options):
@albertsun
albertsun / gist:1696891
Created January 29, 2012 02:45 — forked from brianboyer/gist:1696819
Lion dev environment notes
Homebrew (https://github.com/mxcl/homebrew/wiki/installation)
brew install postgres
brew install gdal --with-postgres (EDIT THE FORMULA FIRST, see https://github.com/mxcl/homebrew/issues/8301)
brew install postgis
edit /etc/paths to put /usr/local/bin on top, so that lion's psql doesnt win
PostGIS templates (based on https://wiki.archlinux.org/index.php/PostGIS)
createdb template_postgis -E UTF8
createlang plpgsql template_postgis
psql -d template_postgis -f /usr/local/share/postgis/postgis.sql
/*jslint white: false, debug: false, devel: true, onevar: false, plusplus: false, browser: true, bitwise: false */
/*global jQuery: false, $: false, Raphael: false, window: false, Box: false, tmpl: false */
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;