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
// ズンドコキヨシ with Golang (未完成) | |
// http://qiita.com/shunsugai@github/items/971a15461de29563bf90 | |
// FIXME: goroutine の実行が偏りすぎるのでスケジューラー的なにかが必要? | |
// FIXME: バグってら。「ドコ」を待っているときに「ズン」が来るとそいつが捨てられる…。 | |
package main | |
import ( | |
"fmt" |
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 | |
## | |
## socat over serial: getty | |
## Copyright (c) 2016 SATOH Fumiyasu @ OSS Technology Corp., Japan | |
## | |
## License: GNU General Public License version 3 | |
## | |
set -u |
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 | |
## | |
## Create a CISCO AnyConnect VPN Client *.deb from anyconnect-predeploy-linux-*.tar | |
## Copyright (c) SATOH Fumiyasu @ OSS Technology Corp., Japan | |
## | |
## License: GNU General Public License version 3 | |
## | |
set -u | |
set -e |
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 | |
curl -s http://wttr.in \ | |
|sed \ | |
-e '/^$/d' \ | |
-e '37,$d' \ | |
-e '/[┼┌└]/d' \ | |
-e 's/[―–]/-/g' \ | |
-e "s/[‘’]/'/g" \ | |
-e 's/\(°[^ ]*\) /\1/g' \ |
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 | |
## or | |
#!/bin/zsh | |
## | |
## https://twitter.com/_hito_/status/593946874442186752 | |
## | |
set - "${@//\\/\\\\}" | |
set - "${@//\$/\\\$}" | |
set - "${@//\`/\\\`}" |
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 | |
# or | |
#!/bin/zsh | |
## | |
## Example: | |
## $ ( | |
## echo -n "termcapinfo $TERM is=" | |
## tput is2 \ | |
## |tput2escstr \ | |
## |perl -pe 's/\\E\[\?\d+(?:;\d+)*l/$_=$&;s#(\D)3(\D)#\1\2#;s#;;#;#;$_/e' \ |
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
LIBO= libreoffice --headless -env:UserInstallation="file://$$PWD/tmp" | |
ODF2PDF= $(LIBO) --convert-to pdf | |
ODF2DOC= $(LIBO) --convert-to doc | |
ODF2XLS= $(LIBO) --convert-to xls | |
ODF2PPT= $(LIBO) --convert-to ppt | |
ODTS= $(wildcard *.odt) | |
ODSS= $(wildcard *.ods) | |
ODPS= $(wildcard *.odp) |
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
start on runlevel [2345] | |
task | |
script | |
while :; do ip route |grep -q '^default via ' && break; sleep 1; done | |
initctl emit net-device-up | |
end script |
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
## See https://github.com/fumiyas/openssl-hack/blob/master/bin/openssl-selfcert.bash |
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/dash | |
set -u | |
ln_s_relative() { | |
local root="" | |
if [ $# -eq 3 ]; then | |
local root="$1"; shift | |
fi | |
local target="$1"; shift |