Blog

Post Featured Image

Backup And Restore Postgres Database From Heroku Using A Dump File

Whether we want a copy of our database as a backup or we need to transition some records to a new database, this can be accomplished with a few simple commands.

Here is an example of creating a dump file from a Heroku Postgres database containing the records of a posts table and a posts category table. The dump …

Read More
Post Featured Image

Control An RC Car With A Raspberry Pi And Gamepad

I thought it would be fun to connect a Raspberry Pi to an RC car to control it programmatically.

This project takes an off-the-shelf RC car and controls it with a Raspberry Pi 3 B+ and a Dualshock 4 wireless controller via Bluetooth.

The finished project has excellent performance (better than …

Read More
Post Featured Image

Django Unique Slug Generator

For my blog posts, I wanted to use a slug based on the post's title as its URL. The post's slug needs to be unique so that Django knows which object to return.

What I wanted to happen was, if the title of a post happens to be the same as a previous post, an …

Read More
Post Featured Image

Fizz Buzz Python

Here's my solution to the classic fizz buzz question written in Python.

Print out numbers 1 through 100.
When a number is divisible by 3 replace it with "fizz".
When a number is divisible by 5 replace it with "buzz".
When a number is divisible by both 3 and 5 …

Read More