Skip to content

Instantly share code, notes, and snippets.

View BionicClick's full-sized avatar

Shaded Pixel LLC BionicClick

View GitHub Profile

How to force your Web Browser to use a set IP to view a website

  1. Locate the HOSTS file on your computer. Typically it is in one of the following locations: *Windows NT/2000/XP/2003/Vista/7 - C:\windows\system32\drivers\etc\hosts *Windows 95/98/Me - C:\windows\hosts

  2. Open this file with a text editor such as Notepad or Wordpad.

  • Right-click on Notepad and select the option to Run as Administrator - otherwise you may not be able to open this file.

https://kb.mediatemple.net/questions/61/How+can+I+test+or+preview+my+website+before+switching+DNS%3F#gs

Fixing File and Folder Permission on suPHP

After installing suPHP on server, execute:

###This command fix all folder permission

  • find /home/*/public_html -type d -exec chmod 755 {} ;

This command fix all file permission

  • find /home//public_html -name '.php' -o -name '.php[345]' -o -name '.phtml'| xargs chmod -v 644

Locating Files:

Thefindcommand is used to locate files on a Unix or Linux system.findwill search any set of directories you specify for files that match the supplied_search criteria_. You can search for files by name, owner, group, type, permissions, date, and other criteria. The search is recursive in that it will search all subdirectories too. The syntax looks like this:

find where-to-look criteria what-to-do

All arguments tofindare optional, and there are defaults for all parts. (This may depend on which version offindis used. Here we discuss the freely available Gnu version offind, which is the version available onYborStudent.) For example,where-to-look_defaults to.(that is, the current working directory),criteria_defaults to none (that is, select all files), and_what-to-do(known as thefind_action) defaults to‑print(that is, display the names of found files to standard output). Technically, the criteria and actions are all known asfind_primaries_.

For example: