Blog / Howto

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

How to check if your Python app supports TLS 1.2

June 3, 2018

As you may have already heard, the Payment Card Industry (PCI) will be requiring everyone to use at least TLS 1.1 (1.2 is recommended) to meet their data security standard starting on June 30, 2018. Other services, such as PyPI, will be requiring only TLS 1.2 connections on the same date as well.

You need to make sure that the version of Python you're using and related packages support TLS 1 ...

How to find the Wi-Fi network password (and other settings) via command line in Ubuntu

February 7, 2018

While you can get this information via the "Network Connections" GUI, it could come in handy sometimes to know where this is located. For example, you might want to write a script to display the SSID and passwords of all the Wi-Fi networks you've connected to.

Basically, all the network connections are saved under /etc/NetworkManager/system-connections in Ubuntu in separate configuration files. If you want to delete all the Wi-Fi settings in bulk ...