Archive for the ‘Tips’ Category

Code formating script

Posted: 4th April 2013 by Babar Shafiq in Programming, System Administration, Tips
Tags: , , ,

#!/usr/bin/perl -w my $ifile = shift; my $blank = 0; my $indent = 2; open(IFILE, “$ifile”) or die “Cannot open $ifile\n”; while(my $line = ) { if($line =~ /^\s*else/i or $line =~ /^\s*end/i ) { #reduce indent before xxx $blank = $blank – 2; } if($blank > 0) { print ” ” x $blank; #print […]

Using ssh as a proxy or encrypted tunnel to browse the web can sometimes be necessary: When you’re at some public place but need to login securely to your work place. When local access restrictions make life really difficult. I use SSH for the security reasons. I want to make sure that my security and […]

  Physical access is everything, it is almost impossible to prevent machine access/password break if somebody else got physical access to some Linux machine. But there are some steps you can make somebody work hard to access the machine physically (provided they have good knowledge of Linux).

If you ever wanted to download the rpm package instead of installing it with yum ! you can do that with ease, that is useful when you want to keep backup of some RPMs or want to see what’s inside RPM etc.

  If you recently installed linux (CentOS/Fedora/RedHat) with text mode and now want to use its Graphical GUI which was left unchecked during the installation, you can install it from Internet very easily.

  Recently I lost when I was unable to delete some post from my timeline and then I found that our activity log on our timeline serves many purposes. You can use it to quickly hide old statuses you have made in the past, or delete them, you can also use it to Unhide statuses […]