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 / scrollspy.coffee
Last active December 30, 2015 02:19 — forked from alxhill/scrollspy.coffee
fork of alxhill's scrollspy.coffee at https://gist.github.com/alxhill/6886760 not sure why, but the original wasn't working for me when the scope model updated. spyElems[spy.id] was undefined for new elements at line 37 and caused scrollfix to break after a model change. am using v1.2.0-8336b3a also add a quick attribute to allow easy custom buf…
angular.module('jobFoundryDirectives').directive 'spy', ($location) ->
restrict: "A"
require: "^scrollSpy"
link: (scope, elem, attrs, scrollSpy) ->
attrs.spyClass ?= "current"
elem.click ->
scope.$apply ->
$location.hash(attrs.spy)
@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(){};}
@pandafulmanda
pandafulmanda / README.md
Created November 9, 2015 21:45
Intro to D3 Talk
@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>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg width="960" height="500"></svg>
<script>
d3.select("svg")
<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];
@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];

knitr

HRUG Meetup

Why Knitr

  • results need to be reproducible
  • Documentation of code
    • easier to read and understand later on to extend
  • Great for making reports as well
  • Sharing results leads to facilitating discussion