Blog / Linux

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 …

Ansible Playbook for provisioning a Graylog central logging server

February 24, 2017

Graylog Message Stream

I first used Graylog a few years back while working for a tech startup in New York City. I was really impressed with it and it was probably the best log management software I've used at the time.

I've been meaning to set one up for Highview Apps for some time now, as we now have 5 servers for the different Django apps we've built and we will soon be adding another 3. Without centralized …

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 …

Using Docker and Docker Compose for local Django development (replacing virtualenv)

April 30, 2015

Before Docker came along, virtualenv was pretty much the tool of choice for Python developers as it allows you to separate package dependencies for different applications you're working on without having to create separate virtual machines for each one. It worked very well for me.

However, there are still some annoying things the developers will have to deal with. Such things include having to install additional applications and services required by the project such as …