summary refs log tree commit diff
path: root/bashrc
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2015-11-29 10:02:06 -0800
committerFranck Cuny <franckcuny@gmail.com>2015-11-29 10:02:06 -0800
commitbda89777b831c757820a789c1941ba2164a38434 (patch)
tree079b46bac7133a16611a3aabe6b7dc39fe9513c6 /bashrc
parent[emacs] add smart-mode-line (diff)
downloademacs.d-bda89777b831c757820a789c1941ba2164a38434.tar.gz
Add a few aliases to bash.
Some aliases to navigate to different repositories or directories, and a
function to run `puppet` on a list of hosts.
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc21
1 files changed, 20 insertions, 1 deletions
diff --git a/bashrc b/bashrc
index 9382d5e..63a96f1 100644
--- a/bashrc
+++ b/bashrc
@@ -66,15 +66,34 @@ alias gerp="grep --color=auto"
 alias grep="grep --color=auto"
 
 alias pjson="python -mjson.tool"
+alias s="cd ~/src/source"
+alias eb="cd ~/src/source/eventbus"
+alias ops="cd ~/src/twitter-ops"
 
 # tmux
 alias tmux='tmux -2'
 alias tmuxl='tmux new -A -s local'
 alias tmuxr='tmux new -A -s remote'
 
+# local stuff
+[ -f "${HOME}/.bash_local" ] && source "${HOME}/.bash_local"
+
 function gitme {
   git config --local user.email "franckcuny@gmail.com"
   git config --local user.name "Franck Cuny"
 }
 
-[ -f "${HOME}/.bash_local" ] && source "${HOME}/.bash_local"
+function puppet-master {
+  local hostlist=$1
+  if [[ -z "${hostlist}" ]]; then
+    echo "host list is missing"
+    return 1
+  fi
+
+  batch_size=$(sed -n '$=' "${hostlist}")
+  if [[ "${batch_size}" -gt 10 ]]; then
+    batch_size=10
+  fi
+  loony -F "${hostlist}" -t "${batch_size}" run sudo puppet-util run
+}
+