Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Guy Pursey guypursey

🏠
Working from home
View GitHub Profile
View git-global-config.sh
git config --global alias.alias "config --get-regexp ^alias\."
git config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
git config --global alias.inked "log --color=always --pretty=format:'A:%Cgreen%ad%Creset %h %Cred%cd %C(brightblue white)%D%Creset %s' --date=format:'%Y/%m/%d@%H%M' --decorate=short --decorate-refs=tags --author-date-order"
git config --global alias.keyed "log --color=always --pretty=format:'C:%Cred%cd%Creset %h %Cgreen%ad %C(brightblue white)%D%Creset %s' --date=format:'%Y/%m/%d@%H%M' --decorate=short --decorate-refs=tags --date-order"
View git-add-atomic.sh
#!/bin/bash
# diff a specific file for now (check it exists, etc.)
# extract hunk texts
bold=$(tput bold)
head=$(tput smul)
oldd=$(tput setaf 1)
newd=$(tput setaf 2)
askq=$(tput setaf 5)
View test-link-data.json
@guypursey
guypursey / for-console.js
Last active Nov 30, 2017
Way of extracting data as TSV from Trello
View for-console.js
members = JSON.parse(document.getElementsByTagName("pre")[0].innerHTML).members
.reduce((p, c) => { p[c.id] = c.fullName; return p }, {})
lists = JSON.parse(document.getElementsByTagName("pre")[0].innerHTML).lists
//.filter(x => !x.closed)
.reduce((p, c) => { p[c.id] = c.name; return p }, {})
labels = JSON.parse(document.getElementsByTagName("pre")[0].innerHTML).labels
.reduce((p, c) => { p[c.id] = c.name; return p }, {})
@guypursey
guypursey / .block
Last active Oct 1, 2017
Test coverage visualisation (demo with D3 v4)
View .block
license: mit
scrolling: yes
@guypursey
guypursey / .block
Last active Sep 18, 2017
Co-occurrence matrix as wheel (University of Reading joint degree options 2014 data) with D3 v4
View .block
license: mit
@guypursey
guypursey / .block
Last active Sep 2, 2017
Co-occurrence matrix (University of Reading joint degree options 2014 data) with D3 v4
View .block
license: mit
@guypursey
guypursey / .block
Last active Jun 7, 2021 — forked from mbostock/.block
Wrapping long labels with D3 v4 (sample data)
View .block
license: gpl-3.0
@guypursey
guypursey / .block
Last active Jul 29, 2017
UK General Election 2017 FT-style slopegraph (D3 v4)
View .block
license: mit
@guypursey
guypursey / README.md
Last active Jun 26, 2017
UK General Election 2017 Financial Times data scrape
View README.md