The Awsm Dvlprz Blog

Tales of awesomazing adventures

I wanted to move all the image files used in my blog from Imgur to my own Amazon S3 bucket. I wrote a Python script to help using rclone. I've written about rclone before. It is really nifty command line utility for Cloud services. It can copy files from an URL directly to Amazon S3, Google Drive, and other cloud services without having to download the file locally first.

URL manipulation turned out to be trickier than I expected. Saving the steps involved in this post for posterity.

Continue reading...

Starting with OS X Sierra if you've noticed that the fonts are rather thin in Atom or other Electron based apps, the reason was that subpixel antialiasing is turned off in the OS defaults even though it's enabled globally through the Preferences Menu.

Thanks to Atom developer David Wilson who posted a fix on GitHub. The only way to fix the fonts is to enable it globally with the command line:

defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO

And restart Atom or logout and login for the setting to take effect.

Continue reading...

OpenVPN server is fairly easy to setup. However OpenVPN traffic signature can be detected using deep packet inspection and be blocked.

The tor network offers a transport called ofbsproxy that can help mask the OpenVPN traffic and prevent it from being blocked. obfsproxy can be used independently of tor.

This post gives a quick overview of the steps needed to enable OpenVPN tunneling over (through) obfsproxy.

Continue reading...

AWS IoT is an easy way to transmit IoT sensor data to the Cloud (AWS) using the lightweight MQTT protocol. However AWS IoT supports only the secure MQTTS version of MQTT. It requires a set of security certificates to be stored on each sensor/device and support for SSL/TLS on the sensor. Also all the devices need to be connected to the Internet. Instead of managing certificates on all the different sensors and providing them with secure Internet access, sometimes it is preferable and practical to have an intermediate gateway that the sensors communicate with on MQTT, and have the gateway in turn communicate with AWS IoT on MQTTS.

The gateway acts as an MQTT proxy, and if using cellular connections, a proxy could potentially save hundreds to thousands of dollars per month (depending on the number of connections and volume of data) by avoiding the overhead of SSL/TLS on individual sensor links.

The script to achieve proxying is rather straightforward and there are only a couple of configuration issues to take care of to enable the MQTT proxy.

Continue reading...

Google Drive lacks a very basic feature: calculating folder size. There is no solution in the web interface to view the total size of a given directory. There are a couple of dubious looking online “folder size analyzers” that request access permissions to your Google Drive and offer the basic functionality of calculating folder size. While those apps, have a legitimate need for access permission to your account, you may consider giving those permissions to random apps a questionable decision.

Continue reading...