Here is a fully customizable switch component I created for Bootstrap 4.
When I first started using Sass, there was one thing that drove me crazy about it compared to Less. For some reason, including a plain CSS file just wasn't something the compiler wanted to do:
Determining your app's base dir (or document root if you're from a PHP background) isn't as straight forward as you'd think in Node. Here's a little trick to get a globally available reference to your app's root directory.
For me, upgrading to MacOS Sierra broke a lot of things that use SSH, including Transmit, Sequel Pro, and a handful of other apps. In fact, it seems to break any app that uses an SSH key with a passphrase. 🤔
Back in 2011, I released the first version of SimpleImage for PHP — an open source project for working with images.
Here's a challenge that a friend of mine came across yesterday. He needed to iterate over an array of file names one at a time in a specific order, stopping at the first one that existed. He was, of course, using Node.js and the checks were being done asynchronously.
It wasn't long after launching a major open source PHP project until I started hearing things like this:
I recently made the decision to stop using modal dialogs in my apps. What once was a good way to obtain information or confirmation has become undesirable and taboo in the world of UX.
At just over 200 lines of code, you'll never want to deal with AJAX-based form submission any other way.
As a web developer, your code is often visible to anyone who wants to review it. If you're like me, you might get stressed out about the thought of people looking at your work and critiquing or criticizing your app's design.
How many times have you seen something like this in a config file?
Need to update your version of Node.js? Here's how you can upgrade or downgrade from the command line using NPM.
One of the objectives Matt Mullenweg has for WordPress is to democratize publishing, which is excellent. But the very same article states another objective is to "capture the 75 percent of the internet that WordPress doesn't already manage."
Here's the absolute easiest way you can validate an email address using PHP. This tiny function takes advantage of the filter_var() function in PHP.
This is rather specific, but if you're implementing Handlebars (in PHP) using LightnCandy, here's a great helper that lets you compare values and generate output accordingly.
Here's another gotcha if you're using PHP's
basename() on a string that contains non-Latin characters: The resulting string will get butchered.
When I stumbled across this post today, I was almost convinced that I had wrote it myself. Many of the points in it hit home, so I hope it helps people better understand how developers think and what they go through when interruptions arise.
Ever wished you could vertically center your Bootstrap modals? Here's some code that will let you do just that.