Bankerupt

Bankerupt Book CoverThis book the author has focused on gun crimes in the USA along with the usual banking theme. Two plots simultaneously runs and then they merge with each other towards the end. The author has also mentioned the problem of stashing black money in swiss banks by Indians and the role Indian investment bankers played in that.

Overall a good read, but not the very best by the author.

Posted in Book Reviews | Tagged , , | Leave a comment

Nokia X – A Review

Few days back I purchased a Nokia X (Black) from flipkart using the mobile application and it cost me Rs 6877/-, which was a very good price available especially looking at the fact that the Nokia Store itself is selling for approx Rs 7500.

About the Phone – Nokia X

The Nokia X is a dual SIM phone with 3G services available on SIM 1 and 2G on SIM 2. The phone is powered by a Qualcomm Snapdragon S4 dual core processor running at 1.2 GHz and 512 MB RAM. The internal storage on the phone is 4Gb and there is a micro SD card expansion slot available which can take upto 32Gb micro SD card.

I found the performance of the phone very good as compared to some of the cheap Chinese quad core / 1Gb phone out there in the market.

The phone display is 10.16 cms and the main camera is 3.2 mega pixels with a resolution of 2048×1536. If you are not using video calls then the secondary camera on front may not be missed by you. I don’t miss it. The primary camera photos/videos are very good quality for a normal person. Specially the shutter speed is pretty fast. The 3.2 mega pixel Nokia quality is very good.

The phone has a plastic body and a solid Nokia build. Its feels quite light and is very handy.

I have been using this phone from few days now, and I must say that I like it very much.

The User Interface

Nokia X uses windows tiling interface. You can resize and move tiles around to have a customized look and feel of the phone. Personally I find the user interface quite refreshing change from the standard android UIs which appear almost same in every other android phone.

Multitasking and Fastlane

Fastlane is a screen with quick access to most recently used apps, photos, notifications, calls etc. It appeared first in the Symbian based Asha series. To see this screen you can swipe right or left. In order to edit what appears there, long press any application and edit it or click on the settings icon to customize Fastlane. What gets recorded in Fastlane, is configurable. There is a difference in speed when you launch a recently used application. This clearly indicate that multiple applications are running simultaneously and Fastlane can be used to switch between them.

The Applications

Nokia X runs the Nokia X platform, which is based on the Open Source version of Android. In a nutshell, this is Nokia’s own android and does not have any support for Google Play Store. However, there are a lot of applications available on Nokia Store. For any application which is not available on Nokia Store, several third party stores can be installed (by enabling the third party stores in the security settings). I have used 1Mobile Market for installing some of the applications (like Yahoo Mail, Flipboard, 2048, Flickr, What’s App etc) which were not available on Nokia Store. But the application on Nokia store are growing fast.

I downloaded the Gmail / Youtube etc applications from 1Mobile Market, but it did not launch displaying that the Google Play services on which it is dependent are not installed

There are instructions on internet on installing the Google Plays by rooting the device, so if you are keen on going google way, you can take this step forward.

Posted in Phone Reviews, Reviews | Tagged , , | Leave a comment

RPi – Static IP Address on Wifi

There is a GUI tool in the desktop called “wpa_gui” which can be used to connect to the wireless network provided you have a supported wireless card attached to the RPi. However, if I want to run a headless RPi I would need a static IP address. Unfortunately “wpa_gui” does not provide me a means of configuring static IP address on the “wan0″ interface and my ADSL router does not support associating a static IP address with a MAC Address. This means I have to use static IP address configured on my wireless interface on the RPi and have to do it the old fashioned way (read I am loving it).

Open up the “/etc/network/interfaces” file and make the following entries. The commented lines are the one’s which were added by the “wpa_gui” and we don’t need them. If you have little Debian experience, you will find these lines self explanatory:

auto lo
iface lo inet loopback

#auto eth0
iface eth0 inet static
address eth0 192.168.1.52
netmask 255.255.255.0
gateway 192.168.1.1

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.51
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid "My SSID"
wpa-passphrase "My Passphrase"

I have added a static IP address configuration line for the eth0 interface also, so that in case someday I connect my RPi to physical connection I will just bring my eth0 interface up and have an IP address. The reason I have commented the “auto eth0” line is because in case a physical interface is up, the default route of the system is always through the physical interface i.e eth0 in this case. So, if my WiFi is up, I want my packets to go in/out through WiFi by default and not through “eth0” (by the way it does not matter if you have connected the cable physically or not, if the physical interface is up, it is the default route out). Of-course we can prevent that, but it is going to be a little bit complicated, so we are going to just comment out auto line to make sure that the “eth0” does not come up. It is also possible to have both “eth0” and “wlan0” run simultaneously, but again it is a bit complicated for this post and I do not need that anyway.

Now you can restart the networking or reboot the RPi and your WiFi should come up with the static IP address.

Posted in RaspberryPi | Tagged , , | Leave a comment

Setting up a Git Repository on A Remote Server

Git is a wonderful distributed version control system and we can have a personal repository quickly set up without any technical difficulties. However at times we may need to work on shared development model where multiple people need commit access to the code. In such cases we would need a centralized repository store.

By following  the given steps we will be able to set up a shared git repository accessible over SSH.

  • First a user needs to be created to hold the git repository (multiple repositories can also be set up under the same git user). Next a password need to be set up for the same user. Since this user will  never log on using shell, a password which is secure, random, very long string is a good option.
$ sudo /usr/sbin/useradd -c "Git Version Control" -d /home/git -m -s /bin/bash git
$ sudo passwd git
  • Next login as git user and create the project directory to hold the repository and then initialize that directory as a barebones (blank) git repository
$ mkdir -p /home/git/projects/myproject1.git
$ cd /home/projects/myprojects.git
$ /usr/bin/git --bare init
  • Set up the .ssh directory for the git user to hold the authorized_keys file with the public ssh keys for the user allowed to log in a git user and access the repository
$ cd /home/git
$ mkdir .ssh
$ chmod -R 700 .ssh
$ touch .ssh/authorized_keys
$ chmod 644 .ssh/authorized_keys
  • Finally change the shell of the git user to git-shell so that interactive logins for the user are not possible and only selected remote git commands are allowed.
$ /usr/bin/chsh -s /usr/bin/git-shell

Add the public key of the user(s) to the authorized key file. These users will be able to access the repository. Now all that needs to be done is to clone the repository and start working. Following command can be used to clone the repository on a *nix box. The 7652 is the port number where ssh daemon is listening. If your port is the default, 22, you can skip this port number.

$ git clone ssh://git@myhost.mydomain.com:7652/home/git/projects/myproject1.git/
Posted in FLOSS | Tagged , | Leave a comment

Time-zone Setting in Linux and BSDs from Shell

Often the default time-zone in a linux and bsd system does not match our preferences. On a system which we have installed ourself, we may have selected the appropriate time-zone during installation, but as systems administrators we often get our hands on a system which is pre-installed and after taking over we want to change the time-zone to something which we are comfortable understanding and co-relating various system events in the time of our comfort.

The time-zone of  the system is determined by a file called “/etc/localtime”, which a binary file. In order to change the time-zone, we need to replace this file with an appropriate file of our time-zone. All time-zone files are found in “/usr/share/zoneinfo”.

On some systems “/etc/localtime” is a copy and in some cases a hard link of one of the time-zone found in “/usr/share/zoneinfo” directory. In OpenBSD, “/etc/localtime” is a symlink to one of the files in “/usr/share/zoneinfo”. I prefer the symlink approach, you can pick any of the methods to make appropriate “/etc/localtime” file available.

In order to change the time-zone of my system from UTC to IST, I did the following.

$ sudo ln -sf/usr/share/zoneinfo/Asia/Kolkata /etc/localtime

In case you accidentally delete the “/etc/localtime” file, the timezone of the system reverts to UTC and upon having the correct file present again, it will reflect the correct timezone again. See below (I did this on a RHEL 6 machine) –

$ date
Wed Dec 18 13:56:05 IST 2013
$ sudo rm -f /etc/localtime
$ date
Wed Dec 18 08:36:29 UTC 2013
$ ls -l /etc/localtime
ls: cannot access /etc/localtime: No such file or directory
$ sudo ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
$ date
Wed Dec 18 14:07:03 IST 2013

 

Posted in FLOSS, Tips/Code Snippets | Tagged , , , , , , | Leave a comment