Skip to content

Instantly share code, notes, and snippets.

View blahah's full-sized avatar

Rik blahah

View GitHub Profile
for dir in $(ls); do
splitdir=$(echo $dir | sed -e 's/\(.\)/\1\//g' -e 's/\/$//')
echo $dir to $splitdir
mkdir -p $splitdir
mv $dir/* $splitdir
rmdir $dir
done
@blahah
blahah / .block
Last active April 5, 2016 12:01 — forked from mbostock/.block
Programmatic Pan+Zoom
license: gpl-3.0
{
"options": {
"died": true,
"multigraph": true,
"compound": true
},
"nodes": [
{
"v": "questions",
"value": {
@blahah
blahah / concept-graph.js
Last active May 21, 2019 18:58 — forked from kanesee/concept-graph.js
d3 2-way tree
var CollapsibleTree = function(elt) {
var m = [20, 120, 20, 120],
w = 1280 - m[1] - m[3],
h = 580 - m[0] - m[2],
i = 0,
root,
root2;
var tree = d3.layout.tree()
prefix publisher journals dois
10.12679 0 0
10.7579 123Doc Education 0 0
10.3731 21st Century COE Program (Toplogical Science and Technology) 1 40
10.5775 A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu 1 80
10.4037 AACN Publishing 2 766
10.1306 AAPG/Datapages 4 21817
10.3183 AB Svensk Papperstidning 1 1550
10.5769 ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia 1 57
10.7597 ACOPIOS - Revista Iberica de Mineralogia 1 9
@blahah
blahah / README.md
Last active October 18, 2015 11:36 — forked from mbostock/.block
Bullet Charts

Designed by Stephen Few, a bullet chart “provides a rich display of data in a small space.” A variation on a bar chart, bullet charts compare a given quantitative measure (such as profit or revenue) against qualitative ranges (e.g., poor, satisfactory, good) and related markers (e.g., the same measure a year ago). Layout inspired by Stephen Few. Implementation based on work by Clint Ivy, Jamie Love of N-Squared Software and Jason Davies. The "update" button randomizes the values slightly to demonstrate transitions.

@blahah
blahah / devtools.r
Last active August 29, 2015 13:56 — forked from hadley/devtools.r
if ("devtools" %in% loadedNamespaces()) {
stop("You must restart R before installing devtools")
}
url <- "https://github.com/hadley/devtools/archive/v1.4.1.zip"
temp <- file.path(tempdir(), "devtools.zip")
setInternet2(TRUE)
suppressWarnings(download.file(url, temp, mode = "wb"))
install.packages(temp, repos = NULL)
@blahah
blahah / index.html
Last active December 20, 2015 16:49 — forked from rduplain/responsive_d3_example.html
Responsive histogram in d3.js
<!DOCTYPE html>
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style>
body {
font: 10px sans-serif;
}
rect {
<!-- forked to enable viewing in bl.ocks.org - filename changed to index.html -->
<!DOCTYPE html>
<html>
<body>
<canvas id="c" style="width:500px; height:500px; background-color: grey">
</canvas>
@blahah
blahah / ciliarisDAR.js
Last active March 9, 2019 22:45 — forked from jasondavies/ciliarisDAR.js
LatticeXY chart
//Eragrostis ciliaris dry-after ripening germination data
var ddays = ["0630°/days","1260°/days","1890°/days","2520°/days"];
var RH = [20, 35, 50, 65];
var data = [{"temp":"30°C","RH":20,"ddays":"0630°/days","days":0,"germ":0},
{"temp":"30°C","RH":20,"ddays":"0630°/days","days":1,"germ":0},
{"temp":"30°C","RH":20,"ddays":"0630°/days","days":4,"germ":0},
{"temp":"30°C","RH":20,"ddays":"0630°/days","days":8,"germ":0},
{"temp":"30°C","RH":20,"ddays":"0630°/days","days":14,"germ":0},
{"temp":"30°C","RH":20,"ddays":"0630°/days","days":28,"germ":0},