If you have installed MySQL on your Mac and forgot your root password, these instructions are for you.
Installing PHP is more than just installing the PHP source code on the system. Several libraries are also required to connect to databases, connect to GD, support XML, get LDAP access and so on. All these have to be installed manually on the machine. You can go through the painful process of manual installation and configuration or simply download and install a ready-made package from entropy.ch.
Unless you have very specific needs, you should use this package.
sudo shutdown -h now
sudo shutdown -r now
The Mac OS keyboard does not have a print screen button. So this is how to capture your screen on Mac:
- Hold down Apple key ? + Shift + 3 and release all
The screen shot would appear on your desktop.
You can also do a screen capture for a portion of your screen.
- Hold down Apple key ? + Shift + 4 and release all key
- Mouse cursor would change to +
- Select the region you wish to capture
It is now common for users to work with multiple monitors. Laptop users, especially, prefer to work on their laptop screen and an external monitor when at they at work or at home. If you are using netflix or some other service to download movies, you would prefer to watch it on large screen rather than your laptop screen, so you would want to connect your computer to a TV or projector.
It is very easy to connect Mac OS computers to external monitors.
By default, Mac scroll bars show only after keyboard or trackpad movements. This can be very annoying because often the scroll bar disappears before you can get to it. The solution is to make Mac show the scroll bars by default.
- Go to Apple icon
- Click on System Preferences
- Click on General Preferences
- For "show scroll bars", choose always
You no longer have to be frustrated by missing scroll bars.
Homebrew is a package manager for Mac OS.
- Download and install Xcode from Mac store if you don't already have it installed
In a terminal, type the following code
Run the following command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew search Search for an application:
Mac terminal shows the wrong hostname on prompt.
Find out if a hostname is already specified.
$ sudo scutil --get HostName HostName: not set
To set your Hostname
$ sudo scutil --set HostName 'myname'
Exit out of your terminal and start a new terminal. You should see your chosen hostname.
A version control system keeps track of changes in code. It keeps track of every change made by every developer. It allows code bases to be branched and then merged back. You can also go back in time to a point before you introduced something in the code. Version control is absolutely essential for software development.
Following is a list windows commands and their mac equivalents: