Check NPM Package Size

If you need to pair down your main js file and want to check what packages are eating up the size, BundlePhobia is a great resource to use. While there are several other tools including CLI tools for discovery, BundlePhobia makes it easy to just search and browse. If you have another way of managing … Read more

Error: Permission denied @ apply2files

homebrew banner

If you are getting the following brew cleanup error “Permission denied @ apply2files”, the top solution is to reset permissions to /user/local. We are going to rewrite permission to the current user. In your terminal copy and paste below. Another solution is to completely reinstall brew. User the code below to uninstall and reinstall. Good … Read more

Fast Insert CSV Data to Laravel From S3

The Story (skip if ya just want the code) I’ve fussed with this problem for weeks. If you need to import massive amounts of csv data (100k to 10mil) to your Laravel site there’s a lot of broken information. Some of it is outdated, others are just bits and pieces. But here’s generally how the … Read more

Laravel Relationships Migration Schema

I’ve been having to look up relationship schemas too frequently and haven’t found a decent place that outlines them with migration and eloquent relationship declaration side by side. So if you’re looking for how to build a migration for (insert here) relationship, here it is. *Based on Laravel 7 One to One One to Many … Read more

Case Insensitive Columns Postgres

Unsuccessful with the making columns case-insensitive framework level, I had to go deeper. Here’s how I changed my Postgres columns to be case-insensitive, and ultimately solve my model relationship problems. CITEXT Extension for Postgres You needs to provision the extension to the database. If you use Heroku (like me here’s a simple step). The citext module provides … Read more

Laravel Case Insensitive Model Relationships

Normally, for case insensitive where queries, you can use the ‘ILIKE’ operator. But if you’re linking a prepopulated dataset, there’s a chance where a foreign key string doesn’t quite match another table’s key. There’s not too much info on getting case insensitive relationships working other than digging into the database dictionary and building your own … Read more

Suspend Terminal Process

I was running a lengthy terminal process when my laptop was about to die. And what do you know? You can suspend terminal processes and resume them later. Suspend There are many ways to go about it. The simplest way is to press ctrl + z in the terminal that’s running the process. Shortcut “ctrl” … Read more