This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
SSH=/usr/bin/ssh | |
SSH_CONNECT_TIMEOUT=5 | |
for i in $(seq 1 3); do | |
eval "$SSH -o ConnectTimeout=$SSH_CONNECT_TIMEOUT $@" | |
ret=$? | |
if [ $ret -eq 0 -o $ret -eq 127 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
# | |
# inotify-dir.sh start [dir/to/monitor] | |
# stop | |
# | |
_inotify() { | |
local dir="$1" | |
local d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# | |
# ref: https://gist.github.com/braian87b/64440dec125d2b2f0ddc600c490988db | |
# | |
# a new network interface for tun: | |
uci set network.rogervpn=interface | |
uci set network.rogervpn.proto='none' #dhcp #none | |
uci set network.rogervpn.ifname='tun0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
VERSION=2.194 | |
## Use port 8080 to connect, 10.5.1.101 company DNS server | |
docker run -d \ | |
-p 8080:8080 -p 50000:50000 \ | |
--name=jenkins-$VERSION \ | |
--restart always \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# setup-moti-fitness-data-v2.sh [MAC Address] {[Sleep Time]} | |
MAC=${1:-DB:52:25:C6:33:58} | |
ST=${2:-600} | |
echo "Sync time !!!" | |
moti $MAC write 0x001f FD1004894AD15CFE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
MAC=DB:52:25:C6:33:58 | |
echo "Sync time !!!" | |
test-moti-client $MAC write 0x001f FD1004894AD15CFE | |
echo "Finish Data !!!" | |
test-moti-client $MAC write 0x001f FD400101FE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Calls the help messgges of Magic SysRq(Linux). | |
sendbreak | |
send 't' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Run this script under openwrt box | |
# | |
MAX_DL_RATE=1000 | |
MAX_UP_RATE=1000 | |
tc() { | |
local ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
echo "$@" >>/tmp/udhcpc.dump | |
echo "========================" >> /tmp/udhcpc.dump | |
set >> /tmp/udhcpc.dump | |
echo "========================" >> /tmp/udhcpc.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Test-MIB.my | |
Test-MIB DEFINITIONS ::= BEGIN | |
IMPORTS | |
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP | |
FROM SNMPv2-CONF | |
enterprises, Integer32, Unsigned32, OBJECT-TYPE, MODULE-IDENTITY, | |
NOTIFICATION-TYPE | |
FROM SNMPv2-SMI | |
DisplayString |
NewerOlder