All entries of my technical and business blog

A Deep Dive Into Print Css Headers and Footers

Oct 23, 2025 css html

For a project I’m working on, I had to become very familiar with the print CSS styles for headers and footers. The goal is two fold: 1) to have a nice printable version and 2) to use a chrome-pdf tool to download as PDF.

Regardless of the two consuming sources, I just wanted to solve this all as one html/css file. So, it was necessary to explore all of the different options we have now, in 2025, on Chrome.

In this blog entry, see print (pdf) versions of the different header/footer functionality in CSS including built-in page margin and header/footer tools as well as fixed/forced hacks.

Why You Might Want to Hydrate Models to Delete Them in Laravel

Oct 15, 2025 laravel

There are many ways to handle cascading functionality in Laravel. You can do this with observers, events, manually dispatched jobs - even in MySQL with cascading deletes.

I prefer to keep my cascading logic in the application code by using Eloquent Model Events. This is super easy when it’s just a single level of model. But what about relationships?

Reusing DotEnv Configuration with the Shell

Sep 29, 2025 php scripting

A common security pattern is to add environment-specific configuration and secrets into a local, unversioned file. You’re probably already doing this with a tool called DotEnv. Let’s see how we can reuse that between PHP and the shell.

Livewire 3 Reactive Event Dispatching

Sep 9, 2025 laravel

Issuing events with Livewire is a useful way to communicate between components. But, there are some caveats to be aware of - especially if you’re coming from something like React or Vue. The majority of this comes from the fact that Livewire treats every component as an island.

This had stumped me a few times in the past. Because of this, I wanted to give a quick example of how you can use Livewire events in a way that you might be more familiar with: with reactivity.

Showing UTC in the Users Timezone Easily

Jun 18, 2025 html javascript

In most of my applications, time is reflected in the UTC timezone. This is great for logic and math, but not so great when showing the date to the regular user.

Now, it’s pretty easy to show the UTC dates in the user’s timezone, without even asking them what it is.

Let’s see how to do this with a little bit of HTML and Javascript.