Skip to content

Instantly share code, notes, and snippets.

@aedoran
aedoran / .block
Created December 25, 2018 12:02
dc builder
license: mit
@aedoran
aedoran / keybase.md
Last active November 23, 2016 14:19
Keybase
### Keybase proof
I hereby claim:
* I am aedoran on github.
* I am aedoran (https://keybase.io/aedoran) on keybase.
* I have a public key ASCNC-fqE_wfM4-PTA9dKiqYpeqnd_x2EzSJpO1SDKu3wgo
To claim this, I am signing this object:
@aedoran
aedoran / impeach.csv
Last active November 12, 2016 04:28
impeach who?
Month obama impeach trump impeach
2008-10 14 14
2008-11 82 0
2008-12 21 0
2009-01 21 0
2009-02 21 0
2009-03 31 0
2009-04 13 0
2009-05 25 0
2009-06 13 0
@aedoran
aedoran / Idone this git commit message hook
Created March 29, 2013 04:03
git commit hook for use with idone this this command line client. Just copy this in your .git/hooks/commit-msg. and whenever your commit message has an "IDT" in it, it will send the message to your idonethis account
idt=$(grep IDT $1)
msg=$(cat $1)
if [ -z "$idt" ]; then
echo "not for idonethis"
else
idone "$msg"
fi
@aedoran
aedoran / index.html
Created October 22, 2012 19:47
Diff square tree
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
path {
stroke-width:1px;
fill:red;
stroke:red;
}
@aedoran
aedoran / index.html
Created October 8, 2012 16:03
Experminents with squiggles
<!DOCTYPE html>
<head>
<style>
@font-face {
font-family: 'xkcd';
src: url('http://dl.dropbox.com/u/12305244/Humor-Sans.ttf');
}
body {
font-size: 14px;
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v2.min.js?2.9.7"></script>
<script>
var width = 960,
height = 500;
var nodes = d3.range(200).map(function() { return {radius: Math.random() * 12 + 4}; }),
@aedoran
aedoran / test.js
Created September 24, 2012 22:43
zombie concurrency test script
var Browser = require("zombie"),
program = require("commander");
program
.version('0.0.1')
.option('-l, --location <string>', 'location:port')
.option('-u, --username <string>', 'username')
.option('-p, --password <string>', 'password')
.option('-c, --concurrencies <integer>', 'number of browsers you want')
@aedoran
aedoran / gist:2875932
Created June 5, 2012 16:00
normal distribution thrown into scores from 0 - 100
var scores = [0,2,3,2,24,24,2,2];
//get the mean
var avg = 0;
scores.forEach(function(a) {
avg+= a;
});
avg = avg / scores.length;
@aedoran
aedoran / gist:2870581
Created June 4, 2012 20:10
normally distribute data nd split them into 0-100 buckets
var data = [2,3,4,5,3,2,3,4,5,6,9,9,100,-100];
var avg = 0;
data.forEach(function(a) {
avg+= a;
});
avg = avg / data.length;
console.log("avg",avg);