This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
openssl rand -base64 16 | pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git_branch_name() | |
{ | |
branch=$(git symbolic-ref HEAD 2> /dev/null | awk 'BEGIN{FS="/"} {print $NF}') | |
if [[ $branch == "" ]]; | |
then | |
: | |
else | |
echo "$branch" | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi is good | |
setw -g mode-keys vi | |
set-option -g default-terminal screen-256color | |
# use vim-like keys for splits and windows | |
bind-key v split-window -h | |
bind-key s split-window -v | |
bind-key h select-pane -L | |
bind-key j select-pane -D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set nu | |
autocmd BufWritePre *.js :%s/\s\+$//e | |
autocmd BufWritePre *.lua :%s/\s\+$//e | |
set autoindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set laststatus=2 | |
set statusline=%f |