Skip to content

Reload Flask app when template file changes under Linux

I am developing a flask application under Linux, and i’m suffering when i make any changes to template files. Actually i well configured my app to reload on template changes using PS: when i develop under Windows templates are reloading normally. EDIT I am using the built in server, and i run my app lik…

Hook and block globally mouse in X11

I need to hook globally mouse clicks and block last click if delay between two clicks is less than was set. I wrote it for windows using WM_MOUSE_LL hook. I was unable to find any solution for me. Is it even possible to globally block mouse click in X11 ? Windows full code Answer As far as I know the

Why cat 0>file doesn’t work

In Unix, I know that 0 1 and 2 represent stdin stdout and stderr. As my understanding, the command cat meaning “concatenate” can concatenate different files. For example, cat file>&1 can concatenate the file and the stdout and the arrow means the redirection from the fileto the stdout, so w…

Executing Bash commands using C code

I’m trying to use file.cpp to execute some simple bash commands. Code works for commands like ls, gedit, echo but fails at cd command. Here is my file.cpp: I execute it after compiling using ./file and my terminal output is, Current directory didn’t change to /etc. I have tried changing cd /etc to…

Linux enable pca9685 in sysfs

I would like to enable a PCA9685 as a PWM in /sys/class/pwm/. The Platform is a Raspberry Pi 2 and the chip is connected to /dev/i2c-1. I find the chip with i2c-detect, but i don’t know how do I enable this driver: http://lxr.free-electrons.com/source/drivers/pwm/pwm-pca9685.c. I also found this but it …