Seb De Deyne
Christoph Rumpel published his revamped site last week, built with Laravel and Tailwind CSS. He based the site’s architecture on my personal site (yeah, the one you’re reading now). I open sourced it about a year ago, and I’m glad to see that it provided value to someone!
Read the full article on Christoph Rumpel’s new blog.
Laravel quick tip! The
@extends Blade directive accepts a second (undocumented) parameter to pass data to the parent layout.
Every now and then I come accross a
Class log does not exist exception in Laravel. This particular exception is thrown when something goes wrong really early in the application, before the exception handler is instantiated.
Whenever I come across this issue I’m stumped. Mostly it’s related to an invalid configuration issue or an early service provider that throws an exception. I always forget how to debug this, so it’s time to document my solution for tracking down the underlying error.
I love this post!
At its core,
requestAnimationFrame doesn’t do much: it’s basically just a method that executes a callback. In fact, there are very few differences between doing
doSomething(). So, what’s so special about it? I’m glad you asked! In short:
requestAnimationFrame schedules the callback call on the next repaint
requestAnimationFrame passes the callback the current time
There are a few other distinctions, but these are the main benefits. Now,
requestAnimationFrame doesn’t create an animation on its own, it’s the sequence of successive callbacks that will make things move on the screen.
My favorite part: since a large part of animating with
requestAnimationFrame consists of composing small mathematical expressions, you can apply all sorts of functional programming tricks to your code.
Learn all about it on Benjamin De Cock’s blog.
I’m building a multi-tenant Laravel application. One of the requirements of the project is that every client can have their own theme based on their corporate guidelines. By default a few css adjustments will suffice, but some clients request a completely different template.
Conditionally loading a different stylesheet per client is pretty trivial, but in order to use a completely different view per theme you quickly end up typing the same thing over and over across various parts of your application.
We just open sourced our company guidelines site! We previously kept the contents in a private wiki on GitHub, but I’m glad we finally put the time in giving the contents a real home.
Like our docs site, the content is stored in markdown files, which can directly be edited on GitHub. The site deploys whenever something’s pushed to the master branch.
As for why we decided to open source it all…
This site contains a set of guidelines we use to bring our projects to a good end. We decided to document our workflow because consistency is one of the most valuable traits of maintainable software.
The contents of this site exist for ourselves—more importantly, our future selves—and for giving future collegues a reference to our way of doing things and their quirks. The guidelines cover workflow, code style, and other little things we consider worth documenting.
The guidelines are available on guidelines.spatie.be.
Headless Chrome to the rescue! Chrome can run as a cli tool, and print a pdf file from a url. All I had to do was make some layout tweaks to make everything printer-friendly.
Today I was writing a form component that needed an optional back button. Since the form component is generic, the back button could point to anything.