various improvements
authorIan Kelling <iank@fsf.org>
Tue, 28 May 2019 14:56:15 +0000 (10:56 -0400)
committerIan Kelling <iank@fsf.org>
Tue, 28 May 2019 14:56:15 +0000 (10:56 -0400)
brc
filesystem/etc/ansible/ansible.cfg [new file with mode: 0644]
install-my-scripts
pkgs
subdir_files/.gnupg/gpg.conf

diff --git a/brc b/brc
index a8e4d5f8bccfc1ade53ebd7b25a5a5b30d514f1a..84386907d92e1f4f53683068ac70ec77d73d48c5 100644 (file)
--- 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
@@ -936,7 +948,11 @@ gpg() {
 }
 
 gse() {
-  git send-email --notes '--envelope-sender=<ian@iankelling.org>' \
+  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 +1292,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 +2156,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)\] "
diff --git a/filesystem/etc/ansible/ansible.cfg b/filesystem/etc/ansible/ansible.cfg
new file mode 100644 (file)
index 0000000..d233caa
--- /dev/null
@@ -0,0 +1,28 @@
+# note the default file has a bunch of comments. you can
+# extract it from the deb to read them:
+
+# cd `mktemp -d`
+# aptitude download ansible
+# dtrx ansible
+# a
+# find -iname ansible.cfg
+
+[defaults]
+forks          = 200
+host_key_checking = False
+display_skipped_hosts = False
+retry_files_enabled = False
+remote_user = root
+# readable output
+stdout_callback = yaml
+# show execution time
+callback_whitelist = timer, profile_tasks
+
+
+[ssh_connection]
+pipelining = True
+retries = 2
+
+[colors]
+# found in color.py. default blue is hard to read
+verbose = bright blue
index 3025d84f8af80d7e9b7e439d4db8f417e70224ab..6c7aabf2bb0a57d6a04f09102002a2d76b1c62dd 100755 (executable)
@@ -31,4 +31,4 @@ x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*}
 e() { echo "$*"; "$@"; }
 
 # scripts that would interfere with unmounting /a, put them elsewhere
-e install /a/bin/log-quiet/log-once btrbk-run mount-latest-subvol check-subvol-stale /usr/local/bin
+e install /a/bin/log-quiet/log-once switch-mail-host btrbk-run mount-latest-subvol check-subvol-stale /usr/local/bin
diff --git a/pkgs b/pkgs
index d52a3f2729c145a30bfba45852076954b8069594..3b7754debe1a3061be082f0e8df12e0440d4cea4 100644 (file)
--- a/pkgs
+++ b/pkgs
@@ -135,11 +135,13 @@ p4=(
   markdown
   mb2md
   meld
+  mhonarc
   moreutils
   mps-youtube
   mpv
   mumble
   nagstamon
+  namazu2
   ncdu
   nginx-doc
   nmap
@@ -172,6 +174,7 @@ p4=(
   sqlite3-doc
   squashfs-tools
   strace
+  subversion
   swh-plugins
   tar-doc
   tcpdump
index 57c80646a2d51b79b7760e8b8f616cc01a607694..d98337c56c9a17d9024830281d4e8e7fcb53f317 100644 (file)
@@ -11,7 +11,7 @@ use-agent
 # https://security.stackexchange.com/questions/84280/short-openpgp-key-ids-are-insecure-how-to-configure-gnupg-to-use-long-key-ids-i
 # https://evil32.com/
 # another option is 0xshort
-keyid-format 0xlong
+keyid-format long
 
 
 default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF