Skip to content

Instantly share code, notes, and snippets.

View abathur's full-sized avatar
🦖

Travis A. Everett abathur

🦖
View GitHub Profile
#!/nix/store/z6rd8wq02azalrlm2m5k08iy53klg624-bash-5.1-p12/bin/sh
# (c) Christoph Sieghart <sigi@0x2a.at> 2007 - 2011
VERSION=0.9.2
# Flags for commandline options
S_FLAG=0
C_FLAG=0
trap 'if [ $S_FLAG -eq 1 ]; then clean_temp_dir; clean_cursor; fi' 0 1 2
dr-xr-xr-x - abathur 31 Dec 1969 /nix/store/p0876isrv4gi1pbfkc6bms737grzwjlj-python3.8-j2cli-0.3.10
dr-xr-xr-x - abathur 31 Dec 1969 ├── bin
.r-xr-xr-x 964 abathur 31 Dec 1969 │ ├── .j2-wrapped
.r-xr-xr-x 371 abathur 31 Dec 1969 │ └── j2
dr-xr-xr-x - abathur 31 Dec 1969 ├── lib
dr-xr-xr-x - abathur 31 Dec 1969 │ └── python3.8
dr-xr-xr-x - abathur 31 Dec 1969 │ └── site-packages
dr-xr-xr-x - abathur 31 Dec 1969 │ ├── j2cli
.r--r--r-- 261 abathur 31 Dec 1969 │ │ ├── __init__.py
dr-xr-xr-x - abathur 31 Dec 1969 │ │ ├── __pycache__
--- /nix/store/1nqnzfqzxsxrwafksffj78w48jc1iah8-shunit2-2.1.8/bin/shunit2 1969-12-31 18:00:01.000000000 -0600
+++ /nix/store/zh0ac2n6wyff2kpxc32wai8szhj4mk8z-resholved-shunit2-2.1.8/bin/shunit2 1969-12-31 18:00:01.000000000 -0600
@@ -29,15 +29,15 @@
# Logging functions.
_shunit_warn() {
- ${__SHUNIT_CMD_ECHO_ESC} \
+ echo -e \
"${__shunit_ansi_yellow}shunit2:WARN${__shunit_ansi_none} $*" >&2
}
@abathur
abathur / hierarchical_shell-esque_language.md
Last active June 14, 2022 13:44
some sort of hierarchical shell-esque language?

I'm just ~braindumping something to (hopefully) get it out of my head.

status quo

Part of what I like about shell is how squishy/pliable the language is. For a while I've had the nagging sense that it is really close to being an interesting format for a lot of different kinds of plain-text ~DSLs...

  • go to the store later is a perfectly-good shell invocation. If you wanted some little task/TODO DSL, you could dive right in by writing
@abathur
abathur / 0_script_install_of_automator_folder_action_workflow.md
Last active March 12, 2024 19:19
Script to install and activate a macos Automator folder action workflow. This isn't fully unattended. You'll have to click through dialogs.

My macos system/dotfile bootstrap process uses brew bundle to install some apps. This takes a while to complete, so I hoped to use an Automator Folder Action workflow to watch the /Applications/ directory and launch a few apps that require logins as soon as brew bundle finishes installing them.

Automator did not do a good job of this (I did 3 test runs and it never opened each of the apps in the trigger list), but I didn't realize that until after I figured out how to actually install and activate the workflow during my bootstrap process. I wanted to go ahead and share the bits of this process in the hope someone else trying to accomplish the same will need a little less work.