Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
DST=${1:-$PWD}
rm -f /tmp/result.txt
for i in $(find $DST -name "*"); do
file $i >/dev/null 2>&1
if [ $? -eq 0 ]; then
#!/bin/sh
#
# ./coding-style.sh [File or Directory]
#
options="--style=kr
--mode=c
--indent=tab=4
--brackets=linux
--indent-labels
#!/bin/sh
#
# ./test-config-foreach.sh
# SSID wificity_f16e82_2G UP !!!
# SSID wificity_f16e82_guest DISABLED !!!
# SSID wificity_f16e82_5G UP !!!
# SSID wificity_f16e82_2G_1 UP !!!
# SSID wificity_f16e82_5G_1 UP !!!
# SSID wificity_f16e82_2G_2 UP !!!
# SSID wificity_f16e82_5G_2 UP !!!
#!/bin/sh
#
# ./test-network.sh [[sequence number]]
#
LOG_FILE=/tmp/network.log
CLIENT_IP="192.168.100.1"
# $1: sequence number of testing
test_network() {
#!/bin/sh
#
# ./test-wireless.sh [number of run]
#
SSID1=
SSID2=
LOG_FILE=/tmp/wireless.log
. /lib/functions.sh
#!/bin/sh
#
. /lib/functions.sh
LOG_FILE=/tmp/vlan.log
START_VLAN_NUM=$1
END_VLAN_NUM=$2
#!/bin/sh
#
# ./log-http-packet-flow.sh [Source IP Address] [[Delete]]
#
SRCIP=$1
ACT=$2
IPT=`which iptables`
EBT=`which ebtables`
#!/bin/sh
#
# ./log-icmp-packet-flow.sh [Source IP Address] [[Delete]]
#
SRCIP=$1
ACT=$2
IPT=`which iptables`
EBT=`which ebtables`
#!/bin/sh
#
REPOS=$1
REV=$2
UUID=`sudo svnlook uuid $REPOS`
CI_SERVER=10.5.88.190
CI_PORT=6060
@dan82840
dan82840 / test-pexecute.c
Last active August 29, 2015 14:21
Execute command in the pthread
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>