This file contains hidden or 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
| tcp = rt.socket.tcp() | |
| tcp:setoption("reuseaddr", true) | |
| res, err = tcp:bind("0.0.0.0", 3800) | |
| if not res and err then | |
| print(err) | |
| os.exit(1) | |
| end | |
| res, err = tcp:listen() |
This file contains hidden or 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 | |
| set -e | |
| PROWL_APIKEY= | |
| for IFACE in $@ | |
| do | |
| curl -s \ | |
| --retry 20 --retry-delay 3 \ | |
| https://api.prowlapp.com/publicapi/verify?apikey=${PROWL_APIKEY} > /dev/null |
This file contains hidden or 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
| sudo modprobe ftdi-sio | |
| echo "ftdi-sio" > /etc/modules-load.d/ftdi-sio.conf | |
| sudo sh -c 'echo "0411 00b3" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id' | |
| apt install libdevice-serialport-perl |
This file contains hidden or 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
| $ su - | |
| # pkg install sudo portmaster | |
| # echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /usr/local/etc/sudoers.d/wheel | |
| $ sudo portsnap auto | |
| $ sudo chsh -s /usr/local/bin/zsh ec2-user |
This file contains hidden or 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
| # 名前付きパイプを作る | |
| mkfifo burning_stderr | |
| # grep を待機させておく | |
| grep PATTERN < burning_stderr | |
| # 別ターミナルで標準エラー出力を名前付きパイプに突っ込む | |
| foobar 2>burning_stderr |
This file contains hidden or 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
| % drill marugame-seimen.com any | |
| ;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 47276 | |
| ;; flags: qr rd ra ; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;; marugame-seimen.com. IN TYPE255 | |
| ;; ANSWER SECTION: | |
| ;; AUTHORITY SECTION: | |
| com. 895 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 1474355876 1800 900 604800 86400 |
This file contains hidden or 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
| #!/usr/local/bin/bash | |
| function deploy_challenge { | |
| local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}" | |
| cli53 rrcreate --wait --replace ${DOMAIN#*.} "_acme-challenge.${DOMAIN%%.*} 10 TXT ${TOKEN_VALUE}" | |
| } | |
| function clean_challenge { | |
| local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}" | |
| cli53 rrdelete ${DOMAIN#*.} _acme-challenge.${DOMAIN%%.*} TXT |
This file contains hidden or 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 | |
| # | |
| # The MIT License (MIT) https://opensource.org/licenses/MIT | |
| # Copyright (c) 2016 Koichiro IWAO <meta@vmeta.jp> | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 interface" 1>&2 | |
| exit 1 | |
| fi |
This file contains hidden or 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
| # check if the system is using systemd or not | |
| [ "$(pgrep -o systemd)" = "1" ] && \ | |
| USING_SYSTEMD=false || \ | |
| USING_SYSTEMD=true | |
| if $USING_SYSTEMD | |
| then | |
| # systemd だったときに実行するコマンド | |
| else | |
| # systemd じゃなかったときに実行するコマンド |
This file contains hidden or 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
| (traceroute -Ia は省略) | |
| From: [AS2497] fukuoka03-z01.flets.2iij.net (210.148.39.54) | |
| $ ping 8.8.8.8 | |
| PING 8.8.8.8 (8.8.8.8): 56 data bytes | |
| 64 bytes from 8.8.8.8: icmp_seq=0 ttl=55 time=18.221 ms | |
| 64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=18.270 ms | |
| $ ping speedtest.dmmlabs.jp # tokyo | |
| PING speedtest.dmmlabs.jp (202.6.247.208): 56 data bytes |