How To Force SSL With Apache

On the Internet, all traffic in the 21st century shall be encrypted. That’s easy to do with Apache. Follow these instructions to force all traffic to the SSL pipe. Rewrite Engine On RewriteCond %{HTTPS} Off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L] Now any request that isn’t on https is redirected to https. This solution is port, host, How To Force SSL With Apache

How to Use a PHP Closure to Implement a SoapClient Method Staggering Retry

The Problem I ran into an situation where I have to interact with an extremely unreliable SOAP web service using PHP’s SoapClient. I needed a way to consistently retry failures before eventually dying if it doesn’t ever succeed. I prototyped this using procedural code, but when I implemented it for real, it was in object-oriented How to Use a PHP Closure to Implement a SoapClient Method Staggering Retry

How-To: Git Merge

I create a lot of Git branches. Every change I do is a branch. That means I perform a lot of Git merges. Here’s how I do it. Read about my Git workflow here. Assume there’s a dev branch called ‘Fingerboard’ that I need to merge into ‘master.’ The Fingerboard branch has been committed to How-To: Git Merge

The Perfect Git Workflow

I have concocted the world’s most perfect Git workflow. Here it is. Spoiler, it’s actually not perfect, but it works for me. In Git, there’s the concept of a master branch. Master is merely the first branch Git creates. Git might as well called it “Pippy Pee Pee Diarrheastein Poopypants Esquire.” But Git didn’t do The Perfect Git Workflow

Pass node arguments to PM2

What I used to do with Perl or shell scripting, I do with Node.js. Here’s how to pass node arguments to a pm2 start command. I have Node.js application that uses garbage collection. For it to work, I have to pass the –expode-gc node command-line argument. Since I use pm2 to manage my Node.js applications, Pass node arguments to PM2

How to Make Eclipse IDE Faster

While coding the other day, Eclipse was running like shit. It was slow as hell. I couldn’t get anything done. I did all of the updates to Eclipse and even rebooted. It didn’t it help, it was dog ass slow. Checking my laptop resources, it was all fine. Researching this issue, I found out about How to Make Eclipse IDE Faster