The application was uploading an audio file, the ContentType of which is audio/mpeg. The default configuration was uploading the file as octet/stream. This would cause a browser to download the file, whereas we needed the ability to play the file directly from the browser.

If you are forcing HTTPS on routes in Laravel but are having issues with a redirect loop and your app is behind a proxy, load balancer, or something like Elastic Beanstalk, try adding this to your .htaccess file:

Many load balancers will accept HTTPS traffic and forward it internally as HTTP but pass an environment variable stating that the traffic received at the load balancer/proxy was intended for HTTPs. What this line does is checks for that environment variable X-FORWARDED-PROTO and if it is set to HTTPS remaps the request to HTTPS behind the proxy or load balancer.

The application was dynamically drawing a signature into an HTML5 canvas element and the user would print the page, which contained the canvas. The printed (physical) document would contain the canvas containing the signature.

With the Chrome update, canvas elements are no longer being displayed on the printed output, physical or PDF.

Here is a quick snippet to quickly gather all canvas elements, dynamically generate an image, and replace the canvas elements with the new image. This fixed the issues with our application.

If you manage more than one AWS account, you most likely have pre-built AMIs that you frequently use when provisioning new instances.

You may be building AMIs on a per account basis, and some of these may be nearly identical to those found on the other accounts you manage. Effectively, you are duplicating effort when, with a bit of magic, you can easily clone/copy any AMI to another account.

Unlike PV instances in EC2, HVM instances run as if it were on the native hardware platform. HVM instances however do not support standard/magnetic backed EBS storage types. If you were used to using resize2fs for resizing your EC2 volumes, you’ve probably realized this doesn’t work with the new instance types.

Online resizing of a gp2/HVM volume can be performed nearly as quickly as standard/magnetic/PV volumes.

Most users that run some sort of home storage server will probably, (see: hopefully), be running some type of RAID array.

It is also likely that at some point, one or more of the drives in your array will start to degrade. That could be read errors, bad sectors, or worse complete hardware failure. In this case you will have to replace the faulty drive with a new drive of equal or larger size.

I was experiencing read errors on a new 4TB Western Digital Red NAS drive. I have 6 of these drives in a RAID6 array running Ubuntu 13.10. The array was using mdadm as a software RAID controller.

Here you will find the steps taken to replace a failing drive within a RAID6 array that uses mdadm as a software RAID controller.