Is Wireless Charging that Great?

With the purchase of my new iPhone, I now had a phone that was capable of wireless charging. Yes yes, I know that Android has had wireless charging for years. I honestly didn’t think it was that great of a feature. How hard is it to just plug in your phone? I decided to get a wireless charger to see how it worked. After some research, I decided to go with the Seneo Wireless Charger. It has good reviews, supports fast charging for the iPhone and is Qi Certified.

Overall I have been happy with the simplicity of just sitting your phone down and it charging. The Seneo charger allows the phone to sit at an angle so you are able to see notifications etc. It also will work with most cases. Just be aware that if you have a large bulky case or a pop socket, you may have trouble getting it to charge.

A wireless charger is a great affordable gift for friends or family. Just make sure their phone supports QI charging. 

Set Image Src from Amazon S3

I needed to request an image from Amazon S3 using ajax so I could read the response metadata headers. At first this seemed like a simple task. The first issue I encountered was that S3 was blocking the metadata headers from the browser using CORS. After a quick update to the S3 cors policy on the bucket, this issue was resolved. But what about turning the blob data type that comes from S3 into an img src. After several Google searches, I was finally able to get it to work. It was more difficult to find than I expected.

var loadImage = function (imageUrl) {
    $.ajax({
        type: 'GET',
        url: imageUrl,
        dataType: null,
        data: null,
        xhrFields: {
            responseType: 'blob'
        },
        success: function (imageData) {
            var blobUrl = window.URL.createObjectURL(imageData);
            $('#image-id').attr('src', blobUrl);
        }
    });  
};

Since Jquery ajax does not support the responseType: ‘blob’, you have to set the value in the xhrFields.  The other important part is to use window.URL.createObjectURL to convert the blob to a url for the image src.

Hopefully this post helps!

Weather Extension Status Page

When managing multiple websites, apps, and extensions it is important to know when a site is down before your users have to alert you. Currently, I use UptimeRobot to monitor all my websites etc. It’s a great service that offers uptime checks and will alert you by email or text. It’s free for up to 50 sites checked every 5 minutes. You can even ping servers.

Recently I noticed they offer free status pages which can be public or password protected. Within a few minutes, I was able to create a public status page for my weather extension. Setup was pretty easy after adding the CNAME to my domain in Cloudflare. So now status.weatherextension.com will display the current state of my API, homepage and weather provider. Currently all checks are 100%!

 

How To Find Large Files Linux

Running out of disk space on your Linux server and need to find the files taking up the most space? The du or Disk Utility command is a standard Linux command, used to check the information of disk usage of files and directories. Below is the command that will list out the files and folders in the current directory in descending order.

Sort DESC in human-readable format

du -h | sort -h -r

 

Here is a great resource for additional du parameter options.