Skip to content

Instantly share code, notes, and snippets.

View laceysanderson's full-sized avatar

Lacey-Anne Sanderson laceysanderson

View GitHub Profile
@shitchell
shitchell / git-user-stats
Last active June 25, 2024 09:03
Show user stats in a git repo
#!/bin/bash
#
# Show user stats (commits, files modified, insertions, deletions, and total
# lines modified) for a repo
git_log_opts=( "$@" )
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \
| tr '[A-Z]' '[a-z]' \
| grep -v '^$' \
@bradfordcondon
bradfordcondon / Migrate_node_fields.php
Last active March 15, 2019 17:19
migrate tripal 2 node fields to chado properties for tripal 3 compatibility and best FAIR practices
<?php
//if we made this into a module, we would use the tripal jobs... but we dont so its commented out for now.
//
//global $user;
//tripal_add_job(
// "Convert fields to properties", 'no_module',
// 'snippet_tripal_job_callback',
// 'chado_update_existing_node_urls',
// [],
// $user->uid
@mbostock
mbostock / .block
Last active May 5, 2021 09:30
Tree of Life
license: gpl-3.0
height: 960
redirect: https://observablehq.com/@mbostock/tree-of-life
@mbostock
mbostock / .block
Last active March 2, 2020 17:20
OMG Particles II
license: gpl-3.0
@mbostock
mbostock / .block
Last active December 15, 2023 03:34 — forked from mbostock/.block
Hierarchical Edge Bundling
license: gpl-3.0
height: 960
border: no
redirect: https://observablehq.com/@d3/hierarchical-edge-bundling
@syntagmatic
syntagmatic / README.md
Created November 15, 2012 01:43 — forked from mbostock/.block
d3 src tree

A visualization of files in the src directory of the d3 repository, based on Reingold-Tilford Tree.

Data Collection

Use git to clone a repository, then du to create a tsv with the directory contents.

git clone git://github.com/mbostock/d3.git
(echo -n 'size\tfile\n'; du -a d3) > d3.tsv

Burrow - recursive nesting

@mbostock
mbostock / .block
Last active February 26, 2019 22:40
Box Plots
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-box-plot
@mbostock
mbostock / .block
Last active February 26, 2019 22:41
Chord Diagram
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-chord-dependency-diagram