til

Wednesday, February 17, 2021

A couple of terms that deal with perceptual distortions and cognitive bias: apophenia - a tendency to see connections between two unrelated things. pareidolia - the faulty perception of a pattern in an image, e.g. seeing a face in a geologic formation on Mars. Pareidolia is a specific form of apophenia.

Friday, January 29, 2021

Custom aliases in oh-my-zsh With oh-my-zsh, you can store custom aliases in multiple (?per application) file under .oh-my-zsh/custom giving them .zsh file extensions.1 ¶For example, in my hugo.zsh file, I have: alias hnewtil="/Users/alan/Documents/blog/ojisan/scripts/newtil.sh" alias gtojisan="cd /Users/alan/Documents/blog/ojisan; ls -l;" Executing inline Python in a shell script It’s possible using the -c command.2 python -c 'import foo; foo.bar()' https://scottwhittaker.net/posts/oh-my-zsh-custom-aliases/ ↩︎ https://stackoverflow.com/questions/16908236/how-to-execute-python-inline-from-a-bash-shell ↩︎

Thursday, January 28, 2021

til
A bunch of Unix date scripting things Unix shell scripting is not one of my better-know areas of programming, but it’s on my list of things to learn. Some interesting bits about the date function.1 Want the long date, like Thursday, January 28, 2021? → date +"%A, %B %d, %Y" Want something like the above but with abbreviated month Thursday, Jan 28, 2021? → date +"%A, %b %d, %Y" Time zone in the format of "-05:00" on macOS is: #!