Skip to content

Repository files navigation

dotfiles

Here are the configuration files for the various tools I use along with a bunch of custom scripts and shell helper functions to reduce repetitive tasks.

bootstrap.sh

This is intended to be a shell script to install everything I like on a fresh MacBook. I wouldn't recommend anyone run the script on their own machine, partly as the script in its current state is fairly experimental and hasn't been tested thoroughly, and partly as it's rarely a good idea to install someone else's setup in its entirety.

The script should do roughly the following:

  1. Install some useful packages & casks via brew.
  2. Symlink a bunch of config files found in this repo to the relevant places.
  3. Install some useful python packages.
  4. Configure some OSX settings.

zsh

Functions in the .zsh/functions directory are autoloaded (lazy loaded) into the shell. Other .zsh files in the .zsh directory are directly sourced.

functions

general

namedescriptionkeybinding
fzafind an alias and paste to command lineCtrl+fCtrl+a
fzhfind a command from history and paste to command lineCtrl+r
zcalled without arguments to find a directory from z plugin's list, with
arguments acts like normal z
sshcalled without arguments to find a remote, with arguments to be regular
ssh (requires rg)
vsopen a readonly nvim buffer reading from stdout from a given command.
usage vs ls -lA
copy the current line to the system clipboardCtrl+y
clccopy the previous command to the system clipboard
pubkeycopy my public key to the system clipboard
pleasesudo the last command
vopen suspended nvim session if it exists or start afresh
cpf fcopy the contents of file f to the clipboard,
without arguments to fzf the file
fzmfind a recipe from a Makefile in the cwd and run it
vactdeactivate the current conda env and activate venv in current directory

git

namedescriptionkeybinding
fzgffind a commit to fixupCtrl+gCtrl+f
fzgrfind a commit to rebase ontoCtrl+gCtrl+r
fzgsfind a commit to showCtrl+gCtrl+s
fzgspfind a stash to popCtrl+gCtrl+p
gfixfixup the latest commit
greb nrebase latest n commits (defaults to 1)
gbwith arguments acts as normal git branch.
without arguments it brings up a menu to fzf a branch to checkout.
Use Ctrl+d to delete the branch under the cursor
gbdfmultiselect git branches to force delete

docker

namedescription
dexecfind a container to drop into
dlogfind a container to retrieve logs
dstartfind a stopped container to start
dstopfind a started container(s) to stop
dimagermfind images to delete

kubernetes

namedescription
klogretrieve logs for a container
kdescpdescribe a pod
kdescdescribe a resource
kexecdrop into a container shell
kns nsswitch to namespace ns or choose from a list if omitted
kyamlget yaml for a resource
kctxswitch context
ktmpcreate a temporary busybox pod
kcsec secns1ns2copy secret sec from namespace ns1 to namespace ns2.
If arguments are omitted then user is prompted
kscaledownscale down all deployments and stateful sets in the current namespace
kscaleupscale up all deployments and stateful sets in the current namespace

helm

namedescription
hununinstall a chart

scripts

These are located in scripts and provide some automation around tasks that I do regularly. See the README there for more information.

vim

To get up and running with a minimal vimrc:

vimrc="${HOME:-~}/.vimrc"
[[ !-f$vimrc ]] \
&& curl https://raw.githubusercontent.com/dbatten5/dotfiles/main/.vimrc -o "$vimrc" \
||echo".vimrc already exists, not overwriting..."

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages