version 1.0

A while back I posted about a script I wrote called version. https://github.com/bit101/version You pass it the name of a program and it tells you what version of that program you have installed. Example: version java This saves you from having to remember if it’s java -v, java –version, java -V or something else (no spoilers). version now knows how to get the version of 156 different programs (including itself). It has 9 contributors and 15 stars. Not exactly React, but it’s cool to have people contributing. In the original proof of concept, I was using bash case statements. In

Continue reading

Grep and Sed, Demystified

I’ve kind of half understood grep for a while, but assumed that I didn’t really get it at all. I thought I knew nothing at all about sed. I took some time this weekend to sit down and actually learn about these two commands and discovered I already knew a good deal about both of them and filled in some of what I didn’t know pretty easily. Both are a lot more simple and straightforward than I thought they were. Grep grep comes from “global regular expression print”. This is not really an acronym, but comes from the old time

Continue reading

New Shell Script Shortcut

I’m often making shell scripts for various things – sometimes just a quick one for a specific task, sometimes just to test something out, sometimes for some kind of workflow task that I plan to keep around. It’s always the same steps: Create the file. Add the header: #! /bin/bash Write the code. Save it. Exit the editor. Make it executable with chmod +x <filename> Run, test, edit, etc. When you’re repeating yourself, time for some automation. So I wrote a shell script that creates shell scripts. #! /bin/bash if [ -f “$1” ] then echo “$1 already exists” exit

Continue reading

Git-based Wiki

For many years I’ve bounced around using different tools to save information that I might need later. I’ve used MS OneNote, Evernote, Workflowy, Dynalist, Notion, several other hosted and self-hosted wiki systems, and probably many other things. If I had to name a favorite out of all those, I’d go with Workflowy. It’s a super simple text outliner. You start with a single top level page. Each page is a list of items, and can each have a nested sub-list, with effectively unlimited depth. But you can also focus on any node so that it becomes a page in itself.

Continue reading