Skip to content

Instantly share code, notes, and snippets.

View rsangole's full-sized avatar
:octocat:

Rahul rsangole

:octocat:
View GitHub Profile
@dantonnoriega
dantonnoriega / remote-ssh-plus-local-cluster-future-example.R
Last active January 26, 2021 17:54
Example setting up a mixed remote / local cluster using the `future` package. Includes simple examples of how to properly execute plan to maximize cores. Note that this does not show how important it is to have the same R version AND package versions across all nodes.
# set up ---------------------------
library(furrr)
# use multiple clusters
ssh_username <- 'drn'
remote_ssh_configs <- c('a', 'b', 'e') # names for remote server (found in ~/.ssh/config e.g. Host a)
local_comp <- Sys.info()[["nodename"]] # get local computer name
# build cluster ----------------------------------------------------------------
system(command = "ps -axc | grep ssh | awk '{print $1}' | sort -u | xargs kill")
@dantonnoriega
dantonnoriega / tmux-vim-repl.md
Last active October 28, 2021 06:58
Step by step instruction to set up a VIM REPL with TMUX on a linux box. I found most instruction onlin convoluted and confusing.

Set up tmux with a vim REPL on a linux box

  1. install https://github.com/tpope/vim-pathogen into ~/.vim/
  2. install https://github.com/jpalardy/vim-slime into ~/.vim/bundle
  3. copied default vimrc to a user copy: cp /etc/vimrc ~/.vim/vimrc
  4. added the following to the end of ~/.vim/vimrc
" vim slime
let g:slime_python_ipython = 1

@hofmannsven
hofmannsven / README.md
Last active April 1, 2025 06:51
Git CLI Cheatsheet