"The only way of finding the limits of the possible is by going beyond them into the impossible." -
Arthur C. Clarke

Three Wolf Moon T-Shirt

May 27th, 2009
Three Wolf Moon T-Shirt

The Three Wolf Moon T-Shirt stirred up quite a news in the past few days.

The T-shirt existed quietly for some time but sales of the kitsch Three Wolf Moon T-shirt shot up 2,300% after a spate of ironic reviews went viral. The first review gave the shirt five stars, saying it “Fits my girthy frame, has wolves on it, attracts women” but “cannot see wolves with arms crossed”… and more funny reviews came along and the legend began:
…This item has wolves on it which makes it intrinsically sweet and worth 5 stars by itself, but once I tried it on, that’s when the magic happened. After checking to ensure that the shirt would properly cover my girth, I walked from my trailer to Wal-mart with the shirt on and was immediately approached by women. The women knew from the wolves on my shirt that I, like a wolf, am a mysterious loner who knows how to ‘howl at the moon’ from time to time (if you catch my drift!)…

Since then this video on YouTube has debuted and sales are higher than ever:

So, what are you waiting for get your own chick magnet Three Wolf Moon T-Shirt today! Check back and let everyone know about its powers.

Listen to the intervew with the manufacturer of the T-shirt.

Listing and Editing Cron via Crontab

May 26th, 2009

To list and edit crons, log in via SSH and use the following commands:

crontab -l to list crontabs
crontab -e to edit crontabs

editing is done in VI. Basic VI commands: http://www.cs.colostate.edu/helpdocs/vi.html

How to add rel=”nofollow” to the top links in Magento

May 13th, 2009

It is a good practice to add nofollow attribute to the links that are not important from SEO perspective, so link juice is not trickled down to these pages.

These links are on the top of the Magento pages:

My Account | My Wishlist | My Cart | Checkout | Log In

Here is what you have to do:

1. Open the following file:
app/design/frontend/default/[*yourTheme*]/template/page/template/links.phtml
– Replace [*yourTheme*] with whatever the name of your theme is. Replace it with ‘default’ if you are using the default theme.

2. Add rel=”nofollow” to the code on line 37

3. Test your pages

Where can I add a rel=”nofollow” to “View as: Grid List” and “Sort By” in Magento Commerce

May 13th, 2009

If you are wondering where in the code you can add rel=”nofollow’ to the top bits (view as Grid, sort by etc) of the category and search pages in Magento you came to the right place.

To clarify these links are are

http://www.domain.com/category?mode=list
http://www.domain.com/category?mode=grid
http://www.domain.com/category?mode=grid&limit;=9&p;=2
http://www.domain.com/category?mode=grid&limit;=15
etc.

Open the following file:
/app/design/frontend/default/[*your skin name*]/template/catalog/product/list/toolbar.phtml

– replace [*your skin name*] with the skin name you setup if you use a different design than the default.

If you are using the default design, replace it with ‘default’. In this case the file is here:
/app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml

Add rel=”nofollow” to line 87, 102 and 104.

How to install Midnight Commander 4.6.1

August 25th, 2008

Midnight Commander is a very useful file manager.

Install Midnight Commander
# wget http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz
# tar zxvf mc-4.6.1.tar.gz
# cd mc-4.6.1
# ./configure
# make
# make install

To run Midnight commander use

How to add a user to all blogs in WordPress Multi User WPMU

July 21st, 2008

OPEN:

wp-includes/wpmu-functions.php

FIND:

function wpmu_create_blog($domain, $path, $title, $user_id, $meta = ”, $site_id = 1) {
$domain = addslashes( $domain );
$title = addslashes( $title );
$user_id = (int) $user_id;’

Then, A little bit further down FIND:

add_user_to_blog($blog_id, $user_id, ‘administrator’);

after this line ADD:

add_user_to_blog($blog_id, X, ‘administrator’);`

where X is the userid of the user you wish to add, this can be repeated if you have multiple site admins

source: http://mu.wordpress.org/forums/topic.php?id=1445
Thank you Xen

Add users in ‘AllowUsers’ of SSH for SSH access

May 22nd, 2008

If users are not listed in ‘AllowUsers’ list for SSH, these users will be blocked from accessing the server via SSH.
Users will need to be added to the /etc/ssh/sshd_config file.

add this line at the end of the file: AllowUsers username1

Don’t forget to restart the server.

Edit Sudoers File - visudo

May 5th, 2008

1) Open the sudoers file safely:
visudo command edits the sudoers file in a safe fashion.
Attention: you can only run visudo as root

This is a vi editor. Here are some basic vi commands:

To enter vi insert mode: i
To enter vi command mode: [esc]
To exit vi and save changes: ZZ or :wq
To exit vi without saving changes: :q!

2) Update the sudoers file
Update the part where you see:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL

Add the desired user name and ALL=(ALL) ALL. For example:
user1 ALL=(ALL) ALL

Where can I find the php.ini file?

March 1st, 2008

The sure way finding the php.ini file is using phpinfo:

Create an empty file and add the following to it:

phpinfo

Save it as anything.php (anything is really anything, replace it with anything you want)

Upload this file to your website and load it from a browser.

Look for “Configuration File (php.ini) Path”.

There you go. Feel free to comment here is you have any questions.

How to restart SSH (restarting SSHD) remotely?

March 1st, 2008

There are a few different ways to restart SSHD remotely.
You will need root access in order to do this.

1) /etc/init.d/sshd restart

2) kill `cat /var/run/sshd.pid` && /usr/sbin/sshd