Monday, July 21, 2014

Some useful Apache web server commands

These are mostly for reference, to find the ones I use the most
Enable module: a2enmod vhost_alias
Enable site: a2ensite vhosts_alias
List enabled modules: apache2ctl -M

Saturday, July 19, 2014

Installing the Atom editor in Linux (Ubuntu)

To install the Atom editor by Github, you do not have any compiled deb/binaries except you use some third party repositories, which I try to avoid all the time. So, while searching for a way to compile this thing and avoid the errors, I found some info on several links that actually helped make it possible.
The steps:
1. Install the necessary dependencies using
sudo apt-get install libgnome-keyring-dev python2.7 git git-core
2. (Optional) In order to ensure that npm is using python2 use this
npm config set python /usr/bin/python2 -g
3. Now get the source and go into it
git clone https://github.com/atom/atom
cd atom
4. Now build it using the command
script/build
NOTE: You might need to become root before doing these
You might face problems regarding 'grunt' and 'npm' which means you might not have the latest version of 'npm'. So to install that, first try the command
npm update npm -g
If that does not help then try this
npm update -g
And if none of it helps, use this.
curl https://www.npmjs.org/install.sh | sh
After installing the latest version run the build command again and then it should go smoothly from there 5. Now to make 'atom' a command accessible from /usr/local/bin/atom do this
sudo script/grunt install


Credits:
1. http://blog.xero.nu/atom_editor_linux_install
2. http://stackoverflow.com/a/6237400/1928610

Wednesday, July 16, 2014

Android ADT Troubleshooting, fixing the libz.so.1 missing problem

There seems to be a common problem when launching the Android ADT bundle in Linux. It gives out a similar error like the following.
2012-06-06 18:44:40 - contactManager] /home/catia/android-sdks/platform-tools/aapt: 
error while loading shared libraries: libz.so.1: cannot open shared object file: 
No such file or directory
I too had this same problem in my Ubuntu 14.04 machine and as always after a simple query in Google, I found the solution through AskUbuntu. Here's what you have to do, run the following command. It installs a specific library that was previously fulfilled using the 'ia32-libs' package of Ubuntu.
sudo apt-get install lib32z1

Tuesday, July 15, 2014

A fraudulant Twitter account claimed to have predicted the Finale

People find so many amazing ways for their malicious activities :P Today I found a page in Twitter where the author claimed to have predicted the Final match between Germany and Argentina of the FIFA World Cup 2014, event to event. Which is to say, he predicted all the key turning points of the game. At first I was shocked at the scene of it. How come someone did that almost 12/13 hours earlier? Then, a little search result in the Twitter feed showed a link to an online blog that showed how this one hell of a trick was pulled of. Guess what? He simply posted all the possible scenarios beforehand and then as the match progressed he deleted each of them, keeping only the key points which were both in his feed and actually happened. This resulted in a Twitter account with posts showing only the key moments which turned the game :P What could be an alternative way?