Log navigator a.k.a. lnav

Getting to love lnav. Just specify a directory path as argument and it will parse the logs.

lnav /var/log/mysql

A list of supported log formats is at http://lnav.readthedocs.io/en/latest/formats.html

Advertisements

How to find flow

​we can all develop our willpower and self-control by focusing on 3 steps.

1. Find your standards. Your standards are the reference points you’ll use to determine whether any action you’re going to take is desireable towards getting into a state of flow—so, whether you’re going to check your email (again) or hit your 1000 word count for the day.

2. Set up means for monitoring. Flow depends on immediate feedback and so does self control. Whatever your task, find ways to constantly monitor your performance and adjust as you continue.

3. Be wary of your energy. Our mental strength waxes and wanes throughout the day (which is why it’s so important to define your own work schedule around your energy). Understanding when you have more energy will help you stay in control and give you a better chance of entering a state of flow.

From https://zapier.com/blog/how-to-find-flow/

Docker Cannot create container for service db: devmapper: Error mounting

Just wanted to start working and got the following error from Docker:

Cannot create container for service db: devmapper: Error mounting ...

Gladly I remembered that I updated the Linux kernel in the morning so after computer restart I had no issue 🙂

Hack into your flow

“The average business person spends less than 5% of their day in flow. If you could increase that to 15%, overall workplace productivity would double,”

“The brain can’t tell the difference between physical consequences and emotional risk,” says Kotler. “Taking social risks is the same as physical risks.”

“In Silicon Valley, the idea is to fail fast or fail forward,” he says. “If you’re not giving employees space to fail, you’re not giving them space to risk. Move fast and break things. Engage in rapid experimentation. High consequences will drive flow and you get further faster.”

From https://www.fastcompany.com/3031052/how-to-hack-into-your-flow-state-and-quintuple-your-productivity

How to create .pot file from source code

I just learned how to create a .pot from https://wordpress.stackexchange.com/a/169282/33599

Checkout WordPress development branch via SVN which has a script for creating .pot file.

cd /tmp
svn co http://develop.svn.wordpress.org/trunk wordpress-svn
php wordpress-svn/tools/i18n/makepot.php wp-plugin PATH_TO_PLUGIN PATH_TO_PLUGIN/language/PLUGIN_NAME.pot

makepot.php help

Usage: php makepot.php PROJECT DIRECTORY [OUTPUT]

Generate POT file from the files in DIRECTORY [OUTPUT]
Available projects: generic, wp-frontend, wp-admin, wp-network-admin, wp-tz, wp-plugin, wp-theme, glotpress, rosetta, wporg-bb-forums, wporg-themes, wporg-plugins, wporg-forums, wordcamporg