This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
IP=`ifconfig | grep "inet " | grep -v "inet 127.0.0.1" | cut -f 2 -d " "` | |
PORT=$1 | |
if [ -z "$1" ] | |
then | |
PORT=8000 | |
fi | |
# Copy ip and port to pasteboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="overflow:hidden; height: 100px"> | |
<span id="1" style="height:50px;" /> | |
<span id="2" style="height:50px;" /> | |
<span id="3" style="height:50px;" /> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent | |
def self.print_name | |
puts self.name | |
end | |
def self.name | |
"Parent" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"songs": [ | |
{ | |
"globalId": "gold-rush", | |
"name": "Gold Rush", | |
"written-by": "Bill Monroe", | |
"key": "a", | |
"chord-progression": [ | |
{"section-name": "A", "chords": [ | |
{"key-as-letter": "a", "key-as-roman": "I", "duration": 3.0}, | |
{"key-as-letter": "e", "key-as-roman": "V", "duration": 0.5} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThingRepresentation < Representable::Decorator | |
include Representable::JSON | |
property :field | |
end | |
# This works great. | |
ThingRepresentation.new(Thing.new).to_json # => { "field": "thing value" } | |
# This does not work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
190988 | |
190755 | |
190706 | |
191474 | |
191480 | |
191479 | |
191477 | |
167433 | |
61434 | |
196577 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Mysql < Formula | |
homepage 'http://dev.mysql.com/doc/refman/5.6/en/' | |
url 'http://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.10.tar.gz' | |
version '5.6.10' | |
sha1 'f37979eafc241a0ebeac9548cb3f4113074271b7' | |
bottle do | |
sha1 'e07b9a207364b6e020fc96f49116b58d33d0eb78' => :mountain_lion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var margin = {top: 1, right: 1, bottom: 6, left: 1}, | |
width = 960 - margin.left - margin.right, | |
height = 500 - margin.top - margin.bottom; | |
var formatNumber = d3.format(",.0f"), | |
format = function(d) { return formatNumber(d) + " TWh"; }, | |
color = d3.scale.category20(); |