-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
312 additions
and
545 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#### Aiases #### | ||
# Reload this file due to frequent edits | ||
alias reload='source ~/.bashrc' | ||
|
||
#enable color support of ls and also add handy aliases | ||
#enable color support of ls and also add handy aliases | ||
if ls --color > /dev/null 2>&1; then # GNU `ls` | ||
colorflag="--color=auto" | ||
else # OS X `ls` | ||
colorflag="-G" | ||
fi | ||
|
||
alias ls='ls ${colorflag}' | ||
alias grep='grep ${colorflag}' | ||
alias fgrep='fgrep ${colorflag}' | ||
alias egrep='egrep ${colorflag}' | ||
|
||
alias lx='ls -lXB ${colorflag}' # sort by extension | ||
alias lk='ls -lSr ${colorflag}' # sort by size | ||
alias lm='ls -alh |more' # pipe through 'more' | ||
alias lsd='ls -lh | grep "^d"' # list only directories | ||
alias lsl='ls -lh | grep "^l"' # list only links | ||
|
||
# list long, human readable, ignore implied~, | ||
# ignore compiled python files | ||
alias ll='ls -hlB --group-directories-first --hide=*.pyc' | ||
|
||
# list including .dotfiles | ||
alias lsa='ls -lAh --group-directories-first' | ||
alias lz="ls -lZ" # SELinux display | ||
|
||
## directory aliases | ||
alias mkdir='mkdir -p' #Make intermediaries | ||
|
||
# Disk usage | ||
alias du="du -h" | ||
|
||
# Grepping | ||
alias h="history | grep" | ||
|
||
# emacs modes | ||
alias gemacs="emacs-snapshot-gtk" | ||
alias nemacs="emacs -nw" | ||
|
||
# maven stuff | ||
alias mvnc="mvn clean && mvn -Dmaven.test.skip=true install" | ||
|
||
# moving aliases | ||
alias ..='cd ..' | ||
alias ...='cd ../..' | ||
alias ....='cd ../../../' | ||
alias downloads='cd ~/downloads' | ||
|
||
# apt aliases | ||
alias ainstall='sudo apt-get install' | ||
|
||
# Misc | ||
alias rtfm='man' | ||
|
||
# Verify mvn build | ||
alias verify='mvn checkstyle:checkstyle checkstyle:check pmd:pmd pmd:check && mvn test -T4' | ||
|
||
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm | ||
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm update npm -g; npm update -g; sudo gem update --system; sudo gem update' | ||
|
||
# View HTTP traffic | ||
alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'" | ||
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" | ||
|
||
# Enhanced WHOIS lookups | ||
alias whois="whois -h whois-servers.net" | ||
|
||
# Hide/show all desktop icons (useful when presenting) | ||
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" | ||
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" | ||
|
||
# Show/hide hidden files in Finder | ||
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" | ||
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" | ||
|
||
# IP addresses | ||
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" | ||
alias localip="ipconfig getifaddr en0" | ||
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Default editor | ||
export EDITOR="emacs -nw -q" | ||
|
||
# History settings file size | ||
export HISTSIZE=32768; | ||
export HISTFILESIZE=$HISTSIZE; | ||
export HISTCONTROL=ignoredups; | ||
|
||
# Make some commands not show up in history | ||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"; | ||
|
||
# Prefer US English and use UTF-8 | ||
export LANG="en_US.UTF-8"; | ||
export LC_ALL="en_US.UTF-8"; | ||
|
||
# Don’t clear the screen after quitting a manual page | ||
export MANPAGER="less -X"; | ||
|
||
# Always enable colored `grep` output | ||
export GREP_OPTIONS="--color=auto"; | ||
|
||
### THIS MACHINE SPECIFIC STUFF #### | ||
export M2=~/.m2/repository | ||
export WORKON_HOME=~/Envs | ||
|
||
#### PATH #### | ||
export PATH=/usr/local/bin:/usr/local/sbin:$PATH | ||
export PATH=$PATH:~/bin:/usr/local/go/bin | ||
export PATH=$PATH:/usr/local/share/npm/bin | ||
export LD_LIBRARY_PATH=`pwd` | ||
|
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ -n "$PS1" ] && source ~/.bash_profile; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
[user] | ||
name = gnoremac | ||
email = cgandevia@gmail.com | ||
[push] | ||
default = simple | ||
|
||
[alias] | ||
|
||
# View abbreviated SHA, description, and history graph of the latest 20 commits | ||
l = log --pretty=oneline -n 20 --graph --abbrev-commit | ||
|
||
# View the current working tree status using the short format | ||
s = status -s | ||
|
||
# Show the diff between the latest commit and the current state | ||
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" | ||
|
||
# `git di $number` shows the diff between the state `$number` revisions ago and the current state | ||
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" | ||
|
||
[apply] | ||
|
||
# Detect whitespace errors when applying a patch | ||
whitespace = fix | ||
|
||
[core] | ||
|
||
# Use custom `.gitignore` and `.gitattributes` | ||
excludesfile = ~/.gitignore | ||
attributesfile = ~/.gitattributes | ||
|
||
# Treat spaces before tabs and all kinds of trailing whitespace as an error | ||
# [default] trailing-space: looks for spaces at the end of a line | ||
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line | ||
whitespace = space-before-tab,-indent-with-non-tab,trailing-space | ||
|
||
# Make `git rebase` safer on OS X | ||
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/> | ||
trustctime = false | ||
|
||
[color] | ||
|
||
# Use colors in Git commands that are capable of colored output when | ||
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) | ||
ui = auto | ||
|
||
[color "branch"] | ||
|
||
current = yellow reverse | ||
local = yellow | ||
remote = green | ||
|
||
[color "diff"] | ||
|
||
meta = yellow bold | ||
frag = magenta bold # line info | ||
old = red # deletions | ||
new = green # additions | ||
|
||
[color "status"] | ||
|
||
added = yellow | ||
changed = green | ||
untracked = cyan | ||
|
||
[diff] | ||
|
||
# Detect copies as well as renames | ||
renames = copies | ||
|
||
[help] | ||
|
||
# Automatically correct and execute mistyped commands | ||
autocorrect = 1 | ||
|
||
[merge] | ||
|
||
# Include summaries of merged commits in newly created merge commit messages | ||
log = true | ||
|
||
# URL shorthands | ||
|
||
[url "git@github.com:"] | ||
|
||
insteadOf = "gh:" | ||
pushInsteadOf = "github:" | ||
pushInsteadOf = "git://github.com/" | ||
|
||
[url "git://github.com/"] | ||
|
||
insteadOf = "github:" | ||
|
||
[url "git@gist.github.com:"] | ||
|
||
insteadOf = "gst:" | ||
pushInsteadOf = "gist:" | ||
pushInsteadOf = "git://gist.github.com/" | ||
|
||
[url "git://gist.github.com/"] | ||
|
||
insteadOf = "gist:" |
Oops, something went wrong.