How to use python sched in a daemon process

Let’s assume we want to download a file (or to do some tasks) to every 5 seconds, but the condition is to not do the same task twice or more times at the same moment, even if takes more than 5 seconds. For example, we have a to download a file and this will take 8 seconds. Also, if takes more than 5 seconds, it should not wait until the next iteration, to start again (3 seconds more), but will start the download immediately.

So, the traditional cronjob/lock file combination was not suitable for my case.

Continue reading How to use python sched in a daemon process

Crashing Google Chrome on Google website

Used version of Google Chrome Version 31.0.1650.63

OS Version: Ubuntu 12.04.3 LTS, Linux work 3.2.0-57-generic #87-Ubuntu SMP Tue Nov 12 21:35:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Go on Google Trends website http://www.google.com/trends/topcharts?zg=full

Click View #my2013 Gallery

Click any picture

Click the browser’s back button

Click again the browser’s back button

Crashed… or it will take between 20 seconds and 1-2 minutes to refresh that page.

Making a super fast blog with Drupal 7

Yesterday I decided to try to make my blog to load under 200 ms from my laptop using Drupal 7without loose my old links to blog posts, from SEO reasons. I know, some people would say there are better solutions for a blog others than Drupal, but… I wanted to give a try to Drupal because it has one of the biggest community, a lot of modules and features and of course for fun.

Continue reading Making a super fast blog with Drupal 7