Skip to content

Instantly share code, notes, and snippets.

View jjulian's full-sized avatar

Jonathan Julian jjulian

  • Ad Hoc LLC
  • MD
  • 12:42 (UTC -04:00)
View GitHub Profile
@jjulian
jjulian / README
Created February 11, 2013 15:09
Run PHP on a Mac using Apache
$ edit httpd.conf to match your local filesystem
$ mkdir tmp logs public php
$ mv public.php public/
$ cp <your php.ini> to php/php.ini
$ apachectl -f /Users/jjulian/runphp/httpd.conf -t
$ apachectl -f /Users/jjulian/runphp/httpd.conf -k start
$ curl -D - http://localhost:8888
@jjulian
jjulian / graphite-install.md
Last active December 11, 2015 02:48 — forked from caged/graphite.md
Steps I used to install graphite on OS X Lion Jan 14 2013

Steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion Jan 14 2013.

Your Application sends stats over UDP to... statsd (the data collection agent) which sends the stats to... Carbon (the storage application) which stores the data in... Whisper db which is immediately cached and optimized for time-series data.

The Graphite webapp reads data from the Whisper db and the cache and show us pretty graphs.

topic = [
"Performance Tuning",
"Advanced Rails",
"Learning Ruby",
"Hypermedia APIs",
"Diversity"
]
ruby = %w{MRI jRuby Rubinious Heroku}
@jjulian
jjulian / backbone-carousel-auto.html
Created November 28, 2012 20:58
A simple auto-advancing carousel implemented with a single Backbone view
@jjulian
jjulian / backbone-carousel.html
Created November 24, 2012 23:19
A simple carousel implemented with a single Backbone view
@jjulian
jjulian / pragprogspending.js
Created October 31, 2012 15:14
Add up all your orders at ProgProg.com - go to http://pragprog.com/my_orders and run this in the console - your total will be displayed below your name in the sidebar
$('.records td.items + td').each(function() { $('.profile-box .name small').text((parseFloat($('.profile-box .name small').text()) || 0) + parseFloat(this.innerText.replace(/\$/,''))); })
@jjulian
jjulian / smtp_send.rb
Created October 25, 2012 19:32
Send an email using Ruby's standard lib.
require 'net/smtp'
host = 'smtp.gmail.com'
port = 587
from = 'me@gmail.com'
password = 'secret'
just_test = false
to = 'recipient@example.com'
msgstr = <<END_OF_MESSAGE
@jjulian
jjulian / bmorejs-oct-2012.md
Created October 25, 2012 01:54
Recap of the 2012-10-24 BmoreJS meetup "Panel Discussion" http://www.meetup.com/baltimore-dc-javascript-users/events/80846512/

BmoreJS 2012-10-24 "Panel Discussion"

http://www.meetup.com/baltimore-dc-javascript-users/events/80846512/

Panelists

  • Nick Gauthier, software developer and consultant
  • Shea Frederick, JavaScript developer at AOL
  • Josh Hepworth, coder and co-founder of Friend of the Web
  • Cory Hudson, creative director at AOL

Moderator: Jonathan Julian, software developer at 410 Labs

/*
* Magnetic Stripe Reader
* by Stephan King http://www.kingsdesign.com
*
* Reads a magnetic stripe.
*
*/
int cld1Pin = 5; // Card status pin
int rdtPin = 2; // Data pin
@jjulian
jjulian / betascape3.sample.csv
Created September 23, 2012 21:48
Transform wireshark csv packet data into a Rickshaw graph of the most chatty ip addresses. Betascape 2012 example.
No.,"Time","Source","Destination","Protocol","Length","Info"
1,"0.000000000","10.10.83.34","255.255.255.255","UDP","82","Source
2,"0.414041000","10.10.83.236","10.10.83.255","NBNS","92","Name
3,"1.102041000","10.10.82.121","255.255.255.255","UDP","82","Source
4,"1.165016000","10.10.83.236","10.10.83.255","NBNS","92","Name
5,"1.860212000","10.10.81.190","255.255.255.255","DB-LSP-DISC","163","Dropbox
6,"1.862162000","10.10.81.190","10.10.83.255","DB-LSP-DISC","163","Dropbox
7,"1.914055000","10.10.83.236","10.10.83.255","NBNS","92","Name
8,"2.727106000","Cisco_44:41:c8","Broadcast","ARP","60","Who
9,"3.494374000","10.10.80.109","255.255.255.255","DB-LSP-DISC","313","Dropbox