emblem-mode for Emacs

Emblem.js is an ember friendly templating engine used as an alternative for handlebars.js. Emblem.js doesn't have any official plugins for emacs. However, they recommend using slim-mode plugins as they are similar. You get slim-mode from melpa. Install with M-x install-package slim-mode Now we have to activate slim-mode for emblem files which will be ending with .em or .emblem. We can use auto-mode-alist to...
Read more ...

Auto Completion For Custom Search Engines In Chrome

If we have to search for a video on YouTube or a product on Amazon, we will open up that site first and then we will search for it. To avoid this, Chrome allows us to search using custom search engines without visiting the site first. In chrome search settings, we can assign a single letter to a custom search engine. Now if we go...
Read more ...

Concurrent Downloads - Bash (xargs, parallel) Vs Python (ThreadPoolExecutor)

I just found one more free telugu book Graded readings in modern literary Telugu by Golla Narayanaswami Reddy and Dan M Matson in Digital South Asia Library. Unfortunately they didn't provide it as an ebook but as a set of 221 tif images. I wrote a simple for loop in shell which downloaded all images one by one using wget. $...
Read more ...

Emacs - Browsing Projects With Etags

A tag is a reference to a sub unit in a program. A tag references syntactic elements like functions, classes e.t.c. A tags table consists of list of tag names and their positions in corresponding files. Creating Tags Table A tags table can be generated by etags program. If you are using Ubuntu machine, you can install it with sudo apt-get install exuberant-ctags Now, you can generate tags for a file with etags...
Read more ...

[Django Tips] Make Deleting Easy In Admin!

Lets say we have a model as shown in some project. from django.db import models class Resource(models.Model): """ Model to hold resources for books. """ book = models.ForeignKey('Book') book_type = models.IntegerField() url = models.URLField() This model can be registered in admin as follows. from django.contrib...
Read more ...

Auto Convert & Upload Books To Kindle

I have ebooks in various formats like pdf, epub, mobi e.t.c. If I want to read books in laptop, I could use ebook reader like Calibre which can open supports most of the formats. If I have to read them on Kindle paperwhite, it becomes a problem as it supports only few formats. So whenever I get an ebook, I have to convert it to mobi format and send it to kindle. I can connect kindle to laptop via USB cable and I...
Read more ...

Automate Boring Stuff - Accepting Waitlist RSVPs

Meetup.com makes it easier to organize events. Before meetup you can specify how many people you can accomodate. Then you send mail to all people so that interested people can RSVP. If RSVP is full, people can join waitlist. So if somebody changes RSVP to No, we can accomodate people in waitlist. On the otherhand, if you find a place where you can accomodate more number than you have planned, you can accept...
Read more ...

Let It Be - A Zen Story By Buddha!

Once Buddha was walking from one town to another town with a few of his followers. While they were travelling, they happened to pass a lake. They stopped there and Buddha told one of his disciples, “I am thirsty. Do get me some water from that lake there.” The disciple walked up to the lake. When he reached it, he noticed a bullock cart started crossing through the lake. As a result, the water became very muddy. The disciple...
Read more ...

Dropbox As Wormhole Between Ubuntu & Google Drive!

I use Ubuntu on multiple computers everyday. It is important to keep various files synced across them. I keep most of the public data in github repositories and it is very easy to sync across multiple machines. Google Drive gives 15GB of space with free account. I have multiple accounts and that space is enough to backup my data. I have been storing lots of files in Google Drive from past few years. The main problem is...
Read more ...

Book Review - A Psycho Path By Haris Ibrahim K. V.

I stumbled on haris blog and I am thrilled to find that he wrote a book called A Psycho Path. Since ebook was free, I downloaded it and started reading. I skipped Foreward, Preface and skimmed through the first story Etsuko’s picnic. The second story in the book is A surprising blood test. The story is quite impressive and it hooked me in. Before that story I was lying on the bed and reading. After...
Read more ...