Skip to content

Instantly share code, notes, and snippets.

@zhangxc
zhangxc / no_failsafe.diff
Created April 27, 2011 15:20
disable failesafe mode in openwrt
- FAILSAFE=
- pi_failsafe_net_message=true
- preinit_net_echo "Please press button now to enter failsafe"
- pi_failsafe_net_message=false
- fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE
+ FAILSAFE=false
+ #pi_failsafe_net_message=true
+ #preinit_net_echo "Please press button now to enter failsafe"
+ #pi_failsafe_net_message=false
+ #fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE
@zhangxc
zhangxc / cmpdir.sh
Created April 27, 2011 15:12
compare two directories, put the same files into text1, others into text2
#!/bin/sh
# compare two directories, put the same files into text1, others into text2
if test -z "$1" || test -z "$2" || ! test -d "$1" || ! test -d "$2"; then
echo "cmpdir takes two existed directories as parameters!"
exit 1
fi
ls -1 $1 > /tmp/dir1
@zhangxc
zhangxc / this.c
Created March 18, 2011 02:27
syntax highlighter test
int main(void)
{
printf("What the hell is this?!\n");
}