Skip to content

Instantly share code, notes, and snippets.

@enthal
enthal / index.html
Created February 2, 2012 23:51
Example of continuous function graphing in d3 (using axis() for axes and grid lines)
<!DOCTYPE html>
<html>
<head>
<title>D3 - Line Chart - continuous function</title>
<!-- script type="text/javascript" src="https://raw.github.com/jquery/sizzle/master/sizzle.js"></script -->
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.min.js"></script>
<style type="text/css">
body {
@enthal
enthal / index.html
Created January 28, 2012 20:36
Example of d3 axis() for axes and grid lines
<!DOCTYPE html>
<html>
<head>
<title>D3 - Line Chart - axes and grid using axis()</title>
<!-- script type="text/javascript" src="https://raw.github.com/jquery/sizzle/master/sizzle.js"></script -->
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.min.js"></script>
<style type="text/css">
body {
@enthal
enthal / .bashrc
Created January 16, 2012 21:24
.bashrc
export PATH=/usr/local/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
# export JAVA_HOME=$(/usr/libexec/java_home)
# export LD_LIBRARY_PATH=/usr/local/lib/
alias ll='ls -al'
alias m='mate'
alias mw='mate -w'
alias .p='. ~/.bashrc'
alias ep='mw ~/.bashrc; .p'
@enthal
enthal / Base File.sublime-settings.json
Created January 4, 2012 18:30
sublime text 2 prefs
{
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme",
"font_size": 14.0,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"word_wrap": false,
"zzz": 0
}
@enthal
enthal / people_controller.rb
Created October 24, 2011 21:00
simple rails rspec testing that devise before_filter :authenticate_user! covers controller actions
class PeopleController < ApplicationController
before_filter :authenticate_user!, :except => [:index, :show]
...
end