Blog / Howto

Generating a signed URL for an Amazon S3 file using boto

April 9, 2017

I was refactoring some code for EZ Exporter, a data exporter app for Shopify, last week as our customer base has been growing pretty steadily these last few months. I figured it's time to do some optimization to make sure the app is ready for future growth.

One of the functionalities that we needed to optimize is how we handle manual downloads. Initially, I just made it very simple by returning the data as …

Generate random passwords on Linux with the "pwgen" command

February 26, 2017


With the recent Cloudflare hack ("CloudBleed"), I currently find myself resetting a bunch of passwords.

I tend to use very random passwords for most of my accounts, where each account uses a different random password. Thankfully, with tools like pwgen this is very quick and easy to do. Before using pwgen, I would normally go to a site like random.org to generate random passwords.

Using `pwgen` is very simple, just install it and type the …

Display a message to your users while waiting for a file download with jQuery File Download

November 6, 2016

jQuery Filedownload EZ Exporter Shopify App

Our Shopify app, EZ Exporter, provides an option for users to download reports on demand from the app's main page. Since it could take some time to generate the report in the background depending on the data, we needed a way to let the user know that the task is currently in progress so they don't reload the page or do something else thinking that nothing is happening. We also wanted to block the …

How to delete files older than x hours in Ubuntu

November 5, 2016

The command is a pretty simple one-liner, though I probably won't remember it so I'm making a note of it here for future reference:

find /webapps/myproject/media -type f -cmin +120 -delete

This command basically just deletes all the files in my media folder where the last changed time is older than 120 minutes.

Setting up an FTP server on Ubuntu using vsftpd and connecting to it using Python's ftplib module

October 13, 2016

I know what you're thinking, "Who in the world still uses FTP these days?". If you were born after year 2000, you may not even have heard of FTP before.

FTP (File Transfer Protocol) was a popular way to share files back in the AOL days. People will set up these FTP servers where you can upload and download files. I remember spending so much time in chat rooms during my teenage years asking around …