Skip to content

Instantly share code, notes, and snippets.

View matsen's full-sized avatar

Erick Matsen matsen

View GitHub Profile
matsen /
Created January 3, 2020 14:42
A shell command to refresh SSH_AUTH_SOCK in a running tmux session
r () {
if [[ -n $TMUX ]]
NEW_SSH_AUTH_SOCK=`tmux showenv|grep "^SSH_AUTH_SOCK"|cut -d = -f 2`
if [[ -n $NEW_SSH_AUTH_SOCK ]] && [[ -S $NEW_SSH_AUTH_SOCK ]]
echo "New auth sock: $NEW_SSH_AUTH_SOCK"
NEW_DISPLAY=`tmux showenv|grep "^DISPLAY"|cut -d = -f 2`
set -e
set -o
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y \
autojump \
View parasite.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
matsen / seqs2png
Last active February 9, 2016 04:11
A simple script to render a molecular sequence file as a PNG, with a specified number of pixels per symbol.
View seqs2png
#!/usr/bin/env python
Turn a sequence file into a PNG, with a specified number of pixels per symbol.
Gaps are shown in light gray.
Unknown symbols, including N and X, are shown in pink.
Requires matplotlib, seqmagick, and their dependencies.
View gallifrey-ve.zsh-theme
# A modification of `gallifrey` to show virtualenv information.
# I also found the return code information to be annoying, so it's commented out.
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%m%{$reset_color%} $(virtualenv_prompt_info)%2~ $(git_prompt_info)%{$reset_color%}%B»%b '
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
matsen /
Last active February 22, 2021 21:44 — forked from iamlemec/nb2md
Markdown diffs for jupyter notebooks.

For sane jupyter notebook diffs

  • Install the nbconvert package, though you probably already have it if you are using jupyter.
  • Put the nb2md script below in your path and make executable
  • Add the following to your .gitattributes file, which can be in your home directory (use nb2md for all projects) or in the root of your project:
*.ipynb diff=nb2md
  • Run
matsen /
Last active October 17, 2016 17:55
Preparing a crouton chroot environment for productivity.
# sudo visudo
# matsen ALL = (root) NOPASSWD: /usr/local/bin/xiwi,/usr/bin/evince,/usr/bin/inkscape
set -e
set -o
sudo hostnamectl set-hostname flyx
matsen /
Last active October 1, 2015 12:19
Response to "Science Drivers Requiring Capable Exascale High Performance Computing" RFI

Response to Science Drivers Requiring Capable Exascale High Performance Computing RFI

We can piggyback on the coding development community.

Many good things are happening in open source and industry, and we face many of the same issues that they do. For example, GitHub has provided enormous value to science, both through filling a need and by direct engagement. It has gotten almost unbelievably popular in the computational life sciences. However, other tools such as continuous integration, for example by Travis CI, or containers, for example by Docker, have gotten less traction despite the

matsen /
Created April 6, 2015 16:55

Keybase proof

I hereby claim:

  • I am matsen on github.
  • I am ematsen ( on keybase.
  • I have a public key whose fingerprint is BEE5 925E E22C 76C3 EC0D 4074 319F C81F 9510 3B94

To claim this, I am signing this object:

matsen / sysbio.tex
Last active December 15, 2015 15:29
Framework for a latex file designed for both arXiv and Systematic Biology submission.
View sysbio.tex
%%For arXiv, uncomment this block and comment the next block.