Motion sensor with TTL output

датчик движения

I bought a couple of IR motion sensors from Sunsky and going to tell you how to handle them and how to make motion-activated LED lamp.

Читать дальше Continue reading

Cookie Time To Live in PHPMyAdmin

If PHPMyAdmin logouts you too early — you have to increase cookie’s TTL by adding

at the end of config.inc.php

Zend Studio/Eclipse: error 'Workspace is currently in use'

If Zend Studio or Eclipse tells ‘Workspace is currently in use by another Eclipse’ at startup and proposes to select another workspace — just remove .lock file in your workspace and it will be fine.

Wake on LAN and Nvidia MCP51 network problem

forcedeth driver for nvidia network interfaces has a bug: WoL does not work. Problem is in reversing MAC-address. So, if machine’s MAC is 00:24:21:dd:1f:90 then use following command to wake it:

Don’t forget to enable WoL in BIOS and add

to /etc/rc.local

imagemagick and animated gif

Once i needed to have a crop and resize image functionality in a project. I was to deal with animated GIFs too. Discovered a issue with imagemagick: you can’t just say

and get cropped image area.

Читать дальше Continue reading

ubuntu + nvidia

If you can’t install nvidia driver in ubuntu (nvidia-glx-180 get installed but does not activates in the ‘Hardware drivers’, and X tells ‘Failed to load the NVIDIA kernel module’ after reboot) — you have to install ‘linux-headers’ package corresponding to your kernel version. E.g. if your newest installed kernel is  linux-image-2.6.28-15-generic then you need linux-headers-2.6.28-15-generic
Deal is ‘linux-headers’ must be a dependance of ‘nvidia-glx’ but is not somehow.

Uplink load balancing + channel checking

I have set up balancing of two internet uplinks, as read in LARTC. It works great, but in case of channel failure all connections that belong to that channel becomes dropped and does not restore because of route caching. To solve this problem, i have written a script that does testing of channels by pinging.

Читать дальше Continue reading