script

Re-Writing a GlobalProtect OpenConnect VPN Connect script in Babashka

** Edit 2023.001.17: fixed syntax errors CLI command in /usr/bin and username > user This is an update of a previous Babashka1 project2, changed because my organization has switched to a Palo Alto GlobalProtect VPN instead of our former Cisco one. Originally this posed a major problem for OpenConnect, which had troubles with GlobalProtect, but with wersion 9+ of OpenConnect it works smoothly (as long as your provider doesn’t require SAML authentication, which is apparently still buggy in OpenConnect 9).

Re-Writing an OpenConnect VPN Connect script in Babashka

This is the second of a 2-part series of articles.1 It was updated 2021.005.24 to add the :servercert option to the openconnect command. The sundries of just handling arguments and options2 was alone so annoying in Bash that I finally used it as an excuse to play with Babashka3, which I’ve been watching eagerly for quite a while. The script itself is small while providing niceties that would have taken much longer, and also more lines of code, to implement in Bash.

Writing an OpenConnect VPN Connect script in Bash

Bypassing proprietary GUI for VPN connection was a very productive idea, and using OpenConnect to replace the Cisco AnyConnect client which was continually breaking for me proved nice, and provided a nice1 command-line interface to make it scriptable. This is part of a series2 of articles because making something even as trivial as an API wrapper in Bash, gave me a mortifying glimpse of the antiquity of Bash. So after this article, check out the re-work in Babashka, a fast and much better designed interpreter that works as a shell script.

Scratch buffer

I have been deep in emacs for over a decade but still never utilized the scratch buffer until I saw how much it was part of the workflow of a friend. I’ve now fixed may ways and just needed a fast way to open it, optionally in a side Window. I wrote up this quick command and bound it to a convenient hydra key and now I have one-stroke scratch buffer opening.