‘Open With’ Menu in Mac OS X

Clearing Finder’s ‘Open With’ Menu in Mac OS X Mountain lion

Enter the following command :

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

Mac Pro Upgrade HD to SSD

Download Carbon Copy Cloner (30 day trial), and install on old hard drive
Aattach new hard drive, can be internally or external
OSX will tell you you attached a drive it can’t read and will automatically start Disk Utility for you (this utility is under Applications, then Utilities)

Select the new drive in Left panel, and erase near middle top
Defaults are fine (journaled is the default)
Give it a new name (bottom box) like NewSSD, SSD, or……
Click erase near bottom right
Close Disk Utility when finished (a few seconds)

Run Carbon Copy Cloner (it’s under your applications)

Choose your old hard drive as the SOURCE, top left
Choose your SSD as destination (top right)
On the left middle area, uncheck any large data folders. You can use Finder and Get Info to confirm this. Use a pen and paper to confirm you are leaving off enough data to fit on the new SSD.

Accept the rest of Carbon Copy Cloner defaults (i.e. don’t change the settings)
Click on Clone (bottom right) this may run 45 minutes to several hours depending on whether both drives are internal or one is connected with Thunderbolt, USB or Firewire, and the amount of data you are copying.

Replace your old hard drive with your new SSD or
If you are using LION, you can just go into System Preferences -> System -> Startup Disk and choose the new SSD as the Startup Disk and you don’t have to change any drive positions if both are already setup internally

Remove the Joomla 2.5 meta name generator tag

The method to removing the meta name generator tag for Joomla varies between versions. On Joomla 2.5 you can simply add this code to your index.php file in your template.

The main advantage of editing the template code instead of installing a plugin is less overhead.
The fewer plugins you have, the faster your site will be, and queries add up fast.


Put it just after the line //no direct access.
This method will vary greatly on what template you are using and from what company.
For example YooThemes has a different template structure then RocketThemes.
You will have to noodle around a bit yourself in order to do this.

This address no longer accepts mail

This address no longer accepts mail Qmail – Plesk

It was a day again troubleshooting qmail mail delivery issue and found that qmail was rejecting emails to the domain which is hosted on same plesk server but was having other mail server.

The users were getting error : “This address no longer accepts mail”

Below fix worked out
we need to remove that domain from

vi /var/qmail/control/rcpthosts
vi /var/qmail/control/virtualdomains

and then need to restart the qmail service :

/etc/init.d/qmail restart

Install mcrypt and PHP upgrade to 5.3.3

On CENTOS5 upgrade php to 5.3.3 and installed mcrypt for the use of Magento.
Here are the commands to install it all

sudo yum update

upgrade PHP 5.3:

php -v

list command to quickly get information:

yum list installed | grep php | cut -d' ' -f1

checked to make sure that those packages were available for php53:

yum search php53 | cut -d' ' -f1 | grep php

Stop webserver

sudo service httpd stop

remove the old PHP packages:

sudo yum remove php php-cli php-common php-devel php-gd php-mbstring \
 php-mysql php-mcrypt php-pdo php-pear php-pgsql php-xml php-xmlrpc

Installed the available replacement packages:

sudo yum install php53 php53-cli php53-common php53-devel php53-gd \
 php53-mbstring php53-mysql php53-pdo php53-pgsql php53-xml php53-xmlrpc

Install PHP mcrypt

 sudo yum install php53-devel libmcrypt-devel
 wget http://museum.php.net/php5/php-5.3.3.tar.gz
 tar xf php-5.3.3.tar.gz
 cd php-5.3.3/ext/mcrypt/
 make test
 sudo make install

Now all we have to do is set up the mcrypt.ini file so that the mcrypt extension loads with PHP. This file needs to reside at /etc/php.d/mcrypt.ini.

 echo -e "; Enable mcrypt extension module\nextension=mcrypt.so" | \
 sudo tee /etc/php.d/mcrypt.ini

Install PHP Pear

wget http://pear.php.net/go-pear.phar
sudo php go-pear.phar 
sudo service httpd start


configure.in:8: warning: LT_AC_PROG_SED is m4_require’d but is not m4_defun’d
configure.in:8: LT_AC_PROG_SED is required by…
acinclude.m4:2683: PHP_CONFIG_NICE is expanded from…
configure.in:8: the top level

Files ltmain.sh & libtool.m4 missing from /usr/share/alocal

Find the files of the server

$ find / -name ltmain.sh

result: /usr/lib/php/build/ltmain.sh

$ find / – name libtool.m4

result: /usr/lib/php/build/libtool.m4

Navigate to the alocal

cd /usr/share/alocal

Create symlinks for the found files

ln -s /usr/lib/php/build/ltmain.sh ltmain.sh
ln -s /usr/lib/php/build/libtool.m4 libtool.m4

all done

Resume process with alocal command

WordPress SQL Snippets

Batch Deleting Spam Comments

 DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'spam'; 

Batch Deleting All Unapproved Comments

 DELETE FROM wp_comments WHERE comment_approved = 0 

Disable Comments on Older Posts (edit date)

 UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2012-01-01' AND post_status = 'publish'; 

Batch Deleting Post Revisions

 DELETE FROM wp_posts WHERE post_type = "revision"; 

Delete Post Meta

DELETE FROM wp_postmeta WHERE meta_key = 'YourMetaKey';

Changing the URL of Images

 UPDATE wp_posts
SET post_content = REPLACE (post_content, 'src=”http://www.oldurl.com', 'src=”http://www.newurl.com'); 

Photoshop Grid script

Save as .jsx

// check for document
if(app.documents.length > 0){  
	// get active document
	var psDoc = app.activeDocument; 
	// get user input on column count
	var colWidth = parseInt( prompt("Fill in Column width", 40) );  
	var docWidth = psDoc.width;  
	// determine number of columns
	var colCount = docWidth / colWidth; 
	// create vertical guidelines
	for(i = 0; i <= colCount; ++i){  
		psDoc.guides.add(Direction.VERTICAL, i * colWidth);  
	var docHeight = psDoc.height;

	// determine number of rows
	var rowCount = docHeight / colWidth; 
	// create horizontal rows
	for(i = 0; i <= rowCount; ++i){  
		psDoc.guides.add(Direction.HORIZONTAL, i * colWidth);