A place where I capture raw, quick notes worth remembering.

August 22, 2025

phoenix elixir

Removing Daisy UI from Phoenix

New Phoenix projects ship with Daisy UI by default, but you might want something else. Personally, I’m a fan of the Fluxon UI library and don’t need Daisy. Luckily, it’s really simple to remove Daisy UI from your project.

Start with the CSS file. Open assets/css/app.css and remove the Daisy UI plugin declarations:

@plugin "../vendor/daisyui" { ... }
@plugin "../vendor/daisyui-theme" { ... }

There is two theme declarations, light and dark, that you would want to remove…

Next, clean up the vendor files. Delete these files from assets/vendor/:

  • daisyui.js
  • daisyui-theme.js

If you want to make it really clean, update the documentation in lib/your_app_web/components/core_components.ex. The module comment mentions Daisy UI and links to their documentation. Remove these references and keep only the Tailwind CSS information.

Run mix assets.build to verify everything compiles. If your build succeeds, you’re done. Your Phoenix app now runs on pure Tailwind CSS without Daisy UI’s component classes and themes.

Permalink

July 22, 2025

mac

Drag Windows on MacOS

This handy tweak lets you drag windows from anywhere on the window, not just the title bar. Perfect for when you’re working with windows that have minimal chrome or when the title bar is out of reach.

Hold Control + and click anywhere on a window to drag it around.

To enable this behavior, run:

defaults write -g NSWindowShouldDragOnGesture -bool true

You’ll need to log out and back in for the change to take effect.

Permalink

July 14, 2025

ui

A More Refined Firefox

I switched back to Firefox because a web without ad blocking is unbearable. Yes, I could make it work again, but I want to support a more open web.

Turns out, the default Firefox could be much improved, with a few small tweaks.

Refined Firefox interface

First, let’s start with some more speed and security. Let’s install BetterFox. These are some optimized settings that others figured out for you.

Next, let’s use native theming on macOS. Go to about:config and set:

  • browser.theme.native-theme to true
  • widget.macos.titlebar-blend-mode.behind-window to true

Finally, I also switched to vertical tabs. You can find this option under “Browser Layout” in the settings.

There you go, a leaner, faster Firefox. Enjoy!

Permalink

June 24, 2025

prompts

The Brutally Honest Prompt

OpenAI pulled back a newly released model a while ago because it was too sycophantic. The new release was better, but I still get annoyed by how full of praise they often are.

Maybe it’s living in the Netherlands for so long, but sometimes I want an AI that will tell me when my thinking is sloppy, not one that congratulates me for having thoughts at all.

So, for some tasks, when I want to challenge my ideas, this is the prompt I use:

In all responses, prioritize intellectual rigor over social pleasantries. When I present ideas, probe their weaknesses, examine their underlying assumptions, and identify gaps in logic or evidence. Offer substantive counterarguments when you disagree, and when you do agree, explain your reasoning rather than simply affirming.

Challenge me to think more precisely about ambiguous terms, unsupported claims, or conclusions that don’t follow from premises. Point out potential blind spots in my perspective and suggest alternative frameworks for understanding the issue.

Your goal is to help me refine my thinking, not to make me feel good about my initial thoughts.

⚠️ Warning: this can make the model quite blunt, even rude. It called me an idiot more than once.

Permalink

May 14, 2025

elixir phoenix

Local config for Phoenix

Here’s a handy tip: create Phoenix configurations that live only on your machine, not in version control.

I use this for setting machine-specific domain names. It’s ideal for any development settings that shouldn’t live in your shared repository.

First, add this snippet at the bottom of config.exs:

if File.exists?("#{__DIR__}/#{config_env()}.local.exs") do
  import_config "#{config_env()}.local.exs"
end

Create a file named dev.local.exs and Phoenix will load it. Add this to your .gitignore to keep it local:

# Ignore local environment configs
*.local.exs

Your machine-specific settings won’t touch production or bother teammates. Common uses:

  • Local database credentials
  • Custom domain names (like dev.localhost)
  • Local service endpoints
  • Personal log levels

Everyone on your team can customize their environment without stepping on each other’s toes. Enjoy!

Permalink

February 6, 2025

unix

Downloading YouTube videos with yt-dlp

yt-dlp is a powerful command-line tool for downloading videos from YouTube and other platforms. I frequently use it to save videos for offline viewing, particularly before long flights or to archive interesting content.

On macOS, you can install it using Homebrew:

brew install yt-dlp

Here’s the onfiguration that I use:

yt-dlp \
  --cookies-from-browser safari
  --format bestvideo+bestaudio
  --merge-output-format mp4
  -o "%(title)s.%(ext)s"

You can either supply these options through the command line or save them in a config file at ~/.config/yt-dlp/config. The config file format is straightforward - just list the flags one per line:

--cookies-from-browser safari
--format bestvideo+bestaudio
--merge-output-format mp4
-o "%(title)s.%(ext)s"

Once configured, downloading a video is as simple as:

yt-dlp https://youtube.com/watch?v=...

The video will download in the highest available quality and save to your current directory.

Permalink

December 24, 2024

vim

Insert mode for commit messages in Neovim

Want to save one keystroke and a few milliseconds? I’m trying something out, when I do my git commits, to start in insert mode, so I can start typing immediately.

You can do this by adding a new autocommand for git commit messages. In Neovim and Lua you create one like this:

vim.api.nvim_create_autocmd("FileType", {
  pattern = "gitcommit",
  callback = function()
    vim.cmd("startinsert")
  end,
})

If for example you are using Lazyvim, add the above to your ~/.config/nvim/lua/config/autocmds.lua file.

Permalink

December 24, 2024

linux

Reboot with specific boot entry

Sometimes I’m working on a system and I want to reboot it, but I don’t want it to go to the default boot entry. E.g. I have Arch on my desktop, but it defaults to Windows so my kids can easily start the computer.

If you are using EFI, you can reboot into a specific boot entry, just one time.

First, show the boot entries that you currently have:

sudo efibootmgr -v

Then, pick the entry you want to reboot in:

sudo efibootmgr -n 0000

Now you can reboot, and it will boot into that specific entry.

Permalink

December 5, 2024

fish shell

Make and jump into directory easily

Very often - like ALL the time - you end up creating a new directory with mkdir -p some_path and then immediately typing cd some_path right after. Such a waste of typing!

Here’s a super handy little function that does both things at once. Just drop this in your config and thank me later:

For Fish:

function mkcd
    mkdir -p $argv[1]; and cd $argv[1]
end

For those that have to still learn that Fish is the best shell, here’s Bash and ZSH:

mkcd() {
    mkdir -p "$1" && cd "$1"
}

Now you can just type mkcd ~/.config/test and boom - directory created and you’re already inside it! The -p flag means it’ll create any missing parent directories too, so you can go as deep as you want. Way better than typing two commands every single time, right?

Permalink

December 4, 2024

elixir

ElixirLS from Source

While the standard ElixirLS installation works well for most developers, running it from source provides access to the latest features and improvements. Recently, after discussing this setup with a colleague, I realized others might benefit from learning how to implement this configuration.

Before proceeding, ensure you have Erlang and Elixir installed on your system. While I personally use Mise for version management, asdf works as well.

Begin by cloning the ElixirLS repository and installing its dependencies:

git clone [email protected]:elixir-lsp/elixir-ls.git
cd elixir-ls
mix deps.get

Next, compile and install ElixirLS. I recommend storing it in ~/.local/share for better organization. The installation commands vary slightly depending on your shell:

For Fish shell users:

env MIX_ENV=prod mix compile
env MIX_ENV=prod mix elixir_ls.release2 -o ~/.local/share/elixir-ls

For Bash or ZSH users:

MIX_ENV=prod mix compile
MIX_ENV=prod mix elixir_ls.release2 -o ~/.local/share/elixir-ls

Editor Configuration

After installation, the executables will be available in ~/.local/share/elixir-ls. You’ll need to configure your editor to use this installation.

For Zed, add the following to your configuration:

"lsp": {
  "elixir-ls": {
    "binary": {
      "path": "/Users/<you>/.local/share/elixir-ls/language_server.sh"
    }
  }
}
  • Neovim users can reference my configuration on GitHub.
  • VSCode users should update the elixirLS.languageServerOverridePath setting.

To maintain the latest version of ElixirLS, simply pull the latest changes from the repository and recompile:

cd elixir-ls
git pull
MIX_ENV=prod mix compile
MIX_ENV=prod mix elixir_ls.release -o ~/.local/share/elixir-ls

This setup ensures you always have access to the most recent ElixirLS features and improvements while maintaining a clean, organized development environment.

Permalink