Skip to content

Commit

Permalink
more dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
balaclark committed Aug 30, 2015
1 parent 18c9369 commit 8097b40
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
43 changes: 43 additions & 0 deletions aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Colorize the ls output ##
alias ls='ls -G'

## Use a long listing format ##
alias ll='ls -laG'

## Show hidden files ##
alias l.='ls -d .* -G'

alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias less='less -FSRXc' # Preferred 'less' implementation
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
alias f='open -a Finder ./' # f: Opens current directory in MacOS Finder
alias ~="cd ~" # ~: Go Home
alias c='clear' # c: Clear terminal display
alias which='type -all' # which: Find executables
alias path='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
alias show_options='shopt' # Show_options: display bash options settings
alias fix_stty='stty sane' # fix_stty: Restore terminal settings when screwed up
alias cic='set completion-ignore-case On' # cic: Make tab-completion case-insensitive
mcd () { mkdir -p "$1" && cd "$1"; } # mcd: Makes new Dir and jumps inside
trash () { command mv "$@" ~/.Trash ; } # trash: Moves a file to the MacOS trash
ql () { qlmanage -p "$*" >& /dev/null; } # ql: Opens any file in MacOS Quicklook Preview
alias DT='tee ~/Desktop/terminalOut.txt' # DT: Pipe content to file on MacOS Desktop


alias gpr='gpr() { git fetch && git checkout origin/pr/$1 && pliers -t assets_v2/pliers.js build }; gpr'
alias gmpr='gmpr() { git fetch && git merge origin/pr/$1 && pliers -t assets_v2/pliers.js build }; gmpr'

# from ben p
alias tmux='tmux -2'
alias lock='dm-tool lock'

# tig aliases
alias ts='tig status'
19 changes: 19 additions & 0 deletions gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[user]
email = balaclark@gmail.com
name = Bala Clark
[push]
default = simple
followTags = true
[core]
excludesfile = ~/.gitignore_global
editor = vim
autocrlf = input
[credential]
helper = osxkeychain
[alias]
ci = commit
co = checkout
st = status
br = branch
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
my = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --reverse --all --since=1.month.ago --author='Bala Clark'
24 changes: 24 additions & 0 deletions mongorc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
DBCollection.prototype.read = function (id) {
return this.findOne({ _id: ObjectId(id) })
}

DBCollection.prototype.delete = function (id) {
return this.remove({ _id: ObjectId(id) })
}

function notablescan() {
var currentValue = db.getSiblingDB('admin').runCommand({ getParameter: 1, notablescan: 1 }).notablescan

printjson(db.getSiblingDB('admin').runCommand({ setParameter: 1, notablescan: !currentValue }))
}

function clearUpTestDbs() {
var dbs = db.adminCommand('listDatabases').databases
dbs.forEach(function (database) {
if (database.name.match(/^test.+/)) {
print('Dropping DB: ' + database.name)
db.getSiblingDB(database.name).dropDatabase()
}
})
}
clearUpTestDbs()

0 comments on commit 8097b40

Please sign in to comment.