Migrating Blog from WordPress to Jekyll

Recently I became quite active on GitHub mostly thanks to my class projects and a few personal projects. While creating a web page for one of my VR projects on GitHub, I found that it allowed us to host custom Jekyll-based project as well as personal web sites. Digging deeper I found that Jekyll even allows us to create blogs. Instead of databases, it stores the posts in flat markdown files. So, I thought of giving it a try and went ahead with creating a personal website. And it turned out quite well. At this point I have migrated all the posts, images and most comments. I think I just need to figure out the publicize functionality before the migration is complete. The new blog can be visited here. In the next post, which will hopefully be on the github blog, I will write about the migration procedure.

Until then, cheers!

GitHub Subtrees

I have been familiar with git ever since I started using Linux. I used ‘git clone’ quite a bit to compile and install latest versions of software, but that’s where most of my ‘familiarity’ was limited to. I did mess around with creating local repositories and committing but that’s all. We used SVN at work, so most of my version control knowledge is based on SVN. So, I am still figuring out lot of git stuff that most people probably already know.

So, I was looking for a way to have a single repository for a class and all my projects for that class would be stored under that repository. That’s when I came across this nifty little feature here called Git subtree merges, which allows you to manage multiple projects under a single repository.

The workflow as I understand it is as below:

  1. I created a repository called advanced-data-structures. This is my main repository.
  2. Then I created another repository called RedBlackEventCounter. This holds the actual project code. Made changes, committed and pushed to this remote.
  3. Then I added the remote of RedBlackEventCounter to the master of advanced-data-structures.

    git remote add -f RedBlackEventCounter https://github.com/sayakbiswas/RedBlackEventCounter.git

  4. Merged RedBlackEventCounter into advanced-data-structures.

    git merge -s ours --no-commit RedBlackEventCounter/master

  5. Copied the git data of RedBlackEventCounter repository into a new directory in the advanced-data-structures repository.

    git read-tree --prefix=RedBlackEventCounter/ -u RedBlackEventCounter/master

  6. Commit and push the changes.

    git commit -m "Added RedBlackEventCounter reference into advanced-data-structures"
    git push origin master

Now, this subtree doesn’t automatically sync with the changes made in the upstream repository. GitHub’s documentation recommends using the below command to update:

git pull -s subtree remotename branchname

[Update – 03/15/2016]: The above command seems to work properly now. I’m not sure what had happened earlier; probably some mistake on my part. Need to dig deeper. So my workflow is now:

git pull -s subtree RedBlackEventCounter master

git push origin master

The below is not needed anymore.

But for some reason, it doesn’t work out for me. I keep getting the error

error: Entry %filename% overlaps with %filename%. Cannot bind.

So, what I do is create a temporary directory and pull in everything from subtree remote. Copy over everything from this directory to the subtree directory. Remove the temporary directory, stage all, commit and push.

mkdir RedBlackTemp
git read-tree --prefix=RedBlackTemp/ -u RedBlackEventCounter/master
git commit -m "Pulled upstream changes"
cp -rf RedBlackTemp/* RedBlackEventCounter/
git rm -rf RedBlackTemp
git add .
git commit -m "Merged upstream changes into master"
git push origin master

I know it is quite cumbersome to do this everytime you make a change. I guess there is a better way that I just don’t know yet. So, if anybody has an idea, please let me know.

Install Spotify in Fedora 23

I have had an interest in Spotify ever since it launched but never got to try out as it is not available in India. So, I never understood what the buzz was all about. But, I recently moved to US to start Grad School at University of Florida. So, finally I was able to try out Spotify for myself and I must say it is really impressive. It lets me discover a bunch of new music so easily. I find myself listening mostly to the pre-prepared playlists by Spotify like the Power Ballads, Evening Acoustic playlist etc. I quickly installed Spotify in Windows and proceeded to install it on my Fedora 23 setup. Below are the steps:

  1. Add the negativo17 repo for spotify.

    sudo dnf config-manager --add-repo=http://negativo17.org/repos/fedora-spotify.repo

  2. Install Spotify by running

    sudo dnf install spotify-client

Aaaaanddd….you are done. Launch and enjoy!

Until next time!

GNOME – Restore default folder icons

Recently, my laptop battery got drained completely and the system shut down incorrectly. This resulted in my NTFS data drive not getting unmounted properly. The videos, music, pictures and documents folders in my NTFS drive are linked to the Home folder in my Fedora install. When I booted my system back up I was not able to access my music and videos. I figured, probably some issue with auto-mounting the NTFS drive at boot, so unmounted and remounted the drive and the issue was fixed. I rebooted once more to confirm and the auto-mounting was working. I had access to my music and videos again. But there was a different issue.

You know how the Documents, Music, Pictures and Videos folders all have specialized icons? Well, they were gone and were replaced with a generic folder icon. After looking around for some time, I got to the root cause. It turns out that my /home/sayak/.config/user-dirs.dirs had got corrupted. This is how the file is supposed to look like:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.

In my case, the documents, music etc. directories were pointing to $HOME i.e. XDG_DOCUMENTS_DIR=”$HOME/”. Most likely, a result of the botched auto-mounting attempt from earlier.

To fix it, I just had to update the file to point to the correct locations. So, I deleted the file and executed the below command:


And, that fixed it.

F23 – Printing and Scanning

Recently, my parents bought this new HP Deskjet 1510 AIO for printing, scanning and photocopying stuff. I’ve never had a scanner before and the printer I used to have was a Samsung ML-1610(or something similar), which was very inconsistent in working with Linux distributions. It died long since. So, with this new deskjet, I thought I’d give it a try on my Fedora 23.

First up, as soon as I connected the printer to my PC, I got a helpful pop-up saying “Configuring your new Printer”. A few seconds later I got a message saying additional software needs to be installed and clicking on the pop-up opened up GNOME Software. But, alas, Software told me it could not find the needed software in the repositories. I was a bit bummed, but I though what the heck, lets give it a try anyway. So, I pulled up a document, put in a page in the printer and hit print. To my surprise, it worked flawlessly. So, was that Software bit misleading? Or was it looking for some specific software that it failed to find in the repos? Anyway, as long as it works I’m not complaining.

Next up, scanning. I wasn’t sure this would work as I had never tried it before from Linux. I pulled up the Activities overview and searched for “scan” to see if there was any scanner software installed. There wasn’t. But, in the results I saw Simple Scan available in the GNOME Software. How Nice! I clicked and it opened Software and started installing Simple Scan and was done in a couple of seconds. I launched Simple Scan, put the page I just printed into the device and hit scan. It worked perfectly, I scanned both sides of the page and saved into a pdf.

The whole process is so smooth and it just works! I didn’t have to go looking for drivers or install some extra software to configure the device. Just plug and play!

Until next time!

Fedora 23 and screen tearing

As I mentioned in my Fedora 23 review, I am very happy with this new release. So, I was a bit disappointed when I notice the issue with screen tearing. Now this is probably an issue with my particular set up and a lot of people may not run into this issue.

I have an Acer Aspire V5 with an integrated Intel HD 4400 and nVidia GT 750M and I use bumblebee for dynamic switching. So, by default the system runs on the Intel card. I noticed that when I move any window there is some tear. Naturally, I went on google looking for a fix for the issue. And I found this post on Ask Fedora. Basically the fix is to create the file /etc/X11/xorg.conf.d/20-intel.conf and have the below content in it:

# /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
Option "TearFree" "true"

And then reboot! The issue should be fixed.

Thoughts on Spectre

Thoughts on Spectre

Spectre, the 24th entry in the James Bond film series, is most likely the last Bond film starring Daniel Craig as the suave super-spy. After the serious tone of the previous three Craig starrers, this movie takes a much lighter note. Seriously, at one point the movie had Q (played by Ben Whishaw) telling Bond: “I told you to bring it back in one piece not bring back one piece”. That is probably one of the goofiest things I’ve heard at the movies all year. In some ways this feels like a homage to the Bond movies of yore with a lot of over the top action sequences set in beautiful locations all over the globe. I grew up watching Pierce Brosnan playing the character in movies that had ludicrous plots, great action sequences, beautiful women and goofy one-liners. So, when I watched Daniel Craig’s first outing as James Bond in Casino Royale, although that super serious, dark and broody Bond was not what I was expecting, I definitely enjoyed it. And over the next two movies the tone kept getting darker and more personal culminating in the awesome Skyfall, which is my favourite Bond film. After the doom and gloom of Skyfall, Spectre’s light-heartedness seems like the logical way to go. And it works out very well.

The movie starts out with an explosive chase sequence set against the backdrop of the beautifully shot Day of the Dead celebrations in Mexico City. It turns out he had been trying to track down an assassin that he got to know about from a video message from the late M. His investigations lead him to the evil organization SPECTRE spearheaded by Franz Oberhauser, played chillingly by the ever-villainous Christoph Waltz, all the while being chased by the imposing Dave Bautista and picking up some romantic interests along the way. Monica Bellucci is back wooing Bond again as a not-so-grieving widow. And Lea Seydoux as the Bond girl Madeleine is a delight to watch. She plays the character with a confidence and steeliness that I haven’t seen in many Bond girls from the past. The other thread of the plot has the new M, played by Ralph Fiennes and the rest of the MI6 team, fighting against C, played by Andrew Scott, to keep MI6 and the 00 program being relegated into irrelevancy. The movie even slightly touches upon the current real-world issues of surveillance and privacy invasion.

But the real delights in the movie comes from the very well realized and stunningly shot action set-pieces as Bautista’s Mr. Hinx chases Bond relentlessly through narrow urban streets, snow covered peaks and train coaches. While the train fight sequence is a definite nod to From Russia with Love, the helicopter sequence in the snow covered peaks of Austria felt like an acknowledgment of GoldenEye’s introductory sequence. Daniel Craig also seems to have taken a page out of Sean Connery’s and Roger Moore’s cool, confident and one-liner spouting Bonds. His take on the character now seems to have come full circle, starting off as a wounded, fragile and grounded Bond and now settling down as the self-assured and larger than life character that we have seen and loved so many ties before. The theme of personal Bond stories that started with Casino Royale also draws to a close in this outing as Bond discovers secrets from his past. I think this is a very fitting farewell to Daniel Craig’s Bond.

I understand the host of mixed reviews this movie has been getting. After the grounded approach of the previous three movies, Spectre can sometimes feel like a remnant from another era. And that can be either good or bad, depending on perspective. Personally, I loved the movie. The only complaint I have is that I felt Christoph Waltz didn’t get enough screen time. But when has any amount of Christoph Waltz screen time felt enough.