30.11.2020: Updated with the new patchseries and instructions for Windows
02.12.2020: Added tweaks
08.12.2020: Updated with patchseries v4
31.01.2020: Updated with patchseries v6
package main | |
import ( | |
"crypto/x509" | |
"encoding/pem" | |
"errors" | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
"io/ioutil" | |
"net" |
```bash | |
$ ssh -A vm | |
$ git config --global url."[email protected]:".insteadOf "https://github.com/" | |
$ cat ~/.gitconfig | |
[url "[email protected]:"] | |
insteadOf = https://github.com/ | |
$ go get github.com/private/repo && echo Success! | |
Success! | |
``` |
// d3.legend.js | |
// (C) 2012 [email protected] | |
// MIT licence | |
(function() { | |
d3.legend = function(g) { | |
g.each(function() { | |
var g= d3.select(this), | |
items = {}, | |
svg = d3.select(g.property("nearestViewportElement")), |
var probability = { | |
normal: function(x, mean, stddev) { | |
var y = (1 / (stddev * Math.sqrt(2 * Math.PI))) * Math.pow(Math.E, - (Math.pow(x - mean, 2) / (2 * Math.pow(stddev, 2)))); | |
//console.log('normal', x, mean, stddev, y); | |
return y; | |
}, | |
logNormal: function(x, mean, stddev) { | |
var y = (1 / (x * Math.sqrt(2 * Math.PI * Math.pow(stddev, 2)))) * Math.pow(Math.E, - (Math.pow(Math.log(x) - mean, 2) / (2 * Math.pow(stddev, 2)))); | |
//console.log('logNormal', x, mean, stddev, y); | |
y = isFinite(y) ? y : 0; |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
svg { | |
font: 10px sans-serif; | |
} | |
.bar rect { | |
fill: steelblue; | |
shape-rendering: crispEdges; | |
} |
body { | |
white-space: pre; | |
font-family: consolas; | |
color: white; | |
background: black; | |
} | |
.property { | |
color: orange; | |
font-weight: bold; |