Wednesday, 13 February 2013

[Python] Monitor directory in linux

Description
I was looking for  something that could tell me when a file has been modified into a specific directory, I found that with Python and Linux, you can use the system call FCNTL.

Solution
The system call FCNTL helps you to monitor a directory and call a personalized function when it is happening.
Below you can find an example that I found on Stack Overflow.


Tuesday, 12 February 2013

[JS] Prevent selection when drag

Description
I had a case where I was dragging an object in my canvas and when the mouse was going outside of it, the whole website was selected by my cursor.

Solution
I found this fix that resolve my problem: