Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am climyao on github.
  • I am climyao (https://keybase.io/climyao) on keybase.
  • I have a public key ASBQLQM0gnJNRLW_x_9ZwttlkKTrzU8ITUj01qoNM-cTFAo

To claim this, I am signing this object:

@climyao
climyao / iowa-counties.geojson
Last active January 30, 2017 16:58
GeoJSONs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@climyao
climyao / README.md
Last active August 29, 2015 14:27 — forked from robschmuecker/README.md
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

@climyao
climyao / solr
Last active August 29, 2015 14:13
#! /bin/sh
### BEGIN INIT INFO
# Provides: solr
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Solr
# Description: Solr advanced search engine
### END INIT INFO
@climyao
climyao / payroll.rb
Created January 24, 2013 21:18
Calculate beginning and end of payroll given an arbitrary date
def beginning_of_payroll(given_date)
payroll_start_seed = Date.new(2011,12,02)
given_date - ( (given_date - payroll_start_seed).abs % 14 )
end
def end_of_payroll(given_date)
beginning_of_payroll(given_date) + 13
end
@climyao
climyao / index.html
Created July 11, 2012 15:35
crappy pie chart
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>d3.js pie!</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src="https://raw.github.com/mbostock/d3/master/d3.v2.min.js"></script>
<style type='text/css'>
@climyao
climyao / index.html
Created July 10, 2012 17:10
d3 iowa choropleth example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>d3.js iowa</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src="https://raw.github.com/mbostock/d3/master/d3.v2.min.js"></script>
<script type='text/javascript'>
// tipsy, facebook style tooltips for jquery
@climyao
climyao / iowa-counties.svg
Created July 9, 2012 21:51
Iowa Counties SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@climyao
climyao / index.html
Created July 9, 2012 19:56
d3 choropleth example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>d3.js choropleth example</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src="https://raw.github.com/mbostock/d3/master/d3.v2.min.js"></script>
@climyao
climyao / blank_us_map.svg
Created July 9, 2012 17:49
Blank US Map SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.