All entries of my technical and business blog

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.

PHPStorm Docker Not Starting Fix

May 31, 2025 docker phpstorm

Recently, I had an issue with PHPStorm not detecting my Docker configuration. I was using Docker Compose and everything worked fine with docker cli and Orbstack. Why wouldn’t PHPStorm recognize this? It’s a simple fix, actually. It has to do with the name of your project. Let me explain.

How I Launch a Laravel Testbed

Jan 16, 2025 laravel

Sometimes I need to spin up a quick Laravel instance on my Mac to test something out. With just a couple keystrokes, I can get a brand new Laravel instance running in a Docker container, ready for my IDE and testing. Here’s how.

Show Alpine Element After Delay

Sep 2, 2024 javascript

Showing and hiding AlpineJS elements on click or other actions are pretty easy. But what if you just wanted to show the element after a little bit of a delay with no user interaction? We can do that easily!

Let's Refactor a Javascript Snippet for Adding Class on Scroll

Sep 2, 2024 javascript

There’s a common design pattern on a lot of websites to alter the header when the user scrolls down. A lot of times this is simply some sort of handler that adds a class (or removes it). (There are other complex, arguably ‘better’ solutions with IntersectionObserver - but that’s not the point of this article.) Let’s take a look at a very simple version of a script that watches for scroll and adds/removes a class on the body. Then, let’s make it better - and learn while we do it.

Laravel Display Markdown Easily in Blade

Sep 2, 2024 laravel

I love writing in Markdown - and offering that functionality in WYSIWYG editors for our users. But, it just seems so complicated to try to show markdown in Laravel blade files. So, I made a quick anonymous component that makes this easier.

Laravel Log Throttled Users

Sep 1, 2024 laravel security

You’ve got Laravel throttling set up on authentication, password reset and other sensitive endpoints. But, how do you know this is actually working to stop people? Or what if you either want to admonish bad users or proactively reach out with support to help them? Perhaps you might want to log your throttled attempts. It’s pretty easy.