Skip to content

Instantly share code, notes, and snippets.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@ZJONSSON
ZJONSSON / README.md
Last active December 14, 2015 09:59 — forked from mbostock/README.md

Changes in this fork:

  • index.html : Original file looped through all nodes: point.each(function(d) { d.scanned = d.selected = false; }); This version only touches the nodes scanned by the quadtree (and the previous selection), resulting in faster response
  • quadtree.js : Experiment in internalizing the area (x1,x2,y1,y2) of each quadrant within each node-object

See original here

@ZJONSSON
ZJONSSON / README.markdown
Created December 11, 2012 17:39 — forked from bewest/README.markdown
D3.js glucose levels
@ZJONSSON
ZJONSSON / README.md
Created October 19, 2012 13:59 — forked from mbostock/.block
d3.legend example

d3.legend

d3.legend is a quick hack to add a legend to a d3 chart. Simply add a g and .call(d3.legend). Any elements that have a title set in the "data-legend" attribute will be included when d3.legend is called. Each title will appear only once (even when multiple items define the same data-legend) as the process uses a set based on a existing names, not an array of all items.

Color

By default the color in the legend will try to match the fill attribute or the stroke attribute of the relevant items. Color can be explicitly defined by attribute "data-legend-color"

Order

The order of items in the legend will be sorted using the top of the bounding box for each included item. The order can be explicitly defined by attribute "data-legend-pos"

@ZJONSSON
ZJONSSON / README.md
Created October 15, 2012 20:09 — forked from syntagmatic/README.md
Avg Price Histories (force_labels)
@ZJONSSON
ZJONSSON / index.html
Created August 30, 2012 18:05 — forked from mbostock/.block
D3 Hive Plot (Areas) - evil exposure
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.arc {
fill-opacity: .2;
}
.axis .fill {
stroke: #aaa;
@ZJONSSON
ZJONSSON / index.html
Created August 30, 2012 11:21 — forked from mbostock/.block
D3 Hive Plot (Areas) - std expose
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.arc {
fill-opacity: .2;
}
.axis .fill {
stroke: #aaa;
@ZJONSSON
ZJONSSON / index.html
Created August 1, 2012 19:06 — forked from syntagmatic/index.html
Scatterplot (WebGL-2D)
<!doctype html>
<link rel="stylesheet" type="text/css" href="style.css" />
<h1>Nutrient Scatterplot (WebGL-2D)</h1>
<canvas id="chart"></canvas>
<div id="controls">
<span id="hover-food"></span><br/>
X axis <select id="xaxis"></select><br/>
Y axis <select id="yaxis"></select><br/>
@ZJONSSON
ZJONSSON / index.html
Created July 11, 2012 01:47 — forked from pere/index.html
testing circles in Leaflet.js (working)
<!DOCTYPE html>
<html>
<head>
<title>Testing d3.js in Leaflet.js</title>
<link rel="stylesheet" href="leaflet.css"></link>
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script>
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<style type="text/css">
svg , g