5dd4e6c93b90

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 23 Jan 2024 10:17:59 -0500
parents f864dc9b9822
children e33b12427793
branches/tags (none)
files bin/abcl bin/abcl-raw bin/install-figlet-fonts bin/rsync-file-pattern gitignore hgignore htoprc stumpwmrc vim/custom-dictionary.utf-8.add

Changes

--- a/bin/abcl	Tue Jan 09 16:11:16 2024 -0500
+++ b/bin/abcl	Tue Jan 23 10:17:59 2024 -0500
@@ -1,3 +1,3 @@
 #!/usr/bin/env bash
 
-rlwrap-lisp /usr/local/bin/abcl "$@"
+rlwrap-lisp abcl-raw "$@"
--- a/bin/abcl-raw	Tue Jan 09 16:11:16 2024 -0500
+++ b/bin/abcl-raw	Tue Jan 23 10:17:59 2024 -0500
@@ -1,4 +1,5 @@
 #!/usr/bin/env bash
 
 set -e
-/usr/local/bin/abcl --noinform "$@"
+
+java -jar /usr/local/bin/abcl.jar --noinform "$@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/install-figlet-fonts	Tue Jan 23 10:17:59 2024 -0500
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+# I'm so sick of doing this shit by hand every time I get a new computer.
+#
+# cd ~/src/
+# git clont https://github.com/xero/figlet-fonts
+
+for f in /home/sjl/src/figlet-fonts/*.fl*; do
+    dest="$(echo "$f" | cut -d/ -f 6 | tr '[:upper:] ' '[:lower:]-')"
+    sudo cp "$f" "/usr/share/figlet/$dest"
+done
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/rsync-file-pattern	Tue Jan 23 10:17:59 2024 -0500
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+# USAGE: rsync-file-pattern PATTERN SOURCE DEST
+#        rsync-file-pattern '*.ipynb' ./ vm:path/to/foo/
+
+# Goal: given a source and dest, sync any files inside the source that match
+# a given pattern.  Rsync's syntax for this is utterly deranged, so I'm making
+# a script so I don't have to search for this every time.
+
+pattern="$1"
+shift
+
+source="$1"
+shift
+
+dest="$1"
+shift
+
+
+rsync -av \
+    --prune-empty-dirs \
+    --include='*/' \
+    --include="$pattern" \
+    --exclude='*' \
+    "${source}" "${dest}" \
+    "$@"
+
--- a/gitignore	Tue Jan 09 16:11:16 2024 -0500
+++ b/gitignore	Tue Jan 23 10:17:59 2024 -0500
@@ -17,6 +17,6 @@
 *.dx64fsl
 .sjl-rsync-exclude
 sjl-jupyter
-sjl-sync-vm.sh
+sjl-sync-*.sh
 
 *.waiting
--- a/hgignore	Tue Jan 09 16:11:16 2024 -0500
+++ b/hgignore	Tue Jan 23 10:17:59 2024 -0500
@@ -8,3 +8,4 @@
 *.dx64fsl
 *.lx64fsl
 .notmylispwords
+.ipynb_checkpoints
--- a/htoprc	Tue Jan 09 16:11:16 2024 -0500
+++ b/htoprc	Tue Jan 23 10:17:59 2024 -0500
@@ -2,7 +2,7 @@
 # The parser is also very primitive, and not human-friendly.
 htop_version=3.2.2
 config_reader_min_version=3
-fields=0 48 17 18 38 39 40 2 46 47 49 1
+fields=0 48 17 18 39 2 46 47 49 1
 hide_kernel_threads=1
 hide_userland_threads=1
 hide_running_in_container=0
@@ -38,17 +38,17 @@
 column_meter_modes_0=1 1 1
 column_meters_1=RightCPUs2 Tasks LoadAverage Uptime
 column_meter_modes_1=1 2 2 2
-tree_view=0
-sort_key=46
+tree_view=1
+sort_key=39
 tree_sort_key=0
 sort_direction=-1
 tree_sort_direction=1
 tree_view_always_by_pid=1
 all_branches_collapsed=0
-screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
-.sort_key=PERCENT_CPU
+screen:Main=PID USER PRIORITY NICE M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
+.sort_key=M_RESIDENT
 .tree_sort_key=PID
-.tree_view=0
+.tree_view=1
 .tree_view_always_by_pid=1
 .sort_direction=-1
 .tree_sort_direction=1
--- a/stumpwmrc	Tue Jan 09 16:11:16 2024 -0500
+++ b/stumpwmrc	Tue Jan 23 10:17:59 2024 -0500
@@ -311,13 +311,16 @@
 
 ;;;; Sound --------------------------------------------------------------------
 (defcommand mute () ()
-  (run-shell-command "mute"))
+  (run-shell-command "mute")
+  (echo "Muted."))
 
 (defcommand volume-up () ()
-  (run-shell-command "amixer -q sset Master 5%+"))
+  (run-shell-command "amixer -q sset Master 5%+")
+  (message "Volume: ~D%" (volume)))
 
 (defcommand volume-down () ()
-  (run-shell-command "amixer -q sset Master 5%-"))
+  (run-shell-command "amixer -q sset Master 5%-")
+  (message "Volume: ~D%" (volume)))
 
 
 ;;;; Brightness ---------------------------------------------------------------
@@ -437,6 +440,14 @@
         (pass:*pass-notification-message* t))
     (pass:pass-copy)))
 
+(defcommand pass-um-1 () ()
+  (echo "Copying UM level 1 password, touch key.")
+  (run-shell-command "pass -c umich.edu/slosh"))
+
+(defcommand pass-um-2 () ()
+  (echo "Copying UM level 2 password, touch key.")
+  (run-shell-command "pass -c umich.edu/l2"))
+
 (defcommand switch-yubikeys () ()
   (echo (run-shell-command "switch-yubikeys" t)))
 
@@ -699,6 +710,8 @@
   ("H-F4" "switch-yubikeys")
   ("H-\\" "pass-personal")
   ("H-|" "generate-password")
+  ("s-1" "pass-um-1")
+  ("s-2" "pass-um-2")
   ("H-b" "browser")
   ("H-O" "spotify")
   ("H-o" "files")
@@ -847,8 +860,8 @@
      ("C--" . "S-C-SunPageDown")
      ("C-0" . "S-C-Home"))
     ("(firefox|Google-chrome|Chromium-browser)"
-     ("s-1" . "C-S-Tab")
-     ("s-2" . "C-Tab")
+     ("s-[" . "C-S-Tab")
+     ("s-]" . "C-Tab")
      ("C-a" . "Home")
      ("C-e" . "End")
      ;; I always try to hit ctrl-d to kill a browser window because I'm so used
--- a/vim/custom-dictionary.utf-8.add	Tue Jan 09 16:11:16 2024 -0500
+++ b/vim/custom-dictionary.utf-8.add	Tue Jan 23 10:17:59 2024 -0500
@@ -371,3 +371,36 @@
 thermocycling
 Torrin
 thermocycle
+Neisseria
+Gonorrhoeae
+Azithromycin
+Ceftriaxone
+Quinolone
+Quinolones
+folates
+sulfanilamide
+prodrug
+diethylene
+Prontosil
+transpeptidase
+lactam
+crosslinking
+crosslink
+Unicycler
+FASTQs
+Jupyter
+topoisomerases
+topoisomerase
+quinolone
+ribosomes
+macrolide
+Macrolides
+Trimmomatic
+microbiome
+BI529
+BS522
+BS521
+NCBI
+conda
+Dhatri
+OOMs