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.

Continue reading

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.

Continue reading

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.

Continue reading

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!

Continue reading

It is known that “+” sign cab be used to create unlimited virtual gmail addresses using one box! For example you have mailbox  user@gmail.com, all addresses user+ANY_WORD@gmail.com 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 user+spam@gmail.com, which can be filtered later.   For another cool address tweak see sub cat..

Continue reading