// An object oriented approach to animate google maps markers

Goal

Obtain a good animation of markers, with 8 bit transparency channel, in google maps, and self-remove them at the end of the “movie”.

Approaching the problem

Google Maps API don't have a way to build animations with 8 bit transparency images as frames.

To achieve this purpose we use javascript, enriching the Marker object with our attribute mop_ct to save the index of the current animation frame.

At the end we remove the Marker itself from the page.

// Retrieves the current reading position in a file of any process on linux

Rarely I cross-post messages but for me this information was like a revelation so … have patience.

Question

How to get the current reading position in a file of a process on your machine ?

This information can be useful in an avalanche of circumstances

  • you are importing 10G dump.sql into your new database
  • a friend is downloading your last recorded song (copyright free, obviously ;-) ) from your home web-server and you want to know how many bytes you must still send to him before you can turn off the laptop
  • how long you must wait before a grep command finishes its work

Right Answer

Use cat /proc/<process pid>/fdinfo/<file_handle>

Example

For a demonstration keep this micro-program readdy.c and compile it:

// Use dokuwiki graphviz plugin to describe a network

Graphviz plugin allows embedding of .dot graphs into dokuwiki pages, put a graph description inside the tag <graphviz> is enough to accomplish this task, for more info about graphviz and the plugin installation see references below.

Goal

Use .dot file to describe graphically a not so unusual network scenario with InterNET, DMZ and LAN.

// A simple way to improve dokuwiki with "hide/show" feature

Goal

Sometimes is usefull to hide not critical parts of a document with the possibility to show them when you want (examples, diagrams, etc.) like this:

show/hide

this wiki content is hideable

// Blog's reasons

Using dokuwiki at work I found that it has a very good trade-off between time spent and results quality; after a short training you can produce clear drafts to be shared with other people until the topic of the document is stable enough to be converted to a more “definitive” documentation format.

Finding useful an html snippet to hide part of a wiki document I had searched a blog engine that allow me to simply explain it, maybe with a syntax that I just known … the blogtng plugin of dokuwiki was a good solution.

So this is a wiki build with dokuwiki to speak about dokuwiki itself, recursively tasty! :-D .

If you like this wiki approach to blogging you can found a step by step howto on the Andreas Haerter blog.

I will use it to share technical and not technical informations that can have some value for other persons.

Enjoy, Matteo.

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported