Karl Herrick has taken a PIR sensor and hooked it up to his Pi. He’s then used a variety of different software including the Cylon.js framework and Node.js to do the detection and provide a web interface for the sensor. It’s an interesting example of using lots of different technology to bring about a result. You can find his code here. Take a look here for more details.