Check if MySQL User Exists on Command Line (and in Puppet)

If you are using Linux, there is simple way to check if a user exists in MySQL:

echo `mysql -u root -p[your root password] -e ‘use mysql; SELECT user FROM user;’` | grep ‘[user name]

Executing this command will exit with return code 0 if the user exists and otherwise exit with 1.

This is very useful for building puppet scripts. The following execution will create a user if it doesn’t exist.

exec { “add user if not exist”:

unless => “echo `mysql -u root -p[psw] -e ‘use mysql; SELECT user FROM user;’` | grep ‘[username]‘”,
path => [“/bin”, “/usr/bin”],
command => “mysql -u root -p$mysql_password -e \”[Create User/Grant Rights Here]\””,
require => Service[“mysqld”],

Free Cloud CRM for Small Business

I had a brief look around today for Cloud-based (SaaS) CRM solutions which are free and of use for small businesses and startups.

My recommendation as of now would be to go with Podio. It’s free and offers a nice set of features and integrations.

Here is the list of all the solutions I looked at:

1. Insightly

PROS: Good integration with Gmail and other Google Services

CONS: Synchronization with Gmail contacts only available for paid accounts

2. Nimble

PROS: Good integration with various social platforms, especially for monitoring them.

CONS: Ability to synchronize contacts with Gmail only via PieSync (which starts at $5 / mo).

3. Zoho CRM

PROS: Good integration with other Zoho Services such as Email and Calendar.

CONS: No integration with LinkedIn (not that there could be much of it anyway). No Mass Emails for free account.

4. Highrise

PROS: Easy to use, focusses on the management of contacts and everything around them.

CONS: No file storage for free account.

5. Podio

PROS: Very versatile system with many other applications. Nice design.

CONS: Not very strong specific CRM features.

Further solutions I didn’t look into: Clevertim, Capsule, Odoo


Zapier is not exactly a CRM system but it is a great service to link the various CRM systems to other systems such as an email system or various social networks. But watch out, some of the CRM services, such as Zoho CRM are marked as ‘Premium Services’ of which you can only connect a small number without incurring higher fees.

Rendering Beautiful PDF Documents with Calibre

The free software Calibre allows to convert various ebook formats (such as EPUB and MOBI) into PDF documents.

Unfortunately, the default settings of Calibre do not result in the creation of easily readable documents.

Thus, I have provided here some sample settings for a nice looking PDF output for Calibre:

  • First, import the book you would like to convert to Calibre. For this, just drag and drop the file from your file browser onto the Calibre screen.
  • Right click the book and select the option Convert Books / Convert Individually


  • Change the output to PDF on the top right corner of the screen
  • Go the the page ‘Page Setup’ and change all margins to 75 pt.


  •  Go the the Page ‘PDF Output’ and set the following settings:


Now you can start the conversion. Right click the book after the conversion has completed and select ‘Open containing folder’ to access the converted PDF file.


Free PDF Printing for Windows without Adware

Printing from any windows application to a PDF printer is not supported in the most recent Windows versions by default.

Most free applications for this purpose which can be found through a simple Google search unfortunately often come with unwanted Malware or Adware (hello, toolbar!).

However, there is a free and easy solution which comes bundled without any additional software:

Ghostscript + The FreePDF printer

Just download and install Ghostscript from here:

Then, download the FreePDF printer from here:


The website is in German, so I highlighted the download link in the image above.

Next time you print a document, the FreePDF printer should be available as one of the windows printers:


You then can choose whether to save the file or sent it by email (as well as choose the quality):


The FreePDF/GhostScript solution might not look shiny but it certainly does the job done (and leaves your system free of any unwanted guests).

Work in Disguise: Two Strategies to Find Out If You Are Truly Taking a Break

One of the most challenging aspects of knowledge work is one that is often overlooked: much of what we call knowledge ‘work’ is actually quite fun. Think of an entrepreneur, a software developer who likes to write code, think of a manager who likes to see her objects develop in fruitful ways, think of a teacher who likes to teach!

I myself like very many aspects of the tasks that occupy me at present. However, as difficult as it is for me to acknowledge, if I take a good, pure break; a break in which I am not in the least worried about the pursuit of my current professional passions, then, on my return back to work, I feel very positive and productive. In fact, many of my best ideas come to me right after a break or within a break.

However, the question arises what exactly makes up this good, pure break. What does it mean for me to be not working – not working at all? Since there are many other ‘projects’, which I pursue with great pleasure but which effectively could also be characterized as knowledge ‘work’.

To identify which activities are ‘work in disguise’ and therefore do not qualify to be part of a good, pure break, I came up with the following strategies:

Useful Tests

The useful test is relatively easy to apply. For the activity in question, ask yourself whether you would deem it useful in the general scheme of things. Will this help you to advance your career? Will it help you to become a better person? Will it earn you money now or in the future? If you can answer any of these questions with yes or if the activity is useful in any other way, then it does not pass the Useful Test and thus it should be carefully considered to be part of a good and honest ‘pure’ break.

Self Observation

The second strategy is a bit trickier to apply. This strategy entails to reflect upon how you worked AFTER pursuing the activity in question; where ‘after’ does not have to mean in direct succession; it could be the next day or a couple of hours later. The key point is not to look at how you feel during or directly after the activity. Instead, look at how effectively you work when you pick up on your main work again. In particular, focus on how easy the work feels to you: Do you have to drag yourself to get started, or does the work literally pull you in with the warm embrace of optimistic confidence? If the former is the case, the activity in question might not be well-suited for a healthy break.

Is this a strange problem to have: Being in danger to work too much and too often? My observation of the world tells me that not everybody is haunted by this very problem. However, I would expect there is many a founder/student/researcher/programmer/artist out there who is being less productive and happy because of wanting to work too much and, more importantly, because of the inability to relax truly and guilt free. Take some time off and enjoy the fruits of your non-work in form of a clearer mind, a more positive attitude and more creative ideas when you need them.

pdfsam/ PDF Split and Merge: Download without Adware

PDFSAM or PDF Split and Merge is a wonderful tool for working with PDF files (e.g. split one PDF into multiple files, join multiple PDFs into one file or reordering the pages within a PDF file).

Unfortunately, the default installer available from their home page or source forge comes bundled with some ‘free tools’ to improve your browsers search bar. Some adware scanners might thus strongly discourage you to use this otherwise awesome applications.

Thankfully there the developer also provides a download link for an installer without Adware. Just download any of the files from the link below and be sure not to install any unwanted additions:

You also have an option to leave a donation for the developer here.

The Delicate Balance Between Want-To and Have-To

Organizing tasks is no small effort as anyone who has tried surely knows. While a simple list of tasks suffices for a few days (the good, old To Do list), such lists customarily outgrow their format; there’ll simply be too many items and the list once devised to make our life more structured and organized becomes the very evidence that it isn’t.

However, there is a remedy to this situation and that is to devise some form of system according to which our tasks can be organized. Some common dimensions considered in such undertakings are given in the following:

  • Urgency: Can the completion of this task wait or does it have to be done right now?
  • Importance: How important is the result of the completion of the task for us?
  • Risk: How big is the risk associated with doing the task?
  • Resources Required: How much time and other resources are required to fulfil the task?

After we would have categorized tasks according to these dimensions, we could pick the most important, most urgent, or less risky tasks – which can be very useful. However, the more dimensions we consider in the system, the more complex and potentially unmanageable this system becomes. Thus, it is very important to focus on the dimensions which help us achieve our goals in the best possible way.

I assume here that the underlying goal in trying to organize our tasks is twofold: firstly, to get more things done in less time, and, secondly, to be able to live a happier and less stressful life. I want to argue that, in regards to this goal, the single most important dimension to consider is that between ‘want-to’ and ‘have-to’.

Evidently, there is no other sensible reason for us to engage in an activity apart from us having to do it or us wanting to do it. Unfortunately, it is often not obvious into which of these categories a task belongs.

Take for example brushing teeth. You might truly hate brushing your teeth and consider it an utter waste of time. Thus, come morning, evening and after lunchtime (if it were up to your dentist), the task of brushing your teeth easily falls within the ‘have-to’ category. But ask yourself the question WHY do you have to brush your teeth. If you are a child, clearly because your parents tell you to. But what if you aren’t? Maybe you want to feature a fresh mouth odour, maybe you want to avoid a painful procedure at the dentist, or maybe you want to have beautiful, white and shiny teeth.

You can do this exercise with any other chore of your choice. Think about something you have to do long and hard enough and you will surely discover that you only have to do it because of something you want.

Therefore I suggest here as the ultimate measure to become the master of your tasks rather than be mastered by them to identify their ‘want-to’ distance.  For all things on your lists of tasks you dread doing, think about how they are related to what you want to do.

This doesn’t help you to find out which tasks are important and urgent – but chances are you intuitively know what is important and urgent anyway and thus there is little value in writing this down. However, determining the ‘want-to’ distance of your tasks accomplishes something of far more value: it implicitly but inescapably reveals there are no ‘have-to’s in your life.

With this insight, you can do what you need to do with purpose – the strongest force known to make our lives successful and fulfilled.