Handy commands in Mac/Linux systems

Here’s a list of common commands I use in Linux. I will continue to update this list with more stuff. Checking fireball logs: [code lang=”bash” gutter=”false”] cat /var/log/appfirewall.log # You will see stuff like Jun 21 10:37:51 prakhars-MacBook-Pro Firewall[90]: postgres is listening from 0.0.0.0:5432 proto=6 Jun 21 10:38:11 prakhars-MacBook-Pro Firewall[90]: mysqld is listening from ::ffff:0.0.0.0:3306 …

Using Django using VirtualEnv on MAC. Fast forward installation.

This is a fast forward tutorial which will guide you through django installation on virtualenv. Detailed installation instructions using source codes can be found on respective package’s official site. Pre- Requirements: Make sure you have easy_install on MAC Install pip using easy_install pip 1) Installing Virtualenv: Run following lines in terminal: [code lang=”bash” gutter=”false”] pip …

Display file permissions as octal number in ls command

Normally, in *nix systems like Linux, mac the file permissions are displayed as symbolic notations. So when doing a ls -l in a directory you’ll see drwxr-xr-x+ like symbolic permissions next to a directory. This is equivalent to 755 in octal permissions. I find octal permissions easier to grasp and understand. Unfortunately, there is no …

HTML encode text in javascript simple shortcut

Recently, I wanted to obfuscate HTML text for some reasons. I found this link http://www.voormedia.com/en/tools/html-obfuscate-scrambler.php for scrambling text. My HTML document was: [code lang=”html”] <div id=”pictures”> <h2>Exterior</h2> <a class=”hyperlinks” href=”link”> link1 inside Exterior</a> <a class=”hyperlinks” href=”link”> link2 inside Exterior</a> <a class=”hyperlinks” href=”link”> link3 inside Exterior</a> <h2>Interior</h2> <a class=”hyperlinks” href=”link”> link1 inside Interior</a> <a class=”hyperlinks” href=”link”> …

Changing Orientation in Iphone simulator from Portrait to Landscape

While writing my app for iOS 4 in XCode 4, I faced this situation of changing orientations from Portrait to landscape and vice-versa. This initially appeared like cake-walk to me, something which could be done with a flip of a button. Obviously I was wrong! I tried referring to http://stackoverflow.com/questions/475553/how-can-i-test-landscape-view-using-the-iphone-simulator but this thread landed me nowhere, …

About

I am just like any other homo sapien living merrily on earth. Born genetically unmodified. I love playing with children and like messing around with all things tech. Apart from that I am a big time fan of  Kiefer Sutherland and hope to meet him someday.

Hello world!

Hi friends! Thanks for landing here. The world is nice place. I just endeavor to keep it that way. Email me at hiprakhar@gmail.com