MySQL database dump without system tables

candidates=$(echo "show databases" | mysql -u root | grep -Ev "^(Database|mysql|performance_schema|sys|information_schema)$")
mysqldump -u root --databases $candidates > full-backup-without-system-tables-$(date +%F).sql
Share

Slow Assets Fix

To improve compile Sometimes you just need to cleanup the assets cache

rake assets:clobber
rake assets:precompile
Share

Bundle Hangs on bundle update

I finally found a reason why sometimes my ‘bundle update’ hangs infinitely.. It keeps showing dots… and takes forever..

bundle audit
Resolving dependencies...........   *sigh* ...

I have some gems that are available only for authorized users.
When the ssh keychain is still locked (haven’t entered a password for my ssh-key yet) Bundler keeps running infinitely without showing any password entry…

Share

FreeBSD Set Timezone and Time to chmos clock

The following commands can be used to change time zone.
When the file /etc/wall_chmos_clock exists, it wil interpret the chmod time as local time.
Else it interprets the systemtime as UTC time

cp /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
touch '/etc/wall_cmos_clock'
adjkerntz -i
Share