Skip to content

Instantly share code, notes, and snippets.

View aresnick's full-sized avatar

Alec Resnick aresnick

View GitHub Profile
@aresnick
aresnick / dgmde15-setup.sh
Created January 30, 2016 16:55 — forked from shduff/dgmde15-setup.sh
a few final computer set-up steps for participants in DGMD E-15 at the Harvard Extension School Program
#################################################################
# Steps to install the basic tools needed for working
# with Git and Github for the DGMD Summer 2015 Program
# Run each of these lines separately in your terminal
# Check that your system is set up appropriately for Homebrew, you'll see a bunch of output, but you'll want to skim to see if you see any "Warning"s—if you do, Homebrew will have a "You should probably" line suggesting how to remedy it.
brew doctor
# Update homebrew's package listing
brew update
@aresnick
aresnick / install_pdftk.sh
Created November 25, 2015 23:19 — forked from rmehner/install_pdftk.sh
Install PDFTk without touching up the permissions
#!/usr/bin/env bash
# This is based on this excellent gist https://gist.github.com/jvenator/9672772a631c117da151
# Nothing of this is my original work, except that I made the download link an argument
# to this script, so it installs on OSX 10.11
#
# Thank you jvenator & sethetter
set -e
error() { info "$1"; exit 1; }
@aresnick
aresnick / gist:65cc9eaff4c1fe6af389
Created September 26, 2015 22:54 — forked from beh/gist:3549933
Add bookmark to pinbord.in with predefined tag, without user intervention
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?later=yes&noui=yes&jump=close&tags=TAGS GO HERE&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));
// Copy and paste the above into a new bookmark. Replace "TAGS GO HERE" with your tags. Presto!
@aresnick
aresnick / _css-rotate.md
Last active August 29, 2015 14:25 — forked from shduff/straighteningDivs.html
an html snippet to "straighten" up slanted divs on hover

A small example of applying a CSS rotation on hover

This is a small example of using CSS transforms to achieve an animated rotation effect on a div when you hover over the div.

Further doing

Modify the code so that:

  1. …when you hover, the divs also get nudged a little to the right or left
  2. …when you hover, the divs also fade from one background color to another, but over a different time period than the rotation animation (i.e. something other than 0.6s)
  3. …the animations use a different easing function
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
@aresnick
aresnick / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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)