This piece answers whether the built-in security of macOS is enough to forgo a third-party antivirus solution, and how admins can document that security for a SOC 2 audit. β οΈ This post links to an external website. β οΈ | Continue reading
I've run into a problem where I've used an attribute casted as an array in a Laravel resource and I wanted to preserve the keys of that array. By default, Laravel will re-index the array, which is not what I wanted. To preserve the keys, you can use the preserveKeys method on the … | Continue reading
We wrote previously about how much we enjoyed using LiveView with LiveSvelte. Since then, we've open sourced a lot of LiveView/LiveSvelte code. I thought it would be a good time to share the design patterns that have emerged with this stack so far. I'll focus primarily on how we … | Continue reading
Phoenix's LiveView has polarized our team. Compared to SPA, there are components and features that we're able to build 2-3x faster. Conversely, there are components and features that are frustrating to build or feel very counterintuitive. Said another way, LiveView makes a lot of … | Continue reading
Webhooks are a supplement to many APIs. With a webhook system in place, System B can register to receive notifications about certain changes to System A. When a change occurs, System A pushes the change to System B, usually in the form of making an HTTP POST request. Webhooks are … | Continue reading
A while ago, MySQL version 9 was released and I wanted to keep using version 8 to stay in sync with our production systems. I found out that Homebrew allows you to pin packages to a specific version so that won't accidentally get upgraded when running brew upgrade. Here's how you … | Continue reading
Honestly, these three lines of code should be all you need to show somebody the immense power of Elixir. With just one function call, you can parallelise a task over all available CPUs. One! 1# Counts the characters in each word and returns the overall sum. 2# 3# Task.async_strea … | Continue reading
In the first post of this mini-series, we learned how to implement basic permissions for your schemas, how to group them into roles, and how to assign the roles to our users. We used the role to check a user's permissions in our Phoenix Controllers. Our controllers lie at the out … | Continue reading
Hey folks, before we begin: Salespeople can be persistent, can't they? The other day, one tried to sell me a coffin. I told him that's the last thing I need! Anyways. Today, we'll look into how to set up a basic roles and permissions (RAP) system with Phoenix and Ecto. I got this … | Continue reading
PostgreSQL has native support for objects stored as JSON as actually binary JSON (or JSONB). With JSONB format, you can add index do the column for faster and more efficient reads. Even though the format supports both storing arrays of maps and nested maps, I suggest making it si … | Continue reading
If you've used Ruby before, background job queues are a tool you might reflexively reach for when building applications in Elixir. While such solutions exist, you may find that they aren't used that much in Elixir, which might leave you wondering why. I mean, don't Elixir applica … | Continue reading
Departure mono is a monospaced pixel font with a lo fi technical vibe. β οΈ This post links to an external website. β οΈ | Continue reading
In de wielersport worden er veel termen gebruikt die nergens anders worden gebruikt. β οΈ This post links to an external website. β οΈ | Continue reading
You might know that you can add a .iex.exs file to your project to have some code executed when you start an IEx session. But did you know that you can also have a global .iex.exs file? This file is located in your home directory and is executed every time you start an IEx sessio … | Continue reading
One of the typical issues with pagination is if you have more filters with GET parameters on your page. How to keep them from disappearing when the user clicks to visit /?page=2? β οΈ This post links to an external website. β οΈ | Continue reading
One way to guard against out-of-memory errors in applications is to add some swap space to your server. In this guide, we will cover how to add a swap file to an Ubuntu 20.04 server. β οΈ This post links to an external website. β οΈ | Continue reading
Build a hybrid search engine with semantic, full-text, and fuzzy search - all within Postgres Search is hard. It's a critical part of many apps, but getting it right isn't easy. This is especially true for RAG-pipelines where the quality of retrieval can make or break the entire … | Continue reading
Given our company's role enabling SAML SSO, I often hear about the SSO Tax. It's usually pretty negative; people feel strongly about this stuff. The SSO Tax For those of you less familiar with the SSO Tax, you may find an overview of single sign-on (SSO) helpful. More briefly, si … | Continue reading
Like your versioning scheme, your changelog is a vital and oft-overlooked method of communication to your users. Unfortunately, it's easy to write a changelog, but hard to write a great one. The Keep a Changelog project offers some good high-level guidelines, but speaking as some … | Continue reading
Pom was a Belgian comic artist, best known as the creator of the humorous adventure series, 'Piet Pienter en Bert Bibber' (1951-1995). While barely known outside Flanders, the comic enjoys a cult following to this day. The stories are marked by odd verbal jokes, cynical comedy an … | Continue reading
When you see a small bug or error in a repository, a common refrain is to submit a pull request to fix it. To submit a pull request with a correction is an act of kindness to the maintainers. It allows the maintainers to review the change and accept it with a click. But it's a bi … | Continue reading
Remember the chat bot hype circa 2016? Well, seeing as we have the ability to implement chat with far greater capabilities at our disposal, I couldn't help but create my own Slack bot powered by LLMs. At the moment, it doesn't do a whole lot, but it is available to shoot the shit … | Continue reading
I'm currently in the thick of a massive update to our Phoenix LiveView course. (It'll be a free update if you already own it! 😉) And yesterday I discovered a better way to auto-format HEEx templates in VS Code. Indeed, formatting .heex files and ~H sigils is fairly straig … | Continue reading
Laravel Policies are responsible for authorizing an action on a resource in your application. They bundle the authorization logic for a particular model or resource, allowing you to keep your code neat and maintainable. This post will focus more on Laravel Policies, their setup, … | Continue reading
To format JSON on save in VS code, just add ths to your settings.json file: 1{ 2 "[json]": { 3 "editor.formatOnSave": true 4 }, 5 "[jsonc]": { 6 "editor.formatOnSave": true 7 }, 8} | Continue reading
Laravel offers so many excellent test helpers that let you write expressive tests with minimal effort. For example, you can use Event::assertDispatched in a feature test to assert that a specific event was dispatched. This method allows you to just specify the event name, but you … | Continue reading
When we started riding wide, supple tires more than a decade ago, we wondered about rim width. Do extra-wide tires need extra-wide rims? Figuring this out was part of our research into tire and bicycle performance. Last week, Zipp introduced their new 303 XPLR gravel wheels. Thei … | Continue reading
A customizable GitHub Actions to free disk space on Linux GitHub Actions runners. On a typical Ubuntu runner, with all options turned on (or not turned off rather), this can clear up to 31 GB of disk space in about 3 minutes (the longest period is calling apt to uninstall package … | Continue reading
A package to restore database backups made with spatie/laravel-backup. β οΈ This post links to an external website. β οΈ | Continue reading
Critical power (CP) is momenteel erg in de mode. Het wordt besproken door coaches, vergeleken door atleten, en eerlijk gezegd klinkt het gewoon een beetje sexyer dan zijn neef, functional threshold power (FTP). Hoewel de metingen qua aard vergelijkbaar zijn, hebben ze enkele subt … | Continue reading
If you want to use a forked package in Laravel, here are the steps you need to follow: Create a fork of the package on GitHub. Create a new branch in the fork which will contain your changes. Make the necessary changes to the package in the new branch. Push the changes to the for … | Continue reading
Welcome to Stream. If you're reading the public version of this consider checking out our careers page. We're currently hiring for Go roles of entry to principal/director levels. Stream is an API for building chat, live video and activity feeds. We power thousands of apps and rea … | Continue reading
We use factories a lot. Did you know about the "for[Relation]" and "has[Relation]" magic methods? You just need to make sure you have the relationship set up in your model and you are good to go 🚀 1// You need to have User and Posts factories 2$user = User::factory() 3 … | Continue reading
MD5 is like a cockroach - it's persistent and pops up everywhere, but one thing is very clear: you need to stop using it (and SHA-1 too)! β οΈ This post links to an external website. β οΈ | Continue reading
Dispatching closure jobs after response can be a really nice way to do some cleanup 💅: 1$pdf->store('file.pdf'); 2 3// Delete the file after the response has been sent 4dispatch(fn () => Storage::delete('file.pdf'))->afterResponse(); 5 6return Zip::download('file.pdf'); … | Continue reading
After completing three editions of The Transcontinental Race (TCR), winning two and placing second in another, Christoph Strasser's TCR packs remain unchanged. What can we learn from the packs that have crossed a continent three times? β οΈ This post links to an external website. β … | Continue reading
Postgres allows the use of any existing database on the server as a template when creating a new database. I'm not sure whether pgAdmin gives you the option on the create database dialog but you should be able to execute the following in a query window if it doesn't: 1CREATE DATA … | Continue reading
I was certainly surprised when I found out that there is no built-in method to create table columns with custom types in Laravel migrations. The default list of column types available in Laravel may be more than enough for most applications, but, I think there are some valid use … | Continue reading
To install the psql client version 16 on Ubuntu, you need perform a couple of steps. First, update the package index and install required packages: 1sudo apt update 2sudo apt install gnupg2 wget nano Add the PostgreSQL 16 repository: 1sudo sh -c 'echo "deb http://apt.postgresql. … | Continue reading
Have you ever felt like you're making the code harder to read for the sake of testing? Imagine, you have this existing code and it's not tested. It does a bunch of side-effects. People say you should put that code under tests before touching it. So you begin to follow advice like … | Continue reading
This is my initial attempt at implementing RAG in Elixir. My goal is to develop a system similar to PrivateGPT by gaining a deeper understanding of the concepts and improving chunking and metadata techniques. For this project, I intentionally avoided using LangChain or OpenAI to … | Continue reading
Mocking data is a common technique for testing software that depends on external sources of data, such as databases, web services, or APIs. Mocking data means creating fake or simulated data that mimics the real data, but without actually interacting with the external source. Moc … | Continue reading
Templates in a Phoenix application ultimately get compiled to functions that can be quickly rendered with the necessary data. We can take a look at how a template will be rendered using Phoenix.View.render_to_string/3. First, we need a template: 1# user.html.eex 2
Wielrennen is van oudsher een conservatieve sport. Een sport waar omvang en kwaliteit van de geleverde trainingsarbeid nog steeds niet in de juiste verhouding staan. De hartslagmeter heeft daar weinig of geen verandering in kunnen brengen omdat de vereiste intervalarbeid niet via … | Continue reading
To check the installed version: 1$ mix phx.new -v 2Phoenix installer v1.7.11 To update, you can do this: 1$ mix archive.install hex phx_new 2Resolving Hex dependencies... 3Resolution completed in 0.041s 4New: 5 phx_new 1.7.14 6* Getting phx_new (Hex package) 7All depende … | Continue reading
'Ik ben niet goed, ik denk dat ik gewoon harder moet trainen.' Dat is zo'n beetje de standaard zin van iedere fietser die niet tevreden is met zijn of haar vorm. Was het inderdaad maar zo simpel dat je gewoon harder moet trainen, want vaak is dat helemaal niet het geval. Veel fie … | Continue reading
To efficiently work with and transform lists in Elixir, you will likely need utilize a list reversing function from time to time. Your best bet is to reach for the Erlang implementation which is available as part of the lists module. Here are a couple examples of how to use it: 1 … | Continue reading
Inspired by randonneurs of a past era, Jan Heine revived the RenΓ© Herse brand 13 years ago to focus on building tires suitable for his favourite adventures in the Cascade Mountains, while also saying true to the brands nearly century-old legacy. β οΈ This post links to an external … | Continue reading