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.
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.
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.
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!
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 page.jpg
- 300 is DPI, more better quality
-  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
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.
It is known that “+” sign cab be used to create unlimited virtual gmail addresses using one box! For example you have mailbox firstname.lastname@example.org, 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 email@example.com, which can be filtered later. For another cool address tweak see sub cat..