Notes

by Matt Stubbs

How to upgrade Heroicons in an existing Phoenix app

29 October 2024

Heroicons are a set of SVG icons stored in assets/vendor/heroicons. They are setup when you run mix phx.new along with a handy UPGRADE.MD file that explains the simple upgrade process:

export HERO_VSN="2.0.16" ; \
  curl -L "https://github.com/tailwindlabs/heroicons/archive/refs/tags/v${HERO_VSN}.tar.gz" | \

Replace the 2.0.16 with the latest version on Heroicons and that should do it.

My project was created before the ‘micro’ size class of icons was created so I needed to add them to tailwind.config.js

plugin(function ({ matchComponents, theme }) {
  let iconsDir = path.join(__dirname, "./vendor/heroicons/optimized");
  let values = {};
  let icons = [
    ["", "/24/outline"],
    ["-solid", "/24/solid"],
    ["-mini", "/20/solid"],
    ["-micro", "/16/solid"], // Added this line
  ];

MightyMoud/sidekick

24 October 2024

Bare metal to production ready in mins; your own fly server on your VPS. - MightyMoud/sidekick

Looks similar to Kamal (listed under inspiration, along with Fly.io).

The docs include sections explaining what each command does:

What does Sidekick do when I run this command

  • Build your docker image locally for linux
  • Compare your latest env file checksum for changes from last time you deployed your application.
  • If your env file has changed, sidekick will re-encrypt it and replace the encrypted.env file on your server.
  • Deploy the new version with zero downtime deploys so you don't miss any traffic.

That's a nice way of explaining what is going under under all the abstraction.

livescript: Rerun .exs files as they change

21 October 2024

Love Livebook, but want to write .exs files? Livescript runs your .exs files in an iex shell, and reruns them on change. The key is that it doesn't rerun the whole file, only the parts that changed. Just like Livebook stale tracking, though admittedly simplified.

Looks handy for prototyping and when things are getting too complicated for . Like running but without needing the test case scaffolding.

All notes →