Terminal Command:
defaults write com.apple.Xcode NSRecentDocumentsLimit -int 10
Relaunch Xcode. Done.
Terminal Command:
defaults write com.apple.Xcode NSRecentDocumentsLimit -int 10
Relaunch Xcode. Done.
So you install mySql on your mac, and it’s working great, but then you go into terminal to run a mysqldump or something, and it doesn’t work!
you get a message something like:
-bash: mysqldump: command not found
so how do you fix this? well, copy and paste the following into your terminal window and press enter:
echo export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" >> ~/.profile
source ~/.profile
whoa, whoa, you say. what is this doing? It makes it so that when you type any command into the terminal, it does a check of these folders before giving you the “command not found” error.
If you want to undo it, you can always edit your .profile, or just delete it.
If an “unable to connect to database” comes up while installing WordPress on a Snow Leopard machine, try adding :3306 to the end of the DB_HOST in wp-config.php
Assuming everything else works, this should solve your problem!
To enable mod_rewrite manually, see: OS X server tips but if you are using VirtualHostX it changes your default config file. Add the following code to the Directives box:
Options FollowSymLinks
AllowOverride All AuthConfig
Order deny,allow
Deny from all
if you’re using the new version of VirtualHostX, make sure that you select Directory from the dropdown, then use:
Options FollowSymLinks
AllowOverride All AuthConfig
if(eregi(“^mywebsitename.com$”, $_SERVER[HTTP_HOST]))
{
define(‘DB_NAME’, ‘dbremotename’);
/** MySQL database username */
define(‘DB_USER’, ‘dbremoteuser’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘dbremotepassword’);
/** MySQL hostname */
define(‘DB_HOST’, ‘dbremotehost’);
define(‘WP_SITEURL’, ‘http://mywebsitename.com’);
define(‘WP_HOME’, ‘http://mywebsitename.com’);
}
else{
define(‘DB_NAME’, ‘dbremotename’);
/** MySQL database username */
define(‘DB_USER’, ‘dblocaluser’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘dblocalpassword’);
/** MySQL hostname */
define(‘DB_HOST’, ‘dblocalhost’);
define(‘WP_SITEURL’, ‘http://mywebsitename.com’);
define(‘WP_HOME’, ‘http://mywebsitename.com’);
}
Any good web designer knows certain characters have to be encoded in HTML.
Here’s a list of pretty much every character and it’s encoding: http://webdesign.about.com/library/bl_htmlcodes.htm
Bonus: Need to use some encoded characters in your PHP script? Use html_entity_decode() to turn them into regular text.
To enable PHP:
To enable mod_rewrite