-
Adjust What the History Command Shows
By default on OS X, the history command (accessed via the terminal) shows the last 500 commands including multiple entries that are the exact same. Just to find an old useful command, you may have to sort through 100’s of ls and cd commands. Wouldn’t it be nice to show only unique commands, and remove the duplicates, or store a larger history? Well you can and it is very simple to set the variables to control what the history command shows on the MAC terminal.
Launch a terminal, by default you should be put into your home directory. To make sure you are in your HOME, just type: Read the rest of this entry » -
Never Download a Codec Again
Windows Media Player is a real pain since it will not play DIVX and XVID out of the box, you can get video but no audio or vice versa. There are so many codecs out there, that you end up installing more than you need in order to play most downloaded content, is it really quite annoying. Enter VLC player.
-
Warning: Cannot modify header information – headers already sent…
When moving a PHP application between servers or hosts, or updating your PHP, you may run into an error similar to something like this:
Warning: Cannot modify header information - headers already sent by (output started at /path/to/site/public_html/config.php:517) in /path/to/application/public_html/somepage.php on line 153
This is often referred to as a PHP whitespace problem, meaning somewhere in the PHP file there is an empty space, usually at the beginning or end of the file.
Read the rest of this entry » -
Using the SCP command
SCP aka secure copy or ssh copy is just about the easiest way to quickly transfer files and folders on X based systems without the need to setup FTP servers and accounts. The scp command we use most often just for single files is:
scp -P port file1 user@server2:~/
This will simply copy file1 to the home directory of the user on server2. Since we use a non standard port, the -P is very important.
Sometimes we want to dump a whole folder with subfolders using scp. This command will scp the folder and subfolders to the home folder of user at server2:
Read the rest of this entry » -
What To Do If Force Quit Fails
So you have an application on your MAC that does not want to shutdown at all. You try to force quit the application just to have it continue to hang on you giving you the lovely little rainbow of death. You want to shutdown but you cannot since the hanging application prevents you from doing so. Before manually forcing your MAC off by holding down the power button for several second, why not try killing the application first via command line.
Read the rest of this entry »