Change tooltip position on Google Charts

It does not support changing tooltip position by any methods.  In case of HTML tooltips, they appear not in desired position.  Next method works, it is based on my findings and own experience.

How I lost and recovered my photo collection in Africa trip

After some very successful photo sessions in Africa, my collection counted like 2000 photos. I was quite happy since most of them were good to show to my friends.

Once in the evening I open my Picture folder in Ubuntu and found that it is empty. Completely empty, nothing was there. I was totally destroyed, shocked.

But I stayed optimistic, since nothing is lost without tracks, even in some cases it is very hard to destroy piece of information.

How to connect to rare databases in PHP (informix, oracle, db2)

Recently I took part in integration project and faced interesting problem. PHP application that I deploy must communicate with Informix database for data selecte. This php application aims to corporate market, so its not a extraordinary case. I see that it may require connecto to Oracle or DB2 in near future.

Yes, PHP itself has wide choose of database connectors, which is a good option to have native database support. The only problem is that most of them are used so rare that are usualy not compiled in all modern Linux destributos. For example in Ubuntu server 12.04 there are five most pupular php5-sybase php5-interbase php5-mssql php5-mysql php5-pgsql.

Thinking of it, I found one interesting solution.

Why wordpress cron fails and how to fix

WordPress has its own cron job implementation that allows you to schedule your posts and events. It was done in a way to be simple and it works in most cases.

WP-Cron is not a real cron job, it only works when a page is loaded. When a page is requested, it will then check the database to see if there is anything scheduled and after displays to your reader.

However, in some situations, the WP-Cron does not work well and this leads to posts that missed publication schedule and events not executed.  May be you have seen the “Missed Schedule” status.

Move wordpress site to new domain issue

Wordpress has a interesting oddity, it stores site path with domain name in its settings in database. If you are moving your WP site, you have to change that setting before! I do not judge is it a good or bad decision, but it works this way.

If you forget to change Siteurl, WP installation won't work on new location. Here is how to fix it!

Convert PDF page to JPEG image using ImageMagick

ImageMagic library not without reason is called magic, it can handle image operations like scale,resize,rotate,filter,clip and 1000+ others.

# PDF -> JPEG

Here is simple CLI command to extract one page from PDF file and save it as JPEG image

convert -density 300 doc.pdf[160] page.jpg

Where

  • 300 is DPI, more better quality
  • [160] is page number, starting from zero. Can be list [0,1,2] or range [1-10]
  • page.jpg is output file, image type is based on extension
Easy!

Change Mysql root password - The Right Way

Sometime MySQL root password is lost, because of last admin did not leave you any notes on the server or you are given your client server to fix some database or script related errors where MySQL root password is required.

I always knew one way of resetting it, but recently came up with another which is The Right Way.

@Gmail address tweak

It is known that "+" sign cab be used to create unlimited virtual gmail addresses using one box! For example you have mailbox  [email protected], all addresses [email protected] are valid and will be delivered into your mail box. Good usage for this is leave not your direct email on site signups but something like [email protected], which can be filtered later.   For another cool address tweak see sub cat..