Skip to content

Instantly share code, notes, and snippets.

View nathanph's full-sized avatar
🏠
Working from home

Nathan Hernandez nathanph

🏠
Working from home
View GitHub Profile
@nathanph
nathanph / exa.zsh
Created February 4, 2022 20:39
exa wrapper which applies my preferred defaults and fixes some occassional errors
##
# exa CLI Configuration
##
if type "exa" > /dev/null; then
##
# Takes an exa command and returns the command with a fallback command
# appended in case of failures. The fallback command will be the original
# command except with the `--git` option removed.
##
function exa () {
@nathanph
nathanph / navigate-panes.tmux
Created November 15, 2021 17:29
Configuration for navigating panes in tmux.
# vim: ft=tmux
set-option -g -w @PASSTHROUGH_PREDICATE '#{||:#{==:vim,#{pane_current_command}},#{==:tmux,#{pane_current_command}}}'
set-option -g -w @PASSTHROUGH_WHEN '#{pane_current_command}'
set-option -g -w @PASSTHROUGH_MATCHES 'nvim|vim|tmux'
set-option -g -w @PASSTHROUGH_PREDICATE '#{m/ri:#{@PASSTHROUGH_MATCHES},#{E:#{@PASSTHROUGH_WHEN}}}'
%hidden SELECT_PANE_COMMAND_NAME_LEFT='select-pane-left'
%hidden SELECT_PANE_COMMAND_ID_LEFT=2050
@nathanph
nathanph / vimium.css
Created October 28, 2021 16:10
Vimium CSS
/*
Dracula theme for Vimium
by Trollwut (trollwut@trollwut.org). This code is in the public domain.
To use:
1. Copy the code.
2. Go to the Vimium options.
3. Click Show Advanced Options.
4. Under Advanced Options, scroll down to CSS for link hints.
5. Paste the code in the text field.
6. Click Save Changes.
@nathanph
nathanph / .zshrc
Created September 8, 2018 02:26
Fuzzy Finder Configuration
# Fuzzy Finder Configuration
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if type "fzf" > /dev/null; then
# Use tmux.
export FZF_TMUX=1
# Default to The Silver Searcher.
if type "ag" > /dev/null; then
export FZF_DEFAULT_COMMAND='ag --color --color-path "00;22" --filename-pattern ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
@nathanph
nathanph / kubectl.zsh-theme
Last active August 31, 2018 00:58
Ultra fast kubectl context parsing for your PS1.
# vim:ft=zsh ts=2 sw=2 sts=2
rvm_current() {
rvm current 2>/dev/null
}
rbenv_version() {
rbenv version 2>/dev/null | awk '{print $1}'
}

Keybase proof

I hereby claim:

  • I am nathanph on github.
  • I am nateph (https://keybase.io/nateph) on keybase.
  • I have a public key ASAGjzsD5TSyzA12UAzz7b0glpzfIIG77gNN_74dU1My9Ao

To claim this, I am signing this object:

@nathanph
nathanph / start-spark
Created February 26, 2016 19:11
An alias for starting your Jupyter platform.
alias start-spark='sudo docker run -d -p 8888:8888 -p 4040-4050:4040-4050 -v /home/nate/audio-analysis:/home/jovyan/work/audio-analysis jupyter/all-spark-notebook start-notebook.sh --NotebookApp.notebook_dir=/home/jovyan/work/audio-analysis/; sudo docker rm $(sudo docker ps -a -q) &> /dev/null'