Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jashkenas's full-sized avatar

Jeremy Ashkenas jashkenas

View GitHub Profile
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
#!/usr/bin/perl -w
#
# Plugin for watching io-bound traffic (in blocks) on disks.
#
# Usage: Link or copy into /etc/lrrd/client.d/
#
# Parameters:
#
# config (required)
# autoconf (optional - used by lrrd-config)
@jashkenas
jashkenas / sounder.rb
Created February 20, 2009 04:15
A Demonstration of Minim in Ruby-Processing
# Sounder sounds for class
# Requires an active microphone to pick up anything
require 'ruby-processing'
class MinimTest < Processing::App
load_library "minim"
import "ddf.minim"
import "ddf.minim.analysis"
// Underscore.js
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the terms of the MIT license.
// Portions of Underscore are inspired by or borrowed from Prototype.js,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function() {
// ------------------------- Baseline setup ---------------------------------
#!/usr/bin/env ruby
cmds = []
cmds << "git co gh-pages"
cmds << "git merge master"
cmds << "git push github gh-pages"
cmds << "git co master"
system cmds.join("&&")
Security Alert - Please reset your npm registry account
==================================================
The security of the npm registry has just been upgraded. This corrects a known
flaw which led to the leakage of the password_sha and salt fields. The good
news is that the leak is plugged. The bad news is that it existed for quite a
while.
tl;dr
For those folks not already hanging out in #documentcloud... here's the log of this afternoon's Ember/Backbone politics discussion.
12:21 PM <wycats> jashkenas: hey
12:21 PM <wycats> jashkenas: I'm sorry
12:21 PM <wycats> how would you like me to describe backbone?
12:21 PM <wycats> let's work this out for once and for all :)
12:21 PM <wycats> I'm definitely not intentionally saying incorrect things about backbone
12:22 PM • knowtheory gets out popcorn
12:24 PM <jashkenas> don't worry about it too much -- I'm just not terribly pleased with backbone being continued to be used as the strawman...
12:24 PM <wycats> jashkenas: I am worried about it a lot
We can't make this file beautiful and searchable because it's too large.
"STATION","NAME","DATE","AWND","PGTM","TAVG","TMAX","TMIN","TOBS","WDF2","WDF5","WDMV","WSF2","WSF5","WT01","WT02","WT03","WT05","WT08"
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-01",,,"44","49","41",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-02",,,"43","46","40",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-03",,,"49","53","44",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-04",,,"48","54","42",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-05",,,"42","47","36",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-06",,,"39","46","31",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-07",,,"50","55","40",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-08",,,"56","58","51",,,,,,,,,,,
"USR0000CSVA","SPRING VALLEY CALIFORNIA, CA US","2017-01-09",,,"50","52","49",,,,,,,,,,,
{"aplusk":[[1499731200,18179231,9665],[1499817600,18189244,9667],[1499904000,18200282,9669],[1499990400,18213039,9671],[1500076800,18227171,9671],[1500163200,18241786,9672],[1500249600,18257305,9675],[1500336000,18274631,9678],[1500422400,18292964,9678],[1500508800,18309917,9679],[1500595200,18326919,9679],[1500681600,18344390,9679],[1500768000,18362413,9680],[1500854400,18379047,9682],[1500940800,18395743,9685],[1501027200,18413811,9685],[1501113600,18433635,9685],[1501200000,18451055,9689],[1501286400,18467529,9690],[1501372800,18483662,9689],[1501459200,18500548,9690],[1501545600,18516915,9691],[1501632000,18534879,9692],[1501718400,18553381,9693],[1501804800,18568415,9694],[1501891200,18583812,9694],[1501977600,18598125,9694],[1502064000,18613104,9696],[1502150400,18627391,9698],[1502236800,18630483,9700],[1502323200,18635327,9701],[1502409600,18637929,9703],[1502496000,18640498,9703],[1502582400,18643817,9703],[1502668800,18647482,9703],[1502755200,18651130,9704],[1502841600,18655339,9704],[1502928000,18
jquery.hover (arg) ->
value
, (arg) ->
value
# Or:
jquery.hover(
(arg) -> value