Window manager for Mac

I was looking for a kinda tiling window manager and a colleague recommended me Magnet with which I’m satisfied. Simple and useful app. It’s worth its price.

magnet window manager for mac


New path for MySQL query log on OSX

Sometimes during development I need to see what SQL queries are executed and listing them in is maybe the most convenient solution on OSX.

To see queries in Console

mysqld query log OSX

I just created /etc/mysql/my.cnf with:

general_log = 1
# general_log_file = /usr/local/mysql/data/mysqld.query.log
general_log_file = /var/log/mysql/mysqld.query.log

slow_query_log = 1
long_query_time = 1 # second
# slow_query_log_file = /usr/local/mysql/data/mysqld.slow.log
slow_query_log_file = /var/log/mysql/mysqld.slow.log
log_queries_not_using_indexes = 0

MySQL server needs own permissions on the parent log dir so:

sudo mkdir /var/log/mysql
sudo chown -R _mysql:_mysql /var/log/mysql

Last step is server restart.

sudo launchctl unload -F /Library/LaunchDaemons/
sudo launchctl load -F /Library/LaunchDaemons/

On a Linux machine I use multitail as an alternative.

Getting ‘doesn’t have a default value’ from MySQL (MariaDB)?

Solution for me from ideas at and–xxx–doesn-t-have-a-default-value-5-2720.html was to remove ‘STRICT_TRANS_TABLES’ from my.cnf.

So I ended up with the following in /usr/local/mysql/my.cnf:

Switched from to multitail

With I had the problem that when I switched to output /var/log/apache2/error_log I didn’t see
/var/log/system.log and yesterday I read and found multitail so I played with it.

I’m currently running the following setup on OSX Mountain Lion

mike@mikembp:~$ cat bin/

multitail -s 2 /tmp/lsof-net.log \
/var/log/apache2/error_log \
/var/log/system.log -I /var/log/wifi.log -I /var/log/mail.log \

I had to make a crontab to get /tmp/lsof-net.log file, because multitail -R 2 -l “lsof lsof -RPi4 +c15” was crashing with “Operation not permitted”. I think the problem is that lsofon Mac is in /usr/sbin. Crons minimal execution is every minute so I had to call the desired command 29 times with 2 second sleep.

mike@mikembp:~$ cat bin/

# crontab -e
# * * * * * /Users/mike/bin/


for (( i=1; i <= 29; i++ ))
/usr/sbin/lsof -RPi4 +c15 | grep -v -e rtorrent -e Mail -e Last | awk '{print $1,$2,$3,$4,$9,$10}' | column -t >> $LOGFILE
sleep 2

mike@mikembp:~$ cat .crontab
# ~/.crontab
# Run:
# crontab ~/.crontab

* * * * * ~/bin/

mike@mikembp:~$ crontab .crontab