Skip to content

Time

Time. It flows. And keeps flowing.

You’re a fish trying to swim upstream on a current that’s hell-bent on carrying you down. No matter how much you resist, whether you stay still or fight furiously, the current always wins. The waterfall at the end of the river knows no mercy.

Read More →

Django: Save Screenshot of a Webpage

Let’s say you want to save the screenshot of a webpage in Django. For example, you might need to store a screenshot of an agreement with your client’s signature when it’s filled up and submitted.

If you look for an external library to do this, you might stumble upon django-screamshot. I haven’t tried this library, but it looks promising.

In this tutorial, however, I’ll show you how to achieve this using the HTML5 Canvas and Python.

Read More →

Django HTML Template: SB Admin 2

In this article, I’ll explain my approach to working with a Django HTML template and optimizing template inheritance in Django. In general, I consider myself a backend developer, but I do have to deal with a lot of HTML/CSS/JavaScript during my development. Mostly when I start a new project, I begin by selecting an appropriate HTML template for it and then deconstructing the template until it’s modular and optimized for inheritance.

Read More →

My Current Django Development Setup

In this article, I’ll list some tools I use for developing web applications in Python/Django and describe my workflow. I’ll also share a few tweaks I’ve come up with to make my life easier. I realize my Django development setup is ever evolving and will probably change significantly as I discover new tools and techniques. So, I’ll make sure to edit this article when that happens. For now, here we go:

Read More →

Efficient Project Switching in Vim

I’ve spent the last couple of years using Sublime Text and consider myself pretty good at it. But throughout this time, I’ve always tried to optimize my workflow and do without the mouse as much as I can. Then, about a month ago, I decided to spend some time with Vim. I went through the whole motion of getting Vim installed on my machine and going through vimtutor a few times. All in all, I have to say I liked it.

Since then, I’ve really wanted to switch to Vim completely, but I realized there were things in Sublime Text that I just could not do without. I shall be writing a blog post about each of them as I discover ways to achieve them in Vim.

First up, project switching.

Read More →

Automatically Reply to Facebook Birthday Wishes with Python!

So, let’s say it’s your birthday. You’re super-excited and spend the day having your cake and eating it too. The next morning you log in to Facebook, only to find your timeline completely flooded with birthday posts from all your well-wishers. You want to reply to all of them, but it would take you all day! How do you automate this whole process of liking and commenting on each birthday post without toiling away on Facebook for hours? We turn to our trusty little friend: Python!

Read More →