Skip to content

Instantly share code, notes, and snippets.

@nmu
nmu / cash-truncated.json
Last active October 23, 2015 05:21
d3.unconf 2015
[{"date":"2014-07-01","syrian":"20411","syrian_waitlist":"8401","iraqi":"2003","otherNationalityCases":"223"},{"date":"2014-08-01","syrian":"20351","syrian_waitlist":"7490","iraqi":"1984","otherNationalityCases":"221"},{"date":"2014-09-01","syrian":"20273","syrian_waitlist":"6164","iraqi":"1950","otherNationalityCases":"230"},{"date":"2014-10-01","syrian":"20492","syrian_waitlist":"7828","iraqi":"1969","otherNationalityCases":"231"},{"date":"2014-11-01","syrian":"21000","syrian_waitlist":"4367","iraqi":"1959","otherNationalityCases":"234"},{"date":"2014-12-01","syrian":"21000","syrian_waitlist":"9971","iraqi":"1959","otherNationalityCases":"241","nonsyrian_waitlist":"1942","syrian_winterizeOnce":6070,"iraqi_winterizeOncePostIsis":6070},{"date":"2015-01-01","syrian":"21022","syrian_waitlist":"12011","iraqi":"1961","otherNationalityCases":"247","nonsyrian_waitlist":"2171","syrian_winterizeOnce":2070},{"date":"2015-02-01","syrian":"20349","syrian_waitlist":"15928","iraqi":"1929","otherNationalityCases":"276","no
@nmu
nmu / basecampAttachmentScraper.js
Last active August 29, 2015 14:08
Save all attachments from Basecamp message body.
/*
* Saves from URLs like https://basecamp.com/{{accountId?}}/projects/{{projectId?}}/messages/{{messageId}}
* Assumptions (true as of 2014-11-07):
* - jQuery available as global $
* - sufficient selector assumes attachment links have attribute 'data-attachment-id'
*/
function save (url, options) {
options || (options = {});
@nmu
nmu / README.md
Created December 16, 2013 23:37
CSS Sprite Mask

Playing with CSS masking sprites.

@nmu
nmu / scala.rb
Created November 17, 2013 19:33 — forked from cstrahan/scala.rb
# to install the latest stable version:
brew install scala --with-docs
# to install scala-2.10.0-RC1:
brew install https://raw.github.com/gist/3939012/scala.rb --with-docs
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands):
brew switch scala 2.9.2
brew switch scala 2.10.0-RC1
@nmu
nmu / install_therubyracer.sh
Last active December 27, 2015 00:29
Mavericks dev environment gotchas. Mostly Ruby.
# libv8 compiler conflict w/ Mavericks
# use GCC-4.2 to compile both libv8 & therubyracer:
# http://stackoverflow.com/questions/19630154/gem-install-therubyracer-v-0-10-2-on-osx-mavericks-not-installing
brew install apple-gcc42
# Add to .bash_profile or prepend install w/ homebrew install location
# $ export CC=/usr/bin/gcc # or brew installed location on your machine
# $ export CXX=/usr/bin/gcc
@nmu
nmu / controller.txt
Last active December 26, 2015 14:28
Model Dump: rough model schema
get / (index)
- if not logged in
=> prompt login (facebook)
- elif logged in && !avail
=> create hangout?
=> be available so your friends can hangout? (fomo fomo fomo)
- else (logged in & available)
=> (n friends are available, ) create a hangout?
Modified from https://gist.github.com/ErneX/3179774
- Install XCode from the App Store.
- Launch XCode > Preferences > Downloads > Install the Command Line Tools
- Install XQuartz version 2.7.2 http://xquartz.macosforge.org/trac/wiki/X112.7.2
- Install homebrew: https://github.com/mxcl/homebrew/wiki/installation
- Install git
- From Terminal: brew install git
- From Installer: git-osx-installer version 1.7.11.3 http://code.google.com/p/git-osx-installer/downloads/list
- Install Ruby 1.9.3 with rvm, run this command on a terminal and follow the instructions: curl -L https://get.rvm.io | bash -s stable --ruby
@nmu
nmu / gist:1334977
Created November 2, 2011 21:25
ad code triggering font parser
Triggering:
document.write('<iframe src="http://view.atdmt.com/NDM/iview/140262768/direct/01/0058310713?click=http://r1-ads.ace.advertising.com/click/site=0000798472/mnum=0000702208/cstr=98586526=_4eb1b419,0058310713,798472_702208_1183_0,1_/xsxdata=$XSXDATA/bnum=98586526/optn=64?trg=" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true" width="300" height="250">');document.write('<a href="http://r1-ads.ace.advertising.com/click/site=0000798472/mnum=0000702208/cstr=98586526=_4eb1b419,0058310713,798472_702208_1183_0,1_/xsxdata=$xsxdata/bnum=98586526/optn=64?trg=http://clk.atdmt.com/NDM/go/140262768/direct/01/" target="_blank"><img border="0" src="http://view.atdmt.com/NDM/view/140262768/direct/01/" /></a></iframe>');
var can_adInfoTag = {};
can_adInfoTag["0058310713"] = {
"CAN_ver": "0.1",
"CAN_ann": "Advertising.com",
"CAN_anl": "http://advertising.aol.com/privacy/advertisingcom/opt-out",
"CAN_maf": "Y"
};