codekansas / dotfiles

Dotfiles that I like to use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotfiles

Repo for managing my dotfiles across several environments.

Installation

git clone git@github.com: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)

About

Dotfiles that I like to use


Languages

Language:Python 54.7%Language:Shell 42.6%Language:Vim Script 1.8%Language:Makefile 0.8%Language:Ruby 0.2%