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
| #!/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
| % 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
| # 名前付きパイプを作る | |
| 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
| $ 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
| 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
| #!/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
| 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 | |
| SOCKDIR=/tmp/.xrdp | |
| SESSIONS=$(cd ${SOCKDIR} ; ls -1 xrdp_* | sed -e 's|[^0-9]||g' | sort -u) | |
| for i in ${SESSIONS} | |
| do | |
| if [ ! -S ${SOCKDIR}/xrdp_display_${i} ] | |
| then | |
| ( |
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
| --- src/Cedar/Server.c.orig 2017-10-12 11:08:12.177671000 +0900 | |
| +++ src/Cedar/Server.c 2017-10-12 11:09:50.287845000 +0900 | |
| @@ -115,12 +115,12 @@ | |
| static SERVER *server = NULL; | |
| static LOCK *server_lock = NULL; | |
| -char *SERVER_CONFIG_FILE_NAME = "@vpn_server.config"; | |
| -char *SERVER_CONFIG_FILE_NAME_IN_CLIENT = "@vpn_gate_svc.config"; | |
| -char *SERVER_CONFIG_FILE_NAME_IN_CLIENT_RELAY = "@vpn_gate_relay.config"; | |
| -char *BRIDGE_CONFIG_FILE_NAME = "@vpn_bridge.config"; |