• C++ / Unreal Engine game developer
  • VR and Oculus developer
  • FreeBSD ports contributor
  • *nix enthusiast

Packt Free Learning Library

From 30th April, 2015 Packt Publishing has thrown open the virtual doors of its new Free Learning Library and offering its customers a daily chance to grab a fresh free eBook from its website. The publisher is encouraging people to learn new skills and try out new technologies and so every day it will be offering a different eBook from its huge list of titles free for anyone to download.

Packt Free Learning Library - Every day Packt Publishing is giving away books for free to help teach new tech skills

Packt Free Learning Library - Every day Packt Publishing is giving away books for free to help teach new tech skills

[Read More...]

Migrating From Octopress To Hexo

Well, I was living a happy life with Octopress 2.x despite the fact that I didn’t do much blogging in the past couple of years. Moreover, in my estimation Octopress still should be considered as one of the greatest blogging platforms among its peers and I really got nothing against it. But, I see a few shortcomings which made me looking for alternatives (and some of these still affects the 3.x version of Octopress):

[Read More...]

International Day Against DRM at Packt Publishing

Digital Restrictions Management (DRM) harms almost everyone, but most people have never heard of it. Today is one of our best opportunities to change that.

There are people around the world coming together to say that we will not tolerate the remote deletions, unethical surveillance, and invasive restrictions of DRM. In fact, with events in at least nine countries and huge online participation, it’s the world’s biggest anti-DRM protest.

International Day Against DRM at Packt Publishing

International Day Against DRM at Packt Publishing

Well, I just found out that this year, to demonstrate their continuing support for Day Against DRM, as they celebrates International Day Against DRM, May 6th 2015, Packt Publishing is offering all its DRM-free content at $10 for 24 hours only on May 6th – with more than 3000 eBooks and 100 Videos available across the publisher’s website.

[Read More...]

Book Review: Application Development with Qt Creator - Second Edition

Almost three weeks ago I received a review request from one of the Packt Publishing staffs to review Application Development with Qt Creator, 2nd Edition written by Ray Rischpater which has been recently published by Packt Publishing. Since I’ve been developing cross platform Qt (cute, often mispronounced as Q-T cue-tee) applications from Qt 4 era back in 2008 – when Qt Creator was not around yet and the project was running by Trolltech at the time – and a handful of Qt Quick mobile applications over the past two years, I consider myself eligible enough to write a brief review on it. So, I was provided with a review copy and after reading it cover to cover, my thoughts on the book are as follows.

Application Development with Qt Creator, 2nd Edition

Application Development with Qt Creator, 2nd Edition

[Read More...]

Wifi Fix for Asus Google Nexus 7 Cellular, When SIM-Card Is Inserted

As a Nexus 7 tablet user I’ve been struggling with my Nexus 7 WiFi from the moment that I’ve owned it. It was originally released with Android 4.2.0 installed. Nonetheless, Android 4.2.1 and 4.2.2 didn’t get me anywhere with the WiFi issue. In fact, you may have suffered from this issue, and are already familiar with. After inserting a SIM-Card into the device, Android asks to restart the device. However, after rebooting you will notice the WiFi module won’t work. No matter how hard you try it won’t see any WiFi network while keeps saying “WPS failed. Please try again in a few minutes”. Even tried an open unencrypted WiFi without any luck. In fact, the only solution that worked for me was removing the SIM-Card completely and do a factory reset.

Also as you may have noticed, it’s been quiet some time since an issue has been opened on Google Code around this issue on Nexus 4, Nexus 7 and Nexus 10 devices. Unfortunately, it seems that Google doesn’t care about this issue at all, and they closed the issue while ago. Even worse, they won’t allow comments any more (At the time of this writing there are 1223 comments on the issue which shows how serious the situation is).

Anyway, if you’re one of the sufferers from this issue, still there may be some good news for you. It appears that the root of all evil is inserting a non-U.S. SIM-Card on your device. Hopefully, I suddenly came across an Android application called WiFi Fix for Android 4.x by Fardjad Davari, which completely solved the problem for me. It’s been a week since I tried this application and found no more issue with my WiFi.

In fact, the process is very easy and straightforward to follow. Here is what worked for me on Nexus 7 with latest CyanogenMod 10.1 nightly builds (It may work on Nexus 4 or Nexus 10, too):

[Read More...]

Getting real IP addresses using Nginx and CloudFlare

[Update]: Thanks to digitaltoast for informing me about the missing real_ip_header CF-Connecting-IP; from the script and providing a patch for it.

OK, I suppose you know what CloudFlare is, and are familiar with Nginx configuration process, before we proceed any further. Just in case you don’t know, CloudFlare offers free and commercial, cloud-based services to help secure and accelerate websites. The thing is, I’m really satisfied with the services they offer except a repellent issue about logging the real IP address of your website’s visitors. Since CloudFlare acts as a reverse proxy, all connections come from CloudFlare’s IP addresses, not the real visitors anymore. Anyway, using Nginx there’s a simple workaround for this issue, which I’ll describe in the rest of this post.

[Read More...]

Colors Talk: A Colorful Terminal / Console

If you’ve ever used a GNU Gentoo or Funtoo Linux variant, or a live version of any of them, you may have noticed their eye-catching colorful terminal or console. Whether you’re on a virtual console or one of KDE, GNOME, XFCE, LXDE terminal apps.

A Colorful Xfce4 Terminal on FreeBSD (Bash)

A Colorful Xfce4 Terminal on FreeBSD (Bash)

The default Xfce4 Terminal on FreeBSD (sh csh)

The default Xfce4 Terminal on FreeBSD (sh csh)

When I’ve migrated from Funtoo to FreeBSD, the one thing that I’ve missed so badly was its colorful terminal. The nice thing about these colors is taht they always give you some valuable hints, e.g., currently you’re root user or a regular user, the file is a symlink (Symbolic link), executable or just a regular file.

Well, it’s pretty easy to have your own colorful terminal or console, once you’ve found out how Gentoo and Funtoo did that. Fortunately, it works on *BSD and all other Linux distros as well. So, stay with me and I’ll describe the process in the following.

[Read More...]

nano, Syntax Highlighting

GNU nano is my favorite text editor while I’m on console. Although, it doesn’t offer syntax highlighting by default, it comes with a decent set of syntax highlighting files. Usually, these files are exist in /usr/local/share/nano or /usr/share/nano, depending on your distro’s preference. You can enable syntax highlighting for your prefered language(s) by including related file(s) with .nanorc extension in your ~/.nanorc file.

~/.nanorc - FreeBSD
include "/usr/local/share/nano/asm.nanorc"
include "/usr/local/share/nano/awk.nanorc"
include "/usr/local/share/nano/c.nanorc"
include "/usr/local/share/nano/cmake.nanorc"
include "/usr/local/share/nano/css.nanorc"
include "/usr/local/share/nano/debian.nanorc"
include "/usr/local/share/nano/fortran.nanorc"
include "/usr/local/share/nano/gentoo.nanorc"
include "/usr/local/share/nano/groff.nanorc"
include "/usr/local/share/nano/html.nanorc"
include "/usr/local/share/nano/java.nanorc"
include "/usr/local/share/nano/makefile.nanorc"
include "/usr/local/share/nano/man.nanorc"
include "/usr/local/share/nano/mgp.nanorc"
include "/usr/local/share/nano/mutt.nanorc"
include "/usr/local/share/nano/nanorc.nanorc"
include "/usr/local/share/nano/objc.nanorc"
include "/usr/local/share/nano/ocaml.nanorc"
include "/usr/local/share/nano/patch.nanorc"
include "/usr/local/share/nano/perl.nanorc"
include "/usr/local/share/nano/php.nanorc"
include "/usr/local/share/nano/pov.nanorc"
include "/usr/local/share/nano/python.nanorc"
include "/usr/local/share/nano/ruby.nanorc"
include "/usr/local/share/nano/sh.nanorc"
include "/usr/local/share/nano/tcl.nanorc"
include "/usr/local/share/nano/tex.nanorc"
include "/usr/local/share/nano/xml.nanorc"
~/.nanorc - Funtoo or Gentoo
include "/usr/share/nano/asm.nanorc"
include "/usr/share/nano/awk.nanorc"
include "/usr/share/nano/c.nanorc"
include "/usr/share/nano/cmake.nanorc"
include "/usr/share/nano/css.nanorc"
include "/usr/share/nano/debian.nanorc"
include "/usr/share/nano/fortran.nanorc"
include "/usr/share/nano/gentoo.nanorc"
include "/usr/share/nano/groff.nanorc"
include "/usr/share/nano/html.nanorc"
include "/usr/share/nano/java.nanorc"
include "/usr/share/nano/makefile.nanorc"
include "/usr/share/nano/man.nanorc"
include "/usr/share/nano/mgp.nanorc"
include "/usr/share/nano/mutt.nanorc"
include "/usr/share/nano/nanorc.nanorc"
include "/usr/share/nano/objc.nanorc"
include "/usr/share/nano/ocaml.nanorc"
include "/usr/share/nano/patch.nanorc"
include "/usr/share/nano/perl.nanorc"
include "/usr/share/nano/php.nanorc"
include "/usr/share/nano/pov.nanorc"
include "/usr/share/nano/python.nanorc"
include "/usr/share/nano/ruby.nanorc"
include "/usr/share/nano/sh.nanorc"
include "/usr/share/nano/tcl.nanorc"
include "/usr/share/nano/tex.nanorc"
include "/usr/share/nano/xml.nanorc"

Note: If the file doesn’t exist, you should create it first:

$ touch ~/.nanorc
[Read More...]