writer://
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:
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. A class that handles a report. Two things can change: the...
ReadMay 17, 2024
Brew (homebrew) commands and tips
Homebrew/brew MacOSX:
Mac with M1/M3/M4: arch -arm64 brew install
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...
April 30, 2024
Networking
In the subnet 192.168.1.0/30, the available addresses are as follows:
CIDR Notation: /30 indicates that the first 30 bits of the IP address are the network portion, leaving 2 bits for...
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...
ReadFebruary 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...
ReadJanuary 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.
ReadJanuary 17, 2024
How to Generate a Laravel API Token using Artisan Tinker
Generate a basic Laravel users.api_token:
ReadDecember 23, 2023
How to disable warning that MacOSX switched to zsh
To avoid this message: Add this to ~/.bashrc: From Stackoverflow
Read