Blog

February 4, 2024

How to do an SQL Delete based on a Join

I'm mostly used to simple deletes using where clauses, but I know a DBA who prefers to use joins. To get more familiar, I've been doing simple stuff like that. The syntax between MS-SQL and MySQL is...

Read

February 1, 2024

A Simple PHP Benchmarking function

I recently needed to find where some performance issues were and didn't have the time to download and figure out any real-life tools, but this basic system helped. I could just sprinkle...

Read

January 31, 2024

MySQL - Find What Tables Have a Column Name

How to find out what tables in a MySQL database have a specific column, by name.

Read

January 17, 2024

How to Generate a Laravel API Token using Artisan Tinker

Generate a basic Laravel users.api_token:

Read

December 23, 2023

How to disable warning that MacOSX switched to zsh

To avoid this message: Add this to ~/.bashrc: From Stackoverflow

Read

November 29, 2023

Fix Links in Devtools Console

So, I'm right now working on moving hansanderson.com from a Wordpress-to-static S3 site to a Laravel Jigsaw-to-static S3 site. During this, I found that while my WP docker setup had my test lcl site...

Read

June 18, 2023

Reminder about PHP TS vs NTS

From PHP Documentation: Thread Safety means that binary can work in a multithreaded webserver context, such as Apache 2 on Windows. Thread Safety works by creating a local storage copy in each...

Read

May 7, 2023

Useful Git Snippets

Bring back a deleted file, after it's been committed and pushed: git checkout <deletion commit hash>~1 -- <filename> Pull without going thru all the SSL self-signed BS but...

Read

March 17, 2023

Find, based on Time

GAME. CHANGER. newerBt is “birth time” where newerCt is “change time” which doesn’t find things being copied around. WOOHOO!!! (newermt!)...

Read

December 8, 2022

Basic but Useful SSL Expiration Date checker

At an old job, every now and then we'd have a fire drill because, despite it being a large, capable organization, no one seems to track when an SSL cert expires. So, I created this little script to...

Read