All Tags
-
Installing Cursor on Linux Mint
I wanted to try out Cursor so tonight I downloaded the app image. I had never installed from an app image before and it took me a few tries to get it right. This post specifically explains how to install Cursor on Linux Mint, but I assume you could use it to install from other app images. Install...
Read article -
Formatting Golang HTML Templates with Prettier
In the previous article I discussed my setup for hot reloading a Go server using the Air package. Another quality of life improvement I made was to use Prettier to format my templates. I was actually rather surprised to find that Go templates (I'm using the standard library html/template package)...
Read article -
Hot reload for a Go app using Air and Makefile
I've been learning Go via Alex Edwards' excellent books, Let's Go and Let's Go Further. It's been an enjoyable experience so far, and in some ways the development experience is nicer than what I'm accustomed to coming from JavaScript-world. But one thing that I missed was having the server...
Read article -
Managing Slots without the Shadow DOM in Lit Components
The encapsulation benefits of the shadow DOM in a web component are nice, but in some cases unnecessary, or even a bit annoying. For instance, if you some general CSS classes that you'd like to apply inside multiple components. You can opt out of the shadow DOM by adding this to your...
Read article -
Lately I've been working on my CLI note-taking application called min. It's written with Deno and Cliffy. It's taken me a bit of time to get autocompletion working reasonably well, so I thought I'd write up some of the things I've learned. First, to enable the completions you can add a line like...
Read article -
A Spellchecking CLI
There is a rather nice command line spell checker called `aspell`. In this article I explain the basics.
Read article -
Grepping Through Your Dotfiles
I manage my dotfiles with a bare git repository, as described in this post. One issue I have run into is remembering where exactly I added this or that alias. Did I place it in .bash_aliases, or did I create a separate file, like the file for my Git aliases. And what exactly does it do, anyway? Here...
Read article -
A Bash Function for Easy Zipping
I work as a tutor in a software engineering bootcamp, and earlier on in the project students submit their projects, and pass them to us for help, as zip archives. Unzipping an archive at the command line is rather easy. unzip foo.zip But zipping is a bit trickier, and I'd always forget the syntax....
Read article -
On Yargs Autocompletion
Yargs provides some rather nice autocompletion for commands and flags with some minimal setup, but I wanted autocompletion of positional arguments for one of the commands in the CLI clipboard manager I'm making. This clipboard manager (cb) basically does one thing: let's me quickly save the contents...
Read article -
A custom edit action for todo.txt-cli
Frequently I find myself looking for a better way to keep track of my todo list, and I may have found the ideal solution for me: todo.txt. It's a simple plain text syntax for writing todo lists. I've been using it with the todo.txt CLI lately, on Ubuntu and WSL2, syncing the documents with...
Read article -
Automating Node Tasks with VS Code
Last time I wrote about my experiences automating startup tasks for a Rails app in VS Code. Lately I've been working on a fullstack MERN application and decided to automate some tasks on the backend. The app is in a single repo, with this structure: root/ frontend/ backend/ I tried adding...
Read article -
Automating Tasks in Rails with VS Code
I've begun working through the new edition of Michael Hartl's excellent Ruby on Rails Tutorial and found that I had to run a number of commands each time I open my repository, so I decided to try to automate them with VSCode tasks. It's worked fairly well, so here are my results. Before starting, I...
Read article -
Converting GitHub Style Footnotes to HTML with Eleventy
When making my first blog site with NextJS I used Remark to parse the Markdown into HTML. This was nice, and worked fairly well, but I ran into issues with footnotes, which Remark doesn't handle by default. There is a plug-in that supports GitHub flavored Markdown footnotes, but I had trouble...
Read article -
Backing Up WSL2 part 3 of 3
Last time, I automated my backup script with a cron job, but realized it still wasn't automated enough. So I had to automate the automation. Well, that's what I started doing, at least. Then I did something easier. Start cron service with Windows Task Scheduler Following this how to I scheduled a...
Read article -
Backing Up WSL2 part 2 of 3
In my previous entry, I detailed a simple Bash script I wrote to backup my WSL files. I noted that there was still one major problem with the setup — it wasn't automated. This post explains how I resolved that. My first attempt involved writing a cronjob. I'll summarize that attempt here. How to set...
Read article -
Backing Up WSL2 part 1 of 3
This is the first in a three part series detailing my setup for backing up WSL2 files. I'm sure it's not optimal, but it's been working for me so far. The Basic Script First, I started off by writing a simple bash script, based off of one found in this great article: Automatic Backups for WSL2. The...
Read article -
Dotfiles in Version Control
A few months back I set up my first dotfiles repo.undefined I chose the simplest option — turning my $HOME directory into a repo with a .gitignore of *. This went ok, and I was able to set up a new computer with relative ease. But the setup was not without its problems, most of which stemmed from...
Read article -
A Case of the MUMPS
The other day I learned a tiny bit about a programming language called MUMPS. To start with, I learned that there is a programming language and database called MUMPS. It stands for "Massachusetts General Hospital Utility Multi-Programming System" and apparently has a history stretching...
Read article -
Accessing Windows User Directory in WSL2
Not as easy as it sounds.
Read article -
How to search through text with grep
Here are a few ways to use grep — a command line program that allows you to search through text. 1. Search for a pattern in a file The basic syntax is grep <pattern> <filename> where <pattern> is a string or regex. Running this will print each line in <filename> that contains a...
Read article -
Command Line Notes
I've never been a very good note taker, but I've always appreciated the art. When I got my undergraduate degree in math I tried to be studious. I produced massive quantities of notes in Microsoft OneNote. I suppose they were helpful in a way, etching the concepts in my brain. But ultimately the...
Read article -
Automating the Creation of New Github Repos
Today I'm going to walk you through writing a Bash script to automate a common task: creating a new repo on GitHub, setting it as the remote of a local repo, and making your first push to the new repo. This will require you to use GitHub's command line interface, so make sure you've got that set up...
Read article -
A Script to Create React Components. Part 2 of 2
This is the second part of this post on writing a bash script to automate some parts of creating React components. In the first part, we left off with a functioning, but pretty much useless, bash script. Now, let's make it useful. Recall that our proposed script will take an argument representing...
Read article -
A Script to Create React Components. Part 1 of 2
After creating new React components manually for the umpteenth time I decided that the process could be automated a bit. We have CRA for React apps. Why not CRC, for React components? This is part one of a two part article that will walk you through writing a Bash script to automatically create the...
Read article