Skip to content

Instantly share code, notes, and snippets.

View pandafulmanda's full-sized avatar

Amanda Shih pandafulmanda

View GitHub Profile
@pandafulmanda
pandafulmanda / bob
Last active December 21, 2015 01:19
A solution Bob in exercism.io
class Bob
def hey (message)
all_cases = {:silence? => 'Fine. Be that way!', :yelling? => 'Woah, chill out!', :asking? => 'Sure.'}
response = all_cases.keys.find do |meth_name|
send(meth_name, message)
end
@pandafulmanda
pandafulmanda / d3-intro-step-04.html
Created November 9, 2015 23:02
fit to window size and use scales
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg></svg>
<script>
var sampleData = [1, 2, 3, 4, 5, 10, 6, 2, 9, 20, 54, 30];
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg width="960" height="500"></svg>
<script>
var sampleData = [1, 2, 3, 4, 5];
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg width="960" height="500"></svg>
<script>
var sampleData = [1, 2, 3, 4, 5];
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg width="960" height="500"></svg>
<script>
d3.select("svg")
@pandafulmanda
pandafulmanda / d3-intro-step-00.html
Created November 9, 2015 22:30
Starting a D3 Vis
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg width="960" height="500"></svg>
</body>
</html>
@pandafulmanda
pandafulmanda / README.md
Created November 9, 2015 21:45
Intro to D3 Talk
@pandafulmanda
pandafulmanda / gist:8722454
Created January 30, 2014 23:33
Quick gist to avoid errors when console.log is undefined in non-supported (ahem IE 9) browsers
if(typeof window.console == "undefined" || typeof console.log =="undefined") {window['console'] = {}; window.console['log'] = function(){};}