Blog / Howto

How to resume download over SSH using "rsync"

October 30, 2018

This is one of those "note to self" again.

I needed to download big file (close to 6GB) from a remote server last night but the Internet connection at my AirBnB was a bit spotty and would drop periodically.

Normally, I'd just use scp and even 6GB of data is no big deal on a fast and stable connection. But with a slow or unstable connection, I needed a way to resume the download ...

How to use "nohup" with chained commands in Ubuntu

October 30, 2018

This is another note to self as I keep forgetting the syntax.

Basically I needed to use nohup (short for "no hangup") to execute a PostgreSQL database dump while connected to a remote server via SSH. The reason is to make sure the command doesn't get terminated in case I get disconnected from the server as the command could take some time to complete due to the size of the database I'm backing ...

How to disable Bluetooth on system startup on Ubuntu 16.04

July 29, 2018

Since I almost never use Bluetooth on my laptop, it's a good idea to just turn it off and keep it off by default as it's just another thing that drains the battery and an additional entry point for malicious hackers.

Disabling Bluetooth is surprising not as straightforward on Ubuntu as I would have thought. I was expecting to simply tick or untick a checkbox in the Bluetooth settings.

To keep Bluetooth disabled ...

How to download the entire contents of a folder in an S3 bucket with Ansible

June 21, 2018

Just ran into this issue today. I needed to be able to download all the files inside a folder stored in an S3 bucket with Ansible.

The aws_s3 module docs on the Ansible site didn't provide an example on how to do this, but I did find a couple of articles that pointed me in the right direction.

- name: Get list of files from S3
aws_s3:
mode: list
aws_access_key: "{{ aws_access_key_id }}"
aws_secret_key: "{{ aws_secret_access_key }}"
bucket: "{{ aws_storage_bucket_name ...

PostgreSQL Database Restore Commands

June 11, 2018

I've been finding myself doing restores from db backups to my local development more often recently as I've been building dashboard pages for a client and I want to have real data locally so I can get a better idea of what it will look like in production.

I also have a bunch of projects in production with real users and it's good to test-restore their backups at least once a month ...

Older