Skip to content

Instantly share code, notes, and snippets.

View aresnick's full-sized avatar

Alec Resnick aresnick

View GitHub Profile
@aresnick
aresnick / typography_helper.rb
Last active December 10, 2015 05:48 — forked from anonymous/typography_helper.rb
'svn import' of typography_helper for Liquid templates, via https://code.google.com/p/typography-helper/ -- put into form of a Jekyll plugin
# _plugins/typography_helper.rb
module Jekyll
# TypographyHelper
# basic typographical substitutions by luke hartman <http://mrturtle.com>
module TypographyHelper
# converts a & surrounded by optional whitespace or a non-breaking space
# to the HTML entity and surrounds it in a span with a styled class
def amp(text)
@aresnick
aresnick / Junot Diaz and Hilton Als at the Strand Bookstore (12 April 2013).md
Created November 26, 2013 13:39
A wonderful interview between Junot Diaz and Hilton Als at the Strand Bookstore, recorded 12 April 2013. Transcribed by an amateur (me); places where the proper transcription was unclear to me indicated with brackets []--feel free to clone, fix/edit, and let me know if git and github's your thing (you can read more about this at http://bit.ly/19…

Junot Diaz and Hilton Als at the Strand Bookstore (12 April 2013)

Hilton Als: Junot and I are physically fucked up. He's standing because he has a terrible back issue, and I've had a shoulder issue, so we are a fine pair tonight, but we are going to make a lot of fun for you. I wanted to say this in front of Juno because it will embarrass him, and thus relax him.

Among the many, many things I wish could do, I wish I could write a story like Junot Diaz, because his stories contain so much you don't where they start and where they begin, like nature, but in the end I don't want to write a Junot Diaz story, because I want Junot to write his own stories. Tales that are so emotionally specific everyone can relate to them, even if they aren't Dominican, or straight, or doing crazy things in love.

I hate hackneyed terms like "universal" but in Junot's case it's true; he's a universal writer, or, more specifically, a universalist. He wants to see people as they are and as they relate to other people, but he

via Socialism: Converting Hysterical Misery into Ordinary Unhappiness for a Hundred Years

There is a deeper, more substantive, case to be made for a left approach to the economy. In the neoliberal utopia, all of us are forced to spend an inordinate amount of time keeping track of each and every facet of our economic lives. That, in fact, is the openly declared goal: once we are made more cognizant of our money, where it comes from and where it goes, neoliberals believe we’ll be more responsible in spending and investing it. Of course, rich people have accountants, lawyers, personal assistants, and others to do this for them, so the argument doesn’t apply to them, but that’s another story for another day.

The dream is that we’d all have our gazillion individual accounts—one for retirement, one for sickness, one for unemployment, one for the kids, and so on, each connected to our empl

["[...] the ideas of economists and political philosophers, both when they are right and when they are wrong, are more powerful than is commonly understood. Indeed the world is ruled by little else. Practical men, who believe themselves to be quite exempt from any intellectual influence, are usually the slaves of some defunct economist. Madmen in authority, who hear voices in the air, are distilling their frenzy from some academic scribbler of a few years back. I am sure that the power of vested interests is vastly exaggerated compared with the gradual encroachment of ideas. Not, indeed, immediately, but after a certain interval; for in the field of economic and political philosophy there are not many who are influenced by new theories after they are twenty-five or thirty years of age, so that the ideas which civil servants and politicians and even agitators apply to current events are not likely to be the newest. But, soon or late, it is ideas, not vested interests, which are dangerous for good or evil."](

@aresnick
aresnick / 1 - BB.js
Last active August 29, 2015 14:00
A demo of interacting with the BeagleBone via browser
// the node library we use for interacting with the BeagleBone
var b = require('bonescript');
// the webserver we'll use on the BB
var app = require('http').createServer(httpserver);
app.listen(8080); // listen on which port?
b.pinMode("P9_14", b.OUTPUT); // configuring this pin for output
@aresnick
aresnick / Dropbear Key Reset for BeagleBone.js
Created May 2, 2014 12:18
Fix for corrupt Dropbear host file for BeagleBone
// Fix for corrupt Dropbear host file, found via http://nucleussystems.com/blog/ssh-on-the-beaglebone-black/
// Run in the Cloud9 IDE at 192.168.7.2:3000
var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';
fs.readFile(destroyed_key_file, function(err, data) {
if (err) throw err;
if (data === null || data.length === 0) {
@aresnick
aresnick / BBConnect.py
Created May 8, 2014 20:50
BeagleBone Black sshfs mirror
#!/usr/bin/env python
import subprocess
# This installs pip; if you already have it, comment out the next three lines
subprocess.call(['curl', '-O', 'https://bootstrap.pypa.io/get-pip.py'])
subprocess.call(['chmod', '755', 'get-pip.py'])
subprocess.call(['python get-pip.py'], shell=True)
@aresnick
aresnick / .bashrc
Created January 28, 2015 16:41
Recommended .bashrc for DGMD E-15
# Setting Sublime Text as our default editor
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
export EDITOR='subl -w'
# Telling our shell where to find the stuff we install with node
export NODE_PATH='/usr/local/lib/node_modules:/usr/local/lib/node'
export PATH=$NODE_PATH:$PATH
# Telling our shell where to find the stuff we install with Homebrew
export PATH=/usr/local/bin:$PATH
@aresnick
aresnick / .gitconfig
Created January 28, 2015 16:42
Recommended .gitconfig for DGMD E-15
[color]
ui = true
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
@aresnick
aresnick / setup_course_site.sh
Last active August 29, 2015 14:14
Basic CLI setup for DGMD E-15 course site
###############################################################################################
# Steps to install the basic tools needed for the `/people` activity
# Run each line separately, except for the ones beginning with a `#`—
# The output will be long and complex, but watch to see if you get any message that seems like an error or problem. Stop and resolve that before continuing
# Install Apple's Command Line Tools
xcode-select --install
# Install Homebrew, a nice package manager for Mac
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"