Setting Web-Server on MacOSX in easy way

Edit /etc/apache2/httpd.conf
– uncomment line : LoadModule php5_module libexec/apache2/libphp5.so
– change webroot directory in line : DocumentRoot “/Users/stev/Sites”
– create dir /Users/stev/Sites using your local user
– create an index page (index.html,index.php) in your new dir

sample of index.php as below,

<?php
phpinfo();
?>

Start apache : sudo apachectl start
Download mysql-server dmg installer and mount dmg file
Install pkg and prefpane
Start mysql from prefpane

Open terminal and change your MySQL root password :

$ mysql -uroot
mysql> use mysql;
mysql> update user set password=PASSWORD(“NEWPASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit

Hidden keyboard function on MACOSX

  • Command+Shift+3: takes a screenshot of the full screen (or screens if multiple monitors), and save it as a file to the desktop
    Command+Shift+4: brings up a selection box so you can specify an area to take a screenshot of, then save it as a file to the desktop
    Command+Shift+4, then spacebar, then click a window: takes a screenshot of a window only and saves it as a file to the desktop
  • Command+Control+Shift+3: take a screenshot of the entire screen (screens if multiple monitors), and saves it to the clipboard for pasting elsewhere
  • Command+Control+Shift+4, then select an area: takes a screenshot of selection and saves it to the clipboard for pasting elsewhere
  • Command+Control+Shift+4, then space, then click a window: takes a screenshot of a window and saves it to the clipboard for pasting
  • Home: command + ←
  • End: command + →
  • Page Up: command + ↑
  • Page Down: command + ↓
  • Home on terminal: control + a
  • End on terminal: control + e
  • Cut and Paste : command+c and command+option+v
  • Finder total size selected items : select items+command+option+I