Linux

Responsive Images With Nginx on Ubuntu

I started looking into this topic because, as you’ve probably heard, Google changed its pagespeed insights tool (and search ranking algorithm) to focus on mobile-first. I’ve got an image-heavy blog that does pretty well in Google, but my pagespeed score was somewhere between 75 and 80. One of Google’s biggest complaints to me were that my images were not resized properly. The only problem is I have hundreds of images on that blog, and there was no way on earth I was going to actually create mobile-friendly versions of every single image.
Read more

Install Node.js on Debian Squeeze

I had some issues with libraries installed via npm (such as d3 and jsdom) causing segmentation faults in Mocha tests. Ultimately I realized that it wasn’t a problem with these node modules so much as it was with my node install itself. I had installed from source following this guide, but it wasn’t quit enough to get my node install right on Debian Squeeze. Install Node.js Dependencies Pretty standard stuff – make sure you’re up to date on these.
Read more

Set up Nginx and uWSGI

When browsing the web, I often read that setting up nginx with uWSGI is incredibly easy to set up and get running. I absolutely did not find it so, as I had to deal with a lot of configuration issues. So here’s how I finally got these components working together on an instance of Ubuntu 12.04. I ultimately hook this up to Django, but I’m sure the general principle would apply to other python frameworks with a WSGI interface.
Read more

Avoiding the OOM Killer by limiting the number of Apache2 processes and clients

Prologue Last week I had the following mortifying experience: I tried to ssh into my box hosted at RackSpace and nothing happened. It simply hung, and never prompted me for my password. Commence panic. I determined that port 22 was, in fact, open, and I was connecting to the machine at some point. nc -zw3 monicalent.com 22 Connection to monicalent.com 22 port [tcp/ssh] succeeded! telnet monicalent.
Read more