Blog / Howto

Creating a simple 'Reading List' app in Django with Amazon's Product Advertising API

April 2, 2015

I had been using Shelfari for a few years to keep track of books I've read and plan to read. I really liked the website's interface and they had this nice widget that lets you display a bookshelf of your reading list on your blog. But when I forced SSL on my blog, it stopped working. The widget doesn't work over https.

I then looked for other widgets and tried Amazon's widget. But their widget …

Installing hub (git wrapper) on Ubuntu the easy way

February 26, 2015

This is more a "note to self" in case I need to do this again.

We use hub at work mainly to convert GitHub issues to pull requests. For Mac users, you can install it by simply typing in brew install hub. But for Linux users, the installation is a little bit more complicated.

Below is the easy way to do it:

sudo apt-get install ruby
sudo curl https://hub.github.com/standalone -Lo /usr/bin/hub
sudo chmod 755 …

Give your Django app more of a native mobile app feel with Chrome for Android's 'Add to Homescreen'

February 10, 2015

A user of one of my Django apps, GlucoseTracker, suggested this to me last week and I actually didn't even know this feature existed. I thought it was a really great idea and it turned out it can be done easily with about 3 lines of additional code:

# base.html

<!doctype html> 
<html>
   <head>
     <title>GlucoseTracker</title>

      <!-- Enables 'Add to Homescreen' for Android -->
      <meta name="viewport" content="width=device-width">
      <meta name="mobile-web-app-capable" content="yes">
      <link rel="icon" sizes="192x192" href="{% static …

Adding basic search to your Django site

January 17, 2015

While most people probably find content on your site through Google, it might still be a good idea to just add a basic search functionality to it. You can control which fields to search, how your results are displayed, and your readers won't have to leave your site. You may also have content that is not yet public that you want to be able to search, such as unpublished articles or blog posts.

For this …

Ubuntu: How to delete old kernels to free up space in the boot partition

January 15, 2015

This is at least the second time this has happened to me so I figured I'd make a note here for future reference.

Basically I was running the Software Update and it complained that there is "Not enough free disk space":

The upgrade needs a total of 81.7 M free space on disk '/boot'. Please free at least an additional 15.5 M of disk space on '/boot'. Empty your trash and remove temporary packages of …