Find text in folder

Type this command to find text or code in specific file in folder

#grep  -lr  "copyright"  *

The results are the list of files that contain text copyright in files.

Add Flex slider to PHP code

Adding Flex Slider to PHP in Shopping cart software

Add js code to /js folder then add this code to PHP code

<div class="flexslider">
<ul class="slides">
<li> <img src="slide-1.jpg" alt="" /> </li>
<li> <img src="header.jpg" alt="" /> </li>
<li> <img src="slide-3.jpg" alt="" /> </li>
<li> <img src="slide-4.jpg" alt="" /> </li>
</ul>
</div>
<script src="js/jquery-1.6.2.min.js"></script>
<script src="js/jquery.flexslider.js"></script>
<script type="text/javascript">// <![CDATA[
  $(window).load(function() {
    $('.flexslider').flexslider();
  });
// ]]></script>

Change Apache ports Ubuntu


How to change apache2 ports

Open up a Terminal and run the following command.

#sudo pico /etc/apache2/ports.conf

Now, inside this file you should see something like the following:

NameVirtualHost *:80

Listen 80

If you want to change the default apache port completely simply change “Listen 80″ to what you need, for example “Listen 1337″. If you want to add another port while keeping port 80 open, you can simply add another line for example:

NameVirtualHost *:80

Listen 80

Listen 1337

Then edit default file

#sudo pico /etc/apache2/sites-available/default
and change <VirtualHost *:80> to the new port

Last thing you have to do now is restart Apache.

#sudo /etc/init.d/apache2 restart

Modify folder after install X-Cart and change admin folder

Change file permissions

Before you start using X-Cart, need to restore secure permissions as advised below:

    •    chmod 755 var
    •    chmod 644 config.php


Change X-Cart Admin Folder
    •    The x-cart admin folder is commonly known to be /admin making it a target for malicious users. Changing the folder name/location provides an added level of security. The x-cart admin folder can be changed as follows:
    •    Log into your x-cart host using an FTP program. Access the path to your x-cart files and rename the folder "admin" to the name of your choice. We will call this "newadmin."
    •    Now open your top.inc.php file

Find:

define ('DIR_ADMIN', '/admin');


Change to (substitute "newadmin" for the name of your renamed folder):

define ('DIR_ADMIN', '/newadmin');
    •    You will now access your x-cart admin section using the url:
http://www.example.com/newadmin/

Graphic Driver Dell SC440 Windows Server2008R2


Graphic Driver for Dell SC440 Windows Server 2008R2

Download ATI Video controller for Dell SC440 works with Windows Server 2008R2

File name :  R231197.exe  size 18.2 Mb

Download file

SSH to Unix/Linux with another port number

Connect to OpenSSH Server with different port number

#ssh  user@hostname -p9999

SYNOPSIS
ssh [-l login_name ] hostname | user@hostname [command ]

ssh [-afgknqstvxACNTX1246 ] [-b bind_address ] [-c cipher_spec ] [-e escape_char ] [-i identity_file ] [-l login_name ] [-m mac_spec ] [-o option ] [-p port ] [-F configfile ] [-L port host hostport ] [-R port host hostport ] [-D port ] hostname | user@hostname [command ]

Example:

#ssh john@10.1.1.1  -p1234

Add apache2 password to protect files

Go to the folder that you want to add password protect

#htpasswd -c .htpasswd  username

#Enter the password <enter>

#Re-enter the password again <enter>