Skip to content

codekansas/dotfiles

Repository files navigation

dotfiles

Repo for managing my dotfiles across several environments.

Installation

git clone [email protected]:codekansas/dotfiles.git && cd dotfiles && ./install

Related

  • I borrowed a lot of this repo from here
  • It's based on DotBot here

Documentation

Here are some of the additional commands in these dotfiles, besides the housekeeping-type improvements.

prof

Profile directory (useful for finding large files):

prof (<dir-name>)

mkcd

Make directory, then cd to that directory

mkcd <dir-name>

gdrive

Download file from Google drive:

gdrive <google-fid> <output-path>

topc

Filter top for process name regex:

topc <regex>

conda

Edit Conda environment variables:

cvars (rm {r}) (rm-activate {ra}) (rm-deactivate {rd}) (activate {a}) (deactivate {d})

Activate Conda environment (alias for conda activate, with tab completion):

cenv <env-name>

tmp-script

Create a new temporary script:

tinit <script-name>

Edit a script (with tab completion):

tedit <script-name>

Run a temporary script (with tab completion):

trun <script-name>

Delete a script (with tab completion):

tdelete <script-name>

slurm

Show all my current Slurm jobs:

squeueme

Safely cancel all my current Slurm jobs:

scancelme

nvidia

Track NVIDIA GPU usage:

smi

tmux

Create a named tmux session:

tmuxn <name>

Attach to tmux as an iTerm2 window (with tab completion for session name):

tmuxc <name>

ssh

Add this in your ~/.ssh/config file to prevent having to re-authenticate when SSH'ing (useful for 2FA):

Include config.d/base

By default, Jupyter notebooks will be served on port 16012. Therefore, it's a good idea to add this port forwarding to your SSH config file:

LocalForward 16012 localhost:16012

make

Build a file, and if make succeeds, run it (currently NVCC and C / C++). Useful for programming competitions, test scripts, etc.

brun <fname> (runtime-args)