Year: 2010

ptitle-particle1

CPAN – Perl Command Line

CPAN – Perl Command Line There are several ways to get Perl modules from CPAN installed on your unix-based system. Keep in mind that there is always more than one way to do it with Perl, and this is no different. Before embarking upon any installation, it’s a good idea to download the module, unzip […]
Read more

Install Google Mod Speed on Ubuntu / Debian

Install Google Mod Speed on Ubuntu / Debian mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving […]
Read more

Oracle Solaris 11 Overview

Oracle Solaris 11 Overview Production ready release delivering leading operating system technology innovation to improve availability, efficiency, scalability, performance, and security in the data center. What’s New Documentation System Requirements FAQ Oracle Solaris 11 Express raises the bar on the functionality introduced in Oracle Solaris 10, continuing Oracle’s leadership for providing the best choice for […]
Read more

Perl – Execute Command With Timeout

Perl – Execute Command With Timeout [perl] my $command_to_check = “$SSH_CON $host $SSH_CMD”; if (! execute_command($command_to_check)) { next; } sub execute_command($) { ### Executes a command with timeout ### Returns 0 if fails ### Returns 1 on success my $command=shift; my $timeout=30; eval { local $SIG{ALRM} = sub{die;}; my($oalarm) = alarm($timeout); $result=`$command 2>&1`; if ($? […]
Read more

MYSQL – Replication

MYSQL – Replication Login to your mysql server: mysql -uBla -p Some useful commands SHOW SLAVE STATUS; SHOW MASTER STATUS; SHOW PROCESSLIST ; SHOW SLAVE HOSTS;
Read more

Search String in Directory – UNIX

Search String in Directory – UNIX How to search for a string in a selection of files (-exec grep …). [bash] find . -exec grep “searchstring” ‘{}’ \; -print [/bash] [bash] find . -exec grep “searchstring” ‘{}’ \; -ls [/bash] This command will search in the current directory and all sub directories. All files that […]
Read more

Date/Time in a Timestamp format – Perl

Date/Time in a Timestamp format – Perl [perl] use Date::Manip; #### – Get DATE / TIME in correct format – ########## my $day= strftime “%d”, localtime; my $month= strftime “%m”, localtime; my $year = strftime “%Y”, localtime; my $now = localtime(time()); #################################################### $form_date_start = “$year/$month/$day 06:00:00”; [/perl]
Read more

Flush perl‚ Äôs print buffer – $|=1

Flush perl‚Äôs print buffer – $|=1 If you put a print statement inside of a loop that runs really really quickly, you won‚Äôt see the output of your print statement until the program terminates. The solution to this problem is to ‚Äúflush‚Äù the output buffer after each print statement. Where $| is non zero, it […]
Read more

Mac Book Pro – Sleeping Issues

Mac Book Pro – Sleeping Issues OS X supports five different sleep modes: 0 – Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake. 1 – Hibernation mode, with RAM contents written to disk, system totally shut down while ‚Äúsleeping,‚Äù and slower wake up, due to reading the […]
Read more

GET or POST – Secure

GET or POST – Secure GET is NOT Secure GET is not a secure method of sending data. Don’t use it for forms that send password info, credit card data or other sensitive information. Since the data is passed through as part of the URL, it’ll show up in the web server’s logfile (complete with […]
Read more
Cart

No products in the basket.