Merged.

Pascal J. Bourguignon [2018-11-18 18:05]
Merged.
Filename
cookie
distribution
git-groups
macosx-security-list-keys
shell
ssh-show-host-fingerprints
terminal-loop
workspace-set-keyboard
diff --git a/cookie b/cookie
index d897191..11fab93 100755
--- a/cookie
+++ b/cookie
@@ -1,4 +1,4 @@
-#!/usr/local/bin/clisp -ansi -q -E utf-8 -on-error debug
+#!/usr/local/bin/clisp -ansi -q -E utf-8 -on-error exit
 ;;;; -*- mode:lisp; coding:utf-8 -*-
 ;;;;****************************************************************************
 ;;;;FILE:               cookie
diff --git a/distribution b/distribution
index a26d6a1..c1fe714 100755
--- a/distribution
+++ b/distribution
@@ -400,6 +400,34 @@ declareDarwinVersion "16.1.0"  "Sierra"          "October 24, 2016"    "OS X v10
 declareDarwinVersion "16.3.0"  "Sierra"          "December 13, 2016"   "OS X v10.12.2"                          "build 16C67 16C68"
 declareDarwinVersion "16.4.0"  "Sierra"          "December 20, 2016"   "OS X v10.12.3 Beta 2"                   "build 16D17a"

+declareDarwinVersion "17.0.0"  "High Sierra"     "September 25, 2017"  "OS X v10.13"                            "build 17A365"
+declareDarwinVersion "17.0.0"  "High Sierra"     "October 5, 2017"     "OS X v10.13"                            "build 17A405"
+
+declareDarwinVersion "17.2.0"  "High Sierra"     "October 31, 2017"    "OS X v10.13.1"                          "build 17B48"
+declareDarwinVersion "17.2.0"  "High Sierra"     "November 29, 2017"   "OS X v10.13.1"                          "build 17B1002"
+declareDarwinVersion "17.2.0"  "High Sierra"     "November 29, 2017"   "OS X v10.13.1"                          "build 17B1003"
+
+declareDarwinVersion "17.3.0"  "High Sierra"     "December 6, 2017"    "OS X v10.13.2"                          "build 17C88"
+declareDarwinVersion "17.3.0"  "High Sierra"     "December 6, 2017"    "OS X v10.13.2"                          "build 17C89"
+declareDarwinVersion "17.3.0"  "High Sierra"     "January 8, 2018"     "OS X v10.13.2"                          "build 17C205"
+declareDarwinVersion "17.3.0"  "High Sierra"     "January 8, 2018"     "OS X v10.13.2"                          "build 17C2205"
+
+declareDarwinVersion "17.4.0"  "High Sierra"     "January 23, 2018"    "OS X v10.13.3"                          "build 17D47"
+declareDarwinVersion "17.4.0"  "High Sierra"     "January 23, 2018"    "OS X v10.13.3"                          "build 17D2047"
+declareDarwinVersion "17.4.0"  "High Sierra"     "February 19, 2018"   "OS X v10.13.3"                          "build 17D102"
+declareDarwinVersion "17.4.0"  "High Sierra"     "February 19, 2018"   "OS X v10.13.3"                          "build 17D2102"
+
+declareDarwinVersion "17.5.0"  "High Sierra"     "March 29, 2018"      "OS X v10.13.4"                          "build 17E199"
+declareDarwinVersion "17.5.0"  "High Sierra"     "April 24, 2018"      "OS X v10.13.4"                          "build 17E202"
+
+declareDarwinVersion "17.6.0"  "High Sierra"     "June 1, 2018"        "OS X v10.13.5"                          "build 17F77"
+
+declareDarwinVersion "17.7.0"  "High Sierra"     "July 9, 2018"        "OS X v10.13.6"                          "build 17G65"
+declareDarwinVersion "17.7.0"  "High Sierra"     "July 9, 2018"        "OS X v10.13.6"                          "build 17G2208"
+declareDarwinVersion "17.7.7"  "High Sierra"     "August 28, 2018"     "OS X v10.13.6"                          "build 17G23"
+
+declareDarwinVersion "18.0.0"  "Mojave"          "September 24, 2018"  "OS X v10.14"                            "build 18A384"
+
 # http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history


diff --git a/git-groups b/git-groups
index 1dc4c0a..d5b73b0 100755
--- a/git-groups
+++ b/git-groups
@@ -7,7 +7,7 @@ gsets=()
 gdirs=("$HOME/.config/gpull-dirs"  "$(dirname "$0")/gdirs")
 for dir in "${gdirs[@]}" ; do
     if [ -r "$dir" ] ; then
-        source "$dir" # should define gsets
+        source "$dir" || true # should define gsets
         break
     fi
 done
@@ -44,9 +44,14 @@ function usage(){
     printf "%s usage:\n\n" "$pname"
     printf "  %s [-n|--dry-run] [-v|--verbose] links  # creates the associated symlinks.\n"  "git-group"
     printf "  %s sets                                 # display the list of gsets.\n"        "git-group"
+    printf "  git-group stat [-n|--dry-run] [-v|--verbose] [gset]\n"
+    printf "  git-group pull [-n|--dry-run] [-v|--verbose] [gset] [--all-remotes]\n"
+    printf "  git-group push [-n|--dry-run] [-v|--verbose] [gset] [--all-remotes]\n"
+    printf "  git-group remotes [-n|--dry-run] [-v|--verbose] [gset]\n"
     printf "  gstat [-n|--dry-run] [-v|--verbose] [gset]\n"
     printf "  gpull [-n|--dry-run] [-v|--verbose] [gset] [--all-remotes]\n"
     printf "  gpush [-n|--dry-run] [-v|--verbose] [gset] [--all-remotes]\n"
+    printf "  gremotes [-n|--dry-run] [-v|--verbose] [gset]\n"
     printf "\n"
     printf "gset should be one of: \n"
     print_gsets '             '
@@ -156,6 +161,19 @@ function main(){
             exit 0
             ;;

+        (pull)
+            pname=gpull
+            ;;
+        (push)
+            pname=gpush
+            ;;
+        (stat)
+            pname=gstat
+            ;;
+        (remotes)
+            pname=gremotes
+            ;;
+
         (*)
             gset="$(gset_from_ui "$arg")"
             gotit=0
diff --git a/macosx-security-list-keys b/macosx-security-list-keys
new file mode 100755
index 0000000..bccb12a
--- /dev/null
+++ b/macosx-security-list-keys
@@ -0,0 +1,3 @@
+#!/bin/bash -e
+security dump-keychain | grep labl | awk -F= '{print $2}' | grep -v '<NULL>' | sort -u
+# security dump-keychain | grep 0x00000007 | awk -F= '{print $2}' | grep -v '<NULL>' | sort -u
diff --git a/shell b/shell
index 01f3ca9..8438497 100755
--- a/shell
+++ b/shell
@@ -3034,6 +3034,28 @@ ACCESS MEMLOC 1279AF400  ACCESSING…

 "))

+(defparameter *nasanet*
+  '("
+================== NASANET ========================
+
+X-RAY FLUORESCENCE SPECTROMETER ANALYSIS
+RESULTS
+
+         SAMPLE                UTOPIA PLANITIA
+------------------------   ------------------------
+SILICON OXIDE         45   SILICON OXIDE         45
+IRON                  15   IRON                  15
+MAGNESIUM             08   MAGNESIUM             08
+SULFUR                08   SULFUR                08
+ALUMINUM              06   ALUMINUM              06
+CALCIUM               06   CALCIUM               06
+TITANIUM              01   TITANIUM              01
+OTHER                 05   OTHER                 05
+
+"
+    )
+
+  "Alien Invasion")
 ;;;---------------------------------------------------------------------
 ;;; Run it
 ;;;---------------------------------------------------------------------
diff --git a/ssh-show-host-fingerprints b/ssh-show-host-fingerprints
new file mode 100755
index 0000000..20b51ca
--- /dev/null
+++ b/ssh-show-host-fingerprints
@@ -0,0 +1,4 @@
+#!/bin/bash
+for file in /etc/ssh/*.pub ; do
+    ssh-keygen -lf "$file"
+done
diff --git a/terminal-loop b/terminal-loop
new file mode 100755
index 0000000..d634d3c
--- /dev/null
+++ b/terminal-loop
@@ -0,0 +1,66 @@
+#!/bin/bash
+set -m
+
+programs=(
+    cmatrix
+    top
+)
+pdur=10 # duration of a single program
+current=0
+program=''
+
+function functionp(){
+    local name="$1"
+    [ -n "$(type -t "$name")" ] && [ "$(type -t "$name")" = function ]
+}
+
+
+function run_top_for(){
+    local duration="$1"
+    top -n $duration -d 1
+}
+
+function select_next_program(){
+    local pcount=${#programs[@]}
+    local c=0
+    local p="${programs[$current]}"
+    type -p "$p" >/dev/null 2>&1
+    local e=$?
+    while (( c < pcount && e != 0 )) ; do
+        current=$(( (current+1) % pcount ))
+        (( c++ ))
+    done
+    if (( c >= pcount )) ; then
+        {
+            printf 'There are no runnable programs.\n'
+            printf '  %s\n' "${programs[@]}"
+        } 1>&2
+        exit 1
+    fi
+    current=$(( (current+1) % pcount ))
+    program="$p"
+}
+
+function run_program_for(){
+    local program="$1"
+    local duration="$2"
+    if functionp "$program" ; then
+        eval "run_${program}_for" $duration
+    else
+        $program & pid=$!
+        trap 'kill $pid' EXIT INT
+        ( sleep $duration ; kill $pid ) &
+        fg '%$program'
+        trap '' EXIT INT
+    fi
+}
+
+function main(){
+    while true ; do
+        select_next_program
+        run_program_for $program $pdur
+    done
+    exit 0 ;
+}
+
+main
diff --git a/workspace-set-keyboard b/workspace-set-keyboard
index 9a8014a..ab1bf71 100755
--- a/workspace-set-keyboard
+++ b/workspace-set-keyboard
@@ -10,10 +10,11 @@ function set_keyboard(){
     if type -p setxkbmap >/dev/null 2>&1 ; then
         setxkbmap -layout us \
                   -option ctrl:ac_ctrl \
-		  -option ctrl:nocaps \
+		          -option ctrl:nocaps \
                   -option caps:none \
                   -option shift:breaks_caps \
-                  -option compose:lctrl
+                  -option compose:lctrl \
+                  -option altwin:hyper_win
     fi
 }
ViewGit