Note to Self

Posts helping me remember how to do something I don't do often enough to remember. Or, that have enough steps in a particular order that I need to remember. Hopefully, they may help you, too.

May 25, 2024

xargs tips

XARGS things to remember xargs -p will show the command find . -name "foo" -print0 | xargs -0 (<<< print0 null, xarg uses null instead of space, in case file...

Read

May 24, 2024

Code Coverage VSCode With PHPUnit

Need: Get some code coverage up for unit tests in vscode. PHPUnit can handle outputting the necessary coverage information. Coverage Gutters can read the outputting coverage file (in xml). I'm...

Read

May 22, 2024

VSCode settings.json file

My settings.json file as of 2024-05-22, mostly for backup purposes:

Read

May 20, 2024

Hacky php file to do some auto-checks for pull requests

I wrote this hacky PHP file to assist me in doing pull request reviews as well as to check my own, to make the best use of my team's time. These are just things I wanted to examine every time without...

Read

May 18, 2024

Big O Notation

Used to analyze worst-case (usually) complexity to check resource requirements for runtime as inputs increase. Not about the hardware, etc. High level view. How long: time complexity. Memory...

Read

May 18, 2024

SOLID Progamming Principles

The Principles: Single Responsibility - the class should do one thing and thus would only have one stakeholder with a reason to change it. Open-Closed - add functionality without changing the...

Read

May 18, 2024

Redis client commands I want to remember

In laravel local, while devving vendor/bin/sail redis redis-cli (command, container, client) In forge/prod: Delete keys based on a part:

Read

May 17, 2024

Brew (homebrew) commands and tips

Homebrew/brew MacOSX:

Read

May 13, 2024

Mocking in Unit Tests

In testing a specific class, you mock it's dependencies to make sure that class calls the dependency correctly. Mock the dependency. shouldReceive - declare what should be called...

Read

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

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

February 27, 2022

Update Internet Information Server (IIS) Fast CGI Timeout

When debugging on Windows using Internet Information Server, if I took too long to step through what I was debugging, it would time out and I'd have to start over. Talk about anxiety! Lol. This...

Read

January 2, 2022

Quick and Dirty API endpoint testing using devtools console.

Sometimes I'd be on a client network, without access to tools like Postman. But, I'd want to test and endpoint to see what's what. So, a little hackery with the devtools console and I'm good:...

Read

August 17, 2021

Fix Git/Apache/Curl Self-Signed Cert issue

This is mainly a reminder to myself about how to do this, and the link to Matt Ferderer's website with the real instructions: Real Instructions Notes: Apache curl:...

Read

February 8, 2021

Install an SSL Cert in Apache

openssl pkcs12 -in domain.com.pfx -out domain.com.pem -nodes openssl rsa -in domain.com.pem -out domain.com.cert.key openssl x509 -in domain.com.pem -out domain.com.cert.crt Assuming copy those...

Read

February 8, 2021

SQL Snippets to Remember

Row Number Over: Find Duplicates: To determine if there is a duplicate:

Read

December 23, 2020

Note to Self - Using AWS Client’s S3 Sync

This is pretty easy to do. If you use homebrew on a mac, open a terminal and type: brew install awscli I’m assuming that you can to apt-get install awscli on Linux, as...

Read

December 23, 2020

Setting up DNS for your AWS S3 static web site

Target Audience This post is aimed at relatively capable web/devops. People like me. I’m not going to remember everything, so I’ll probably re-read this myself in a few months or a year when I...

Read

December 23, 2020

Setting up an AWS S3 bucket for your static web site

Target Audience This post is aimed at relatively capable web/dev ops. People like me. I’ll probably re-read this myself in a few months or a year when I forget how to go about this. “Static...

Read

December 23, 2020

WordPress-to-static using wget mirror functionality and AWS S3

I like using WordPress. I’ve used it, AEM, Jekyll, a version of Laravel-as-CMS (currently Jigsaw and a lot of custom built code (in the early days). I don’t like how WordPress seems to be a main...

Read