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

Laravel Chunk vs. Cursor

I’ve been fighting memory limits more often than I thought I would have to. Giving me the thought that perhaps I’m building my query wrong. But there are a few helpful helpers that can keep the memory low. Two of them being chunk() and cursor(). This speed test is brought to you by @ryo511. His … Read more

Redis Cheatsheet for Mac

Credit goes to @tommysmile. type below: To have launchd start redis now and restart at login: Or, if you don’t want/need a background service you can just run: Test if Redis server is running. If it replies “PONG”, then it’s good to go! Location of Redis configuration file. Uninstall Redis and its files.