Skip to content

Instantly share code, notes, and snippets.

View alykat's full-sized avatar

Alyson Hurt alykat

View GitHub Profile
@alykat
alykat / dailygraphics.applescript
Last active June 7, 2016 15:15 — forked from dannydb/gist:74399d474ed14da3637b
NPR dailygraphics launcher from iTerm2
tell application "iTerm"
activate
tell the current terminal
activate current session
-- launch dailygraphics tab
launch session "Default Session"
tell the last session
set name to "dailygraphics"
@alykat
alykat / gist:5fabb42475a6111ccc38591bac09550a
Created April 1, 2016 21:18
D3: Wrap label text and make SVG taller
/*
* Wrap a block of text to a given width
* via http://bl.ocks.org/mbostock/7555321
*/
var wrapText = function(texts, width, lineHeight) {
texts.each(function() {
var text = d3.select(this);
var words = text.text().split(/\s+/).reverse();
var word = null;
@alykat
alykat / iterm_dgnext.scpt
Last active January 28, 2019 16:02
AppleScript to launch a three-paned iTerm2 window for nprapps/dailygraphics-next
tell application "iTerm"
tell current window
tell current session
-- dailygraphics-next tool pane
set name to "dailygraphics-next"
set webserver to (split vertically with default profile)
-- CHANGE path to your needs
write text "cd ~/src/dailygraphics-templates/"
write text "git pull"
-- CHANGE path to your needs