Archive for the ‘Programming’ Category

I was trying to build a webserver for just displaying a simple message but I don’t want to use Apache/IIS/nginx etc. So I tried nodejs and literally it is so easy to write a webserver in just 15 lines of code. Webserver: which can show static index.html page which can log remote client IPs which […]

One of my blog user “Chris” asked for FTP clean up script, so here it is: //CONFIG SECTION //******************************************************* // Credentials for FTP Server $source_server_ip = “your_domain_or_IP”; // Server IP or domain name eg: or ftp.domain.tld // Credentials for FTP account $ftphost = “ip_or_hostname_of_ftp”; // FTP host IP or domain name $ftpacct = “userid”; […]

Installing MinGW/MSYS on Windows with OpenSSL support

Posted: 26th November 2013 by Babar Shafiq in Programming
Tags: , , , ,

  Installing MinGW/MSYS Install MinGW (before MSYS) Download the MinGW Installer from Select Save File when prompted. Open the downloaded exe. Click Yes when Windows asks if you want to allow it. Click Next > on the Welcome screen. Select Download and Install and click Next > Read the License Agreement and […]

Flash C++ compiler is now open source

Posted: 6th July 2013 by Babar Shafiq in Programming
Tags: , , , ,

  If you like Flash, here is a good news that should interest you. Adobe released its open source Flash C + + compiler. FlashCC, this compiler can import and use of C or C + + code to the web while maintaining good performance, cross-browser compatibility, connecting with the Flash API, and support for […]

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 […]

Growl is very good tool for local and remote notifications, we can compare it with libnotify in Linux plus growl is already available on multiple platforms, So now I want to use it with Microsoft Outlook to notify me when new email arrives, but unfortunately there is no Add-on available for growl after Outlook 2007 […]