Blog

A collection of quotes, things learned, and who-knows-whats

Just Enough tmux to Do What I Need

As mentioned in Export timed query results from SQL*Plus, I have to SSH into an ubuntu box in order to run queries. Sometimes these queries take a while, so if my SSH connection times out, I’m out of luck.

Download a File Over HTTPS Using Apache Commons' FileUtils

In some of our selenium tests, we download a PDF file generated by our app and then inspect it. This works fine locally since the app URL is http. But in our CI environment, everything is over https. So we had to do some tweaking before calling FileUtils.copyURLToFile. Below is a stripped down version of our solution:

How to Find a Used TCP Port and Kill the Associated Process on Your Mac

Sometimes the port you need is already used by another process. To find the offending process:

Parse a URL in Hugo

Need to parse a URL in your Hugo templates? Thanks to the urls.Parse function, you don’t have to do a bunch of string manipulation. Here’s a quick example.

Syntax Highlighting in Hugo With Chroma

Hugo has built-in syntax highlighting, provided by Chroma. To use it, you just need 2 lines in your config.toml file:

Current page: 35 of 44
Total blog posts: 220