TypeScript with Vite and NPM
One of my biggest annoyances with JavaScript is its lack of a strong type system. We’ve all seen the crazy memes around it – 0 == [], new Array(5).join(“a”-10) + ” Batman!”, and more. Trying to develop with libraries gets really frustrating when you don’t know, until runtime, whether a function wants a String, a […]
Maintainable Ways to Set Up WordPress Hooks
What Are Hooks? In WordPress, we’re encouraged to use their hooks and filters. So what are they? Basically, they allow one to plug custom functionality into WordPress at predefined points of execution. I’m sure you’ve seen them; ever dealt with add_action(“init”, ‘setup_theme_plugins’); ? That’s a way of telling WordPress, “When you get to the ‘init’ […]
Environment Configuration for WordPress and Drupal
What is Multi-Stage Configuration? When I first started web development, the idea of multi-stage configuration of websites was very foreign to me. What is it? According to Capistrano, the most popular Ruby Gem for application deployment, “[multi-stage] allows [one] to use a different deployment strategy for different scenarios.” Basically, it allows you to have multiple configurations […]
Bash Cheat Sheet for Web Masters
Bash Scripting Bash scripting is so useful; it allows us to take many mundane, common tasks like fixing permissions, setting up virtual hosts and deploying website versions and condense them to one line commands. Here is a bash cheat sheet of some of the more simple one-liners that I’ve run across in my time. Feel […]
Laravel – Using View Creators to Make Default Values
What is a “View Model”? In web MVC architecture, there are scenarios you run into where you’d like the same set of dynamic information passed into each view, but that view isn’t called from one location. One such example is a menuing system. The items you pass into the navigation might potentially always be the […]
Staying Informed About Drupal Security Updates
The Problem I have a few Drupal sites (which I don’t really enjoy maintaining), and this year, Drupal has released 6 security patches for Drupal 7. Drupal has an Update Manager Module, but the issue with this is that it sends emails about every single type of update available, so after seeing “Updates Available” for […]
Importing a SQL File That is Too Big for PHPMyAdmin
Oh Noes! My Database is Bigger than the Upload Limit! Don’t worry! Here a neat little trick that helps you out. PHPMyAdmin can extract a couple of formats of compressed files, namely GZip, BZip2, and Zip. I’ve never had great luck with exporting from PHPMyAdmin as a compressed file, as PHPMyAdmin usually complains when I […]