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 without needing to install Ruby):

sudo curl -Lo ...

Notes from 'Antifragile'

February 16, 2015

I read Nassim Nicolas Taleb's latest book, Antifragile: Things That Gain from Disorder, a few months ago and it easily became one of my favorite books. I liked the way he explained things and he covered many topics that are very relevant today. I'm actually re-reading parts of it right now. I figured I'll take this time to share my notes in a blog post.


Less is more and usually more ...

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> 

      <!-- Enables 'Add to Homescreen' for Android -->
      <meta name="viewport" content="width=device-width">
      <meta name ...

Haystack with Solr: Indexing Tips

January 22, 2015

I was troubleshooting an issue a couple of weeks ago with some of our Django views taking too long to return a response. The issue was due to post_save and post_delete signals making a request to Solr to update the index with the 'commit' parameter set to 'true' (Haystack default). This basically tells Solr to do the indexing right away (hard commit) and it was taking a few seconds to finish.

Below are some tips ...

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

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

Adding responsive tables (no scrollbars) to your Django app with DataTables

January 13, 2015

It had been over year since I last looked at DataTables, a jQuery table plugin for creating tables with advanced features. I used it for my Django app, GlucoseTracker, and it worked great. But one thing that was bothering me was it wasn't responsive. It was the only element in my app that wasn't responsive and looked horrible when viewing on a phone in portrait mode.

Over the weekend I decided to check ...