Archive for the ‘Info Tech’ Category
Page 1 of 3 1 2 3
Viewing Options List View Grid View

Setting up email notification for Subversion commits on Linux CentOS

To setup email notifications when an svn commit is done to svn repository on a linux server, first you need to install perl module SVN::Notify

Once installed you’ll have a utility called svnnotify.

Under your repository’s hooks folder create a file post-commit

#!/bin/sh
REPOS="$1"
REV="$2"
/usr/local/bin/svnnotify -r $REV -C -d -H HTML::ColorDiff \
-p $REPOS -t to-mail@domain.tld --from from-mail@domain.tld \
--reply-to reply-to@domain.tld

Make this script executable by web server and update the email addresses in the above script appropriately. To test the script execute this command

./post-commit path/to/your/repos #

where # is an actual revision number. And you’ll receive an email notification with details of that particular commit.

Help taken from http://help.joyent.com/index.php?pg=kb.page&id=53

What is Cloud Hosting?

In simple terms cloud hosting is done via a large high availability SAN (storage area network) with no single point of failure. This SAN is connected to big hypervisors (or you can call them the hardware nodes) that have a lot of CPU and RAM. Each hypervisor can host multiple VMs (Virtual Machines). The key of this whole setup is that SAN never goes down and if it does there is another one with mirrored copy which takes over. Having a single SAN is of no use so in cloud it must be fully redundant. And if a hypervisor goes down then based on available space the VM can automatically start off from another hypervisor. The data remains on the SAN so there is no delay of moving any data across servers. The CPU, RAM and disk allocation of VMs can be easily adjusted.

Now compare this to single server hosting solution where if the server crashes and the data is not recoverable you have to restore it all from the backup and many times re-setup the whole system from scratch, resulting in long downtimes. You cannot add more RAM, CPU or disk without downtime and there are physical limitations to it.

Find newer files on linux

Today I had to recover some files from backup that were uploaded during a certain time period over night by a developer into production server. To quickly find the files which needed to be restored I came up with this little trick

find ./ -newer somefile

Where somefile was another file which was a reference point to find any files newer than that one. This listed all the new files.

Traffic Shaping in Mac OS X using ipfw

Since I have to do a lot of YouTube uploads as part of my volunteer work, my Internet connection was getting choked causing problem for other work (email, ftp, etc.). Thanks to Mac OS X built-in ipfw I can limit uplink connection based on services, destination ports or IPs! This is just a quick test to limit the uplink for web uploads to 200KB/sec.

 ipfw pipe 10 config bw 200KByte/s
 ipfw queue 75 config pipe 10 weight 75
 ipfw add 100 queue 75 ip from me to any dst-port 80,443

Help taken from Destructive Thinking.

On Mac PubSubAgent wants to connect to twitter.com on TCP port 443 (https)

PubSubAgent is Publication Subscription Framework agent. It allows applications to subscribe to RSS and Atom Feeds.

According to Apple, this message is expected and its safe to allow it to connect.

How to create PDF from InPage Urdu software?

Print from InPage directly to Adobe Acrobat or CutePDF (available free of cost) to generate PDF. Any questions, please ask.

cPanel/WHM – [checkperlmodules] The perl module SQL::Statement could not be installed

There is a cyclic dependency for this perl module which is causing problem in installation. You would receive email like this:

Subject: [checkperlmodules] The perl module SQL::Statement could not be installed.

This module is required by cPanel, and the system may not function correctly until it is installed, and functional.  Below is the results of the auto-install attempt:

Test Run
==============
Can’t locate SQL/Statement.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at – line 1.
BEGIN failed–compilation aborted at – line 1.

Solution of this problem is to install the perl module manually.

cd /home/.cpan/sources/authors/id/R/RE/REHSACK/
wget http://search.cpan.org/CPAN/authors/id/R/RE/REHSACK/SQL-Statement-1.31_002.tar.gz
tar zxvf SQL-Statement-1.31_002.tar.gz
cd SQL-Statement-1.32 && perl Makefile.PL && make && make test && make install

And verify using

/scripts/checkperlmodules

MySQL Replication Error: Duplicate Entry for Key

On our MySQL slave server I saw this error

Duplicate entry '2' for key 'PRIMARY'

A quick fix was to issue this command:

SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;

Some say that there could be an entry where it was written in the slave and then written again so the duplicate error occurred. Others say that if myisamchk was run in the master, it removed some entries and tries to create those entries again. The slave then attempts to write the same entry, but since myisamchk was not executed on the slave, the entry exists hence the duplication error.

How to recover wifi password on Mac

If you want to see what was the password that you used for a particular wifi connection, please check Keychain Access utility. Select System (top left), find the SSID and double click to select it, select Show Password check box, and enter admin password of Mac to see the password.

iPhone SDK – App Icons on iPad and iPhone – Retina Display

There are so many icons and launch images required now for iPhone 3 and iPhone 4 (retina display) and iPad, here is a quick reference page in the iOS Reference Library.

Page 1 of 3 1 2 3
Viewing Options List View Grid View