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 ...

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 ...

How to delete files older than x hours in Ubuntu

November 5, 2016

One of my apps, YouTube Audio Downloader, has been gaining quite a bit of traffic lately. It's a website that lets you convert YouTube videos to MP3/M4A audio. The conversion happens completely on my server and a download link is provided to the user when finished. The files need to be stored temporarily on my server so the users can download them.

Initially, I just had a daily cron job that runs at ...

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 ...

Automatically generating and renewing Let's Encrypt SSL certificates with the certbot client and Ansible

August 11, 2016

I just finished updating my ansible-django-stack project and added tasks to automatically issue a Let's Encrypt SSL certificate and set up a cron job to auto-renew the certificate.

We're now using it for all our Shopify apps which are built in Django. Let's Encrypt certificates are only valid for 90 days, so if you have a bunch of web apps like we do and have more planned in the future, automating this ...

Older