Skip to content

Instantly share code, notes, and snippets.

View clacke's full-sized avatar

Claes Wallin (韋嘉誠) clacke

View GitHub Profile
import time
import sys
import os
import ctypes
ES_CONTINUOUS = 0x80000000
ES_AWAYMODE_REQUIRED = 0x00000040
ES_SYSTEM_REQUIRED = 0x00000001
ES_DISPLAY_REQUIRED = 0x00000002
@clacke
clacke / execOnChange.sh
Last active December 15, 2015 23:50 — forked from derekwyatt/execOnChange.sh
Improved quoting and increased the sleep time. With the quoting, you can use any kind of `find` expression without fear that it will be expanded by the shell.
#!/bin/bash
command="$1"
shift
fileSpec=("$@")
sentinel=/tmp/t.$$
touch -t197001010000 $sentinel
while :
do