X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=ed1f51d7e59f55d34d48f1d8a3218e2b4ea190bd;hb=5db640adf398b916365ac7a5bd648367acb9355d;hp=a8e4d5f8bccfc1ade53ebd7b25a5a5b30d514f1a;hpb=b6c69a0915fdc162184279f94448e6ff929a06c6;p=distro-setup diff --git a/brc b/brc index a8e4d5f..ed1f51d 100644 --- a/brc +++ b/brc @@ -329,6 +329,18 @@ anki() { fi } +ap() { + # pushd in case current directory has an ansible.cfg file + pushd /a/xans + ansible-playbook -v -l ${1:- $(hostname -f)} site.yml + popd +} +aw() { + pushd /a/work/ansible-configs + time ansible-playbook -v -i inventory adhoc.yml "$@" + popd +} + astudio() { # googling android emulator libGL error: failed to load driver: r600 # lead to http://stackoverflow.com/a/36625175/14456 @@ -366,12 +378,21 @@ bigclock() { } bpull() { + [[ $1 ]] || return 1 + c / + # run latest + install-my-scripts + switch-mail-host $1 $HOSTNAME +} +bpush() { + [[ $1 ]] || return 1 c / # run latest install-my-scripts - switch-mail-host $1 $HOSTNAMEs + switch-mail-host $HOSTNAME $1 } + btc() { local f=/etc/bitcoin/bitcoin.conf # importprivkey will timeout if using the default of 15 mins. @@ -936,7 +957,11 @@ gpg() { } gse() { - git send-email --notes '--envelope-sender=' \ + local email=ian@iankelling.org + if readlink ~/.mu | grep fsf &>/dev/null; then + email=iank@fsf.org + fi + git send-email --notes "--envelope-sender=<$email>" \ --suppress-cc=self "$@" } @@ -1276,6 +1301,21 @@ pfind() { #find *$1* in $PATH find "${pathArray[@]}" -iname "*$1*" } +pkx() { # package extract + c `mktemp -d` + pkg=$1 + cached=$(ls -t /var/cache/apt/archives/$1* | tail -n1) + if [[ $cached ]]; then + cp $cached . + else + aptitude download $pkg + fi + f=(*) + dtrx -m $f + dtrx -fr $f + rm -f $f +} + pk1() { local pid pid=($(pgrep -f "$*")) @@ -2125,6 +2165,9 @@ if [[ $- == *i* ]]; then if [[ -e /nocow/btrfs-stale ]] && ((`command ls -AUq /nocow/btrfs-stale|wc -l`)); then ps_char="! $ps_char" fi + if [[ ! $SSH_CLIENT && $MAIL_HOST != $HOSTNAME ]]; then + ps_char="@ $ps_char" + fi PS1="${PS1%"${PS1#*[wW]}"} \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] " # emacs completion doesnt like the git prompt atm, so disabling it. #PS1="${PS1%"${PS1#*[wW]}"}$(__git_ps1 ' (%s)') \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] "