Postfix restart in Mac OS X 10.8 Mountain Lion
Actually it is no so easy to restart Postfix in Mac OS X 10.8 Mountain Lion like in Linux :-)However you can restart Postfix by plist unload / reload: sudo launchctl unload...
Actually it is no so easy to restart Postfix in Mac OS X 10.8 Mountain Lion like in Linux :-)However you can restart Postfix by plist unload / reload: sudo launchctl unload...
After upgrading to 10.8.2 I have got a problem with adding a new entry into hosts file: the update was recognised only after system restart. But a more easy solution was just to flash DNS cache!...
So, the task is to get duplicate records from a MySQL database. The easy way: SELECT COUNT(*), column1, column2 FROM tablename GROUP BY column1, column2 HAVING COUNT(*)>1; More complex case: shows...
There is an error while sending mail in Mac OS X Mountain Lion 10.8: send-mail: fatal: chdir /Library/Server/Mail/Data/spool: No such file or directory To fix just run in terminal: sudo mkdir -p...
Another (and more easy) way to change text in multiple files is to use grep: grep -lr -e 'oldtext' * | xargs sed -i 's/oldtext/newtext/g' or to use PERL: perl -p -i -e ’s/oldtext/newtext/g’ *
Just after I posted this article the second more easy solution has been found. Here it is:Find (search) and replace text from command line in multiple files (Linux) #2When you are working on the...
After file downloading a ZIP file with Safari this file is unzipped automatically. The original ZIP file appears to be deleted. Not so good! To fix this behaviour just go to...
In case of date format checking in PHP just use this function: function checkDateFormat($date) { //match the format of the date if (preg_match ("/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/", $date, $parts))...
Error on attempt to connect locally to MySQL server DB with PHP on MacOS X Lion 10.7: No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) Solution 1: instead of localhost...
In case of MySQL error 2006 (HY000) at line: ### MySQL server has gone away which may occur while restoring a big DB dump just add (or increase, if exists) max_allowed_packet parameter of MySQL...