USBKill is a kill-switch that waits for a change on your USB ports (such as removing the usb) and then immediately shuts down your computer and is available on GitHub. USBKill should be paired with full disk encryption for maximum effectiveness.
The author’s tip: you may use a cord to attach a USB key to your wrist, then insert the usb key into your computer and start USBKill. If someone steals your computer, the USB will be pulled out and the computer shuts down immediately.