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 | |
## refernce http://www.dict.org/rfc2229.txt | |
word="$1" | |
if [ -z "$word" ]; then | |
echo "syntax: ./dict <word>" | |
exit 1 | |
fi | |
curl "dict://dict.org/d:$word" |
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/bash | |
# author: terry, ben | |
# tested GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14) | |
# FYR (for Mac OS, may need some change for linux) | |
# second -> ISO8601 | |
date -u -r 1453951368 +%FT%TZ | |
## ouptput: 2016-01-28T03:22:48Z | |
# ISO8601 -> second | |
date -ju -f "%FT%TZ" 2016-01-28T03:22:48Z +%s | |
## output: 1453951368 |
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 | |
install_go_linux() | |
{ | |
sudo add-apt-repository ppa:longsleep/golang-backports | |
sudo apt update | |
sudo apt install -y golang-go | |
ret=$? | |
if [ $ret -eq 0 ]; then | |
go version |
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
t="${0%%`basename $0`}"; cd "$t" ; ABS_PATH=`pwd` | |
echo $ABS_PATH |
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
i=0 ; while [ $i -lt 5 ] ; do iwconfig wlan0 | grep Noise ; sleep 1 ; i=$((i+1)) ; done |
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 | |
IP=$1 | |
if [ "x$IP" = x ]; then | |
echo "syntax: <ServerIP>" | |
exit 1 | |
fi | |
PERIOD=3600 | |
BITS=5M | |
run_batch_iperf() |
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 | |
## if you want to run toplog_per_minute.sh in background | |
## you have to use leading script to put it into backgroud without | |
## issue of "Stopped (tty output)" Error Message of script that | |
## stucked on busybox top command | |
## tested in BusyBox v1.20.2 | |
################################################################## | |
/bin/sh /mnt/nand/toplog_per_minute.sh & |
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
~$ python2.7 str_to_hex_for_echo_cmd.py | |
echo -e "testecho_\x21#\x24%\x2a\x5c'\x5c\x22\x21~?<>\x3a| 89920." | |
~$ python3.5 str_to_hex_for_echo_cmd.py | |
echo -e "testecho_\x21#\x24%\x2a\x5c'\x5c\x22\x21~?<>\x3a| 89920." | |
~$ echo -e "testecho_\x21#\x24%\x2a\x5c'\x5c\x22\x21~?<>\x3a| 89920." | |
testecho_!#$%*\'\"!~?<>:| 89920. |
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
/build$ make -v | |
GNU Make 4.1 | |
Built for x86_64-pc-linux-gnu | |
Copyright (C) 1988-2014 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
/build$ lsb_release -a | |
No LSB modules are available. |
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
current_mk_abspathname := $(abspath $(lastword $(MAKEFILE_LIST))) | |
current_mk_absdir := $(dir $(current_mk_abspathname)) | |
all: | |
@echo "Makefile absolute pathname: $(current_mk_abspathname)" ; \ | |
echo "Makefile absolute path: $(current_mk_absdir)" |
NewerOlder