Invoke Automator Workflows From Terminal/Shell on OSX

Working on more automation around this blog, I learned last night that it's possible to run Automater workflows from the shell: /usr/bin/automator ~/Desktop/workflow.workflow This can also be used within a shell script! Which could be added to launchd... Thanks to kcrypted for the tip!…

Using VS Code Remote Development with EC2 Instance Connect

VS Code's SSH Remote Development extension is great. It lets you SSH into any remote server and visually see, edit, and transfer file. It's a wonderful experience and makes debugging so much nicer, particularly when the resources needed by what you're working on can't be accessed locally (RDS databases, for…

Using custom data sources in node-convict via the convict.load() function to simplify application configuration

node-convict is a wonderful NPM module that lets you declaratively define configuration settings via JSON (or Javascript objects) and where the values for those configuration options should cozme from (environmental variables, command line arguments, etc), as well as add validation and even add documentation for them. It's incredibly flexible and…

Record PXL Footage with an Android Smartphone

The PXL 2000 is a toy video camera that I've used to record some dope footage. A friend who runs the PXL film festival, PXL THIS, asked me to write up how I got it to work: Note that this method has only been tested using a Google Pixel XL…

Getting and Parsing the Repository Root Using Git

git rev-parse --show-toplevel Will print the full, absolute path for a git repo. This can be passed into sed for further processing. For instance: export p="/Users/brettneese/Development/git/github.com/brettneese/testdir/sub/test.txt" export GIT_PATH=$(git rev-parse --show-toplevel) echo $p | sed "s:^${GIT_PATH}::" | cut…

Running Commands In the Root of a Git Directory

I work in monorepos a lot, and often finding myself needing to run commands at the root of a git repoistory from inside a package folder inside the repository. From the root, I use Lerna to run commands in each of the sub-packages, but when I'm cd'd into the subdirectory…