Next.js with and without CSS modules

I recently started using Next.js instead of create-react-app (CRA) for building React apps. The main reason is for server-side rendering. I found it a bit tricky to modify the webpack configuration, so I'm sharing how I managed to match some behaviour from CRA. By default, recent versions of CRA let you import foo.module.css in your … Continue reading Next.js with and without CSS modules

How to upgrade Debian 8 Jessie to Debian 9 Stretch

This past weekend, I upgraded my laptop (eeyore) from jessie to stretch.  As I've been running debian testing for the last 20 years, this is the first time I've actually had to do an upgrade.  Unfortunately I hit a few snags. Problem #1: Upgrading without uninstalling packages When you run apt-get dist-upgrade, you find that … Continue reading How to upgrade Debian 8 Jessie to Debian 9 Stretch

Removing exactly one physical volume from an ext4 filesystem

While there appear to be many webpages explaining how to resize/shrink a volume, I haven't seen one that resizes/shrink the filesystem to exactly the right size, and then resizes/reduces the logical volume to match.  The accepted approach appears to be to resize the filesystem to definitely smaller than the logical volume will be, then reducing the … Continue reading Removing exactly one physical volume from an ext4 filesystem

Dependency Injection Design Pattern in Java: Example

Dependency Injection Design Pattern Program to an 'interface', not an 'implementation'. This is the premise of dependency injection. It goes one step further to allow libraries that use the interface library to not 'depend' on the implementation library even though they depend on the interface library. That is, the implementation can be 'injected' at run … Continue reading Dependency Injection Design Pattern in Java: Example

Moved to wordpress.com

Not that there are many on CSE who host their blog using wordpress, but for those that have, to migrate: export from CSE (e.g., https://cgi.cse.unsw.edu.au/~jayen/blog/wp-admin/export.php) import onto wordpress.com (e.g., https://jayenashar.wordpress.com/wp-admin/admin.php?import=wordpress) choose an appropriate theme (if you were using a custom theme on CSE that you can't use on wordpress.com) fix up your widgets move any … Continue reading Moved to wordpress.com