Share CSS Between Related Projects With Git Subtrees

I’m currently working on a project that’s very service oriented. That is, we’re building an app through smaller components that fit together to run a larger app. This lets me write small, focused code and use different languages and tools very easily on the backend while end users see one unified app. This isn’t always the best way to do things and there are pros and cons in the monolithic vs. microservices debate but in this case it works well for us. One problem I’ve faced, however, is how to manage our front-end assets that are shared between multiple projects. There are a lot of good options for solving this problem but in the end I chose Git’s subtree feature. Today I’ll give an overview of what the other options are, why we chose subtree over them, and how to use Git subtrees to manage a shared dependency.

Read on

Installing Comodo PositiveSSL Certificates on Nginx

My short write up on how to install Comodo’s Positive SSL cert on Apache got a really great response. Well tonight I’m installing another Positive SSL cert except this time on Nginx. This will be my second time installing a cert on a server running Nginx. It’s slightly different but not very hard. This is a short guide on how to install an SSL certificate (a Comodo PositiveSSL cert to be exact) on a server running Nginx.

Read on

Keep Track of the Latest Grunt Console Output

I’ve been making heavy use of Grunt in all of my projects lately. One thing that I always find annoying is that I can never figure out where the latest output from the Watch task begins and ends. I find myself scrolling up to see just what’s been happening. Luckily, Grunt makes creating new tasks a snap and so I made one to help make very clear where the output from the last Grunt run begins. I’ll give you the code after the jump.

Read on

Ghost: The Overrated Blogging Platform

I’ve recently set up a couple of Ghost blogs to see what this new platform is all about. Ghost bills itself as a simpler Wordpress alternative for people who want to focus on writing. It received a lot of press, got funded through a Kickstarter campaign, and now has a handful of corporate sponsors backing it. Having seen its evolution from the time it was announced through the first beta to the version currently available today I have to wonder if Ghost really is worth anyone’s time. TL;DR: Ghost is overrated. Wordpress isn’t going anywhere.

Read on

Wordpress Settings Page Segfaults Apache

I’ve been struggling for over a month with Wordpress Multisite (aka Network) crashing Apache every time I go to the Network Settings or General settings pages. At first I was convinced that it was a plugin issue but after much research and testing it turns out that you need to be very careful if you configure an FTP user for plugin and theme installation in your wp-config.php file. Here’s how to fix the issue:

Read on

∞ The Three Virtues of a Great Programmer

According to Larry Wall there are three great virtues a programmer may posess. Basically, it says you have to be kind of an asshole to be a good programmer. I’ve met and worked with enough programmers to want to say that might just be true. But it’s definitely not a virtue to be an asshole. So try not to be. If you’re interested in what the virtues are then go ahead and click on through.

∞ 16 Lines of Code for a Favicon. Seriously?

The Real Favicon Generator is a great tool. It takes your one large icon and turns it into a PNG or ICO suitable for every browser and platform on the planet. Plus it gives you the code to paste into your site. The problem is, it’s sixteen lines! For a favicon! There’s something wrong with the world when you need to bloat your HTML with 16 <link> tags just so you can have a pretty favicon on mobile, Windows 8, and a few other browsers. But I’m not in charge so I reluctantly stuck those sixteen lines into a partial and dutifully included them at build time. Lame.

This is stupid.

How Do Node Web Apps Work in Production?

If you’re coming to Node from a different server-side language like PHP you may find that deploying Node apps into production is weird, scary, and confusing. What’s with all the command line tools and the weird setups you need to do on the server?, you may ask. You may be used to dropping a few files into a public_html folder on your server and expecting them to “just work”. Well, not to worry. Publishing Node apps into production is different but once you understand how they actually work all those weird steps you have to take start making perfect sense. The better you understand how Node apps work the more comfortable and confident you’ll be when it comes time to deploy them.

Read on

Grunt Task to Guard Against Deploying the Wrong Branch

If you use a Git hook to deploy your projects you might have run across the problem of accidentally deploying the wrong branch. This can easily be resolved by adding a check in your post-receive hook but what if you have a project that you build locally before deploying and your dist folder is not under version control? I wrote a quick inline Grunt task to guard against accidentally deploying the wrong branch. You can use this code directly within your Gruntfile. I may roll this into a plugin in the future.

Read on