-
-
Save davemo/5329141 to your computer and use it in GitHub Desktop.
bash_profile, sublime settings, alfred snippets
This file contains 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
[user] | |
name = David Mosher | |
email = davidmosher@gmail.com | |
[core] | |
autocrlf = input | |
safecrlf = false | |
editor = vim | |
excludesFile = /Users/davidmosher/.gitignore_global | |
[github] | |
user = davemo | |
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- | |
lo = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
ln = log --name-status | |
type = cat-file -t | |
dump = cat-file -p | |
up = "!git remote update -p; git merge --ff-only @{u}" | |
ds = diff --staged | |
[color] | |
ui = auto | |
[fetch] | |
prune = true | |
[push] | |
default = current | |
[merge] | |
keepBackup = false | |
[branch] | |
autosetuprebase = always | |
[rerere] | |
enabled = true | |
[diff] | |
renames = true | |
[help] | |
autocorrect = 1 | |
[rebase] | |
autoStash = true |
This file contains 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
# snag theme: http://noahfrederick.com/blog/2011/lion-terminal-theme-peppermint/ | |
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration | |
# which adjusts automatically to the width of the terminal. | |
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png | |
# Michal Kottman, 2012 | |
RESET="\[\033[0m\]" | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
YELLOW="\[\033[0;33m\]" | |
update_terminal_cwd() { | |
# Identify the directory using a "file:" scheme URL, | |
# including the host name to disambiguate local vs. | |
# remote connections. percent-escape spaces. | |
local SEARCH=' ' | |
local REPLACE='%20' | |
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}" | |
printf '\e]7;%s\a' "$PWD_URL" | |
} | |
PS_LINE=`printf -- '- %.0s' {1..200}` | |
function parse_git_branch { | |
update_terminal_cwd; | |
PS_GIT_BRANCH='' | |
PS_FILL=${PS_LINE:0:$COLUMNS} | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
PS_GIT_BRANCH="(${ref#refs/heads/}) " | |
} | |
PROMPT_COMMAND=parse_git_branch | |
PS_INFO="$GREEN~davemo@imac$RESET:$BLUE\w" | |
PS_GIT="$YELLOW\$PS_GIT_BRANCH" | |
PS_TIME="\[\033[\$((COLUMNS-10))G\] $RED[\t]" | |
export PS1="\${PS_FILL}\[\033[0G\]${PS_INFO} ${PS_GIT}${PS_TIME}\n${RESET}\$ " | |
function termtitle { | |
echo -ne "\033]0;$1\007" | |
} | |
function pid4portfn { | |
lsof -n -ti tcp:$1 | |
} | |
alias tt="termtitle" | |
alias e="subl" | |
alias be="bundle exec" | |
alias gg="git grep" | |
alias ls="ls -GFh" | |
alias gitflush='git branch --merged master | grep -v master | xargs git branch -d && git remote prune origin' | |
alias tt="termtitle" | |
alias rmnm="find . -name 'node_modules' -exec rm -rf '{}' +" | |
alias dc="docker-compose" | |
alias pid4port=pid4portfn | |
alias fixcamera="sudo killall VDCAssistant" | |
alias ls=exa | |
alias typora='open -a typora' | |
export EDITOR=subl | |
export PATH="$HOME/.nodenv/bin:$PATH" | |
export PATH="$HOME/.nodenv/shims:$PATH" | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
export PATH="$HOME/.rbenv/shims:$PATH" | |
export PATH="$HOME/bin:$PATH" | |
[ -f ~/.fzf.bash ] && source ~/.fzf.bash |
This file contains 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
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_extra_bottom": 2, | |
"caret_extra_top": 2, | |
"caret_extra_width": 3, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Palenight.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": false, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".sass-cache", | |
"tmp", | |
".tmp", | |
"generated", | |
"node_modules", | |
"bower_components", | |
"dist", | |
".cache", | |
"swagger", | |
"build", | |
"resources", | |
".next", | |
".meteor" | |
], | |
"font_face": "Panic Sans", | |
"font_size": 19, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"indent_guide_options": | |
[ | |
"draw_normal", | |
"draw_active" | |
], | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"match_brackets": true, | |
"match_brackets_angle": true, | |
"match_brackets_braces": true, | |
"match_brackets_content": true, | |
"match_brackets_square": true, | |
"rulers": | |
[ | |
120 | |
], | |
"save_on_focus_lost": true, | |
"tab_size": 2, | |
"theme": "Material-Theme-Palenight.sublime-theme", | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"wide_caret": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment