Stacks Image 16072

For Academics

Unix alias suggestions

Cluster usage tips for Mac.

Remove need for password

This is particularly useful for the speedy click-to-download iTerm2 integration.

Full instructions here.

Briefly, generate key

ssh-keygen -t rsa

(leave passphrase empty)

Upload to host

ssh-copy-id -i ~/.ssh/id_rsa.pub username@server.dreamhost.com

iTerm2

Setup profile for each cluster

Allows to quickly start a new connection

Preferences > Profiles > plus button

General tab

  • name (cluster name)
  • shortcut key (Ctrl-Cmd-2)
  • Command (Login Shell ssh user@cluster.edu)
  • Working directory (Home directory)

Colors tab - choose a colour scheme to uniquely identify it from a local terminal

Keys tab > presets > Natural text editing - Allows to navigate with alt-arrow, cmd-arrow and insert # in vim

Advanced tab

Code your own commands accessible by clicking terminal selections. For example to allow to sftp to a file through BBEdit:

Smart selection > Word bounded by whitespace > edit actions

make a new one

  • Title - Open in BBEdit
  • Action - Run Command...
  • parameter - /usr/bin/open -a BBEdit sftp://\u@\h/\d//\0

Install iTerm integration

log in to cluster

iTerm2 > install Shell integration

Allows to click to download files shown on screen and Alt-drag files from the mac to the iTerm2 window to upload them to current folder.

tmux

You can use tmux -CC to control tmux through iTerm2.

  • Cmd-D vertical split
  • Cmd-Shift-D horizontal split
  • Cmd-Ctrl-Shift-Enter Manage sessions

Shell integration is unstable in remote tmux sessions, thus turned off by default. It was too unstable for me. Nevertheless, to turn on, add to your .bashrc

export ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX=YES

.bashrc

Useful commands for slurm

start interactive job

alias int="srun --time=4:00:00 --ntasks=1 --nodes=1 --partition=sixhour --pty /bin/bash -l"

queue of your jobs only (edit "user")

alias sq="squeue -u user"

Set vim as default (used in broot)

export VISUAL=vim;
export EDITOR=vim;
Post 1 / 40 Post

Tag:

Sex chromosome twitter bot

Mimulus twitter bot

Silene twitter bot

I setup the sexChr_papers twitter bot following Rob Lanfear's instructions.

I am interested in papers on sex chromosome evolution, and thus remove medical search terms. The pubmed search is sex chromosome NOT aneuploidy NOT patient? NOT chronic NOT acute NOT clinical NOT prenatal NOT diagnostic NOT congenital NOT infant? NOT syndrome NOT trisom* NOT sperm.

Casey Bergman is gathering literature Twitter bots here.