PowerShell equivalent of find

TL;DR: gci -r -fi <filename-pattern> My favorite use of find in bash is to find files whose name matches a pattern. For instance, find all the jar files under this directory: bash# find . -name ‘*.jar’ In PowerShell, there’s a program called “find” but it ain’t the same program. Short Answer Instead, use Get-ChildItem. The … Read morePowerShell equivalent of find

Run Alloy on Windows in Docker

TL;DR: install docker and X410; docker run jessitron/alloy:5.1 The essential work in software development is forming a model in our heads of the system we want. The code is one expression of this model. The code can’t be stronger than this model. So I want a strong model: consistent, complete enough, and expressive. I decided … Read moreRun Alloy on Windows in Docker

PowerShell for `rm -rf`

TL;DR – Remove-Item -Recurse -Force <path> On linuxy systems, rm -rf <path> means “remove this path and everything under it, dammit.” If the files aren’t writeable, but you own the files, it deletes them anyway. In PowerShell, rm is aliased to Remove-Item, but it doesn’t accept -rf. Windows Terminal> rm -rf fooRemove-Item : A parameter … Read morePowerShell for `rm -rf`

Line endings in git

Git tries to help translate line endings between operating systems with different standards. This gets sooo frustrating. Here’s what I always want: On Windows: git config –global core.autocrlf inputThis says, “If I commit a file with the wrong line endings, fix it before other people notice.” Otherwise, leave it alone. On Linux, Mac, etc: git … Read moreLine endings in git

Development aesthetic: experiments

Software development is a neverending string of “What happens if I…?” Each new runtime, language, or tool is a new world with its own laws of nature. We get to explore each one with experiments. Objective Today I added another alias to my PowerShell $profile: To use that alias in my current shell, I need … Read moreDevelopment aesthetic: experiments