Skip to content

Instantly share code, notes, and snippets.

@tumf
tumf / movein
Last active April 13, 2021 08:33
#!/bin/sh
commands='scp grep rsync diff mktemp'
for c in $commands; do
hash $c || { echo "install $c"; exit 255; }
done
if [ -z "$1" ]; then
echo "Usage: $(basename $0) hostname [go|diff]"
exit
[Interface]
PrivateKey = {FireStickTV側の秘密鍵}
Address = 192.168.1.10/24 # 接続先でのIPアドレス/ネットマスク
DNS = 1.1.1.1
[Peer]
PublicKey = {WireGuardVPNサーバ側の公開鍵}
AllowedIPs = ::/0, 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 1.1.1.1/32
Endpoint = {WireGuardVPNサーバIPアドレス}:{公開ポート}
@tumf
tumf / crontabs
Last active November 30, 2019 02:35
GL-AR750S Wireguard check&reconnection `crontab -e`
* * * * * ping -c 5 1.1.1.1 2>&1 >/dev/null|| /etc/init.d/wireguard downup
@tumf
tumf / bx-testnet.cfg
Created October 18, 2017 06:58
bx configuration for testnet
[wallet]
# The wallet import format (WIF) key version, defaults to 128 (use 239 for testnet).
wif_version = 239
# The hierarchical deterministic (HD) public key version, defaults to 76067358 (use 70617039 for testnet).
hd_public_version = 70617039
# The hierarchical deterministic (HD) private key version, defaults to 76066276 (use 70615956 for testnet).
hd_secret_version = 70615956
# The pay-to-public-key-hash address version, defaults to 0 (use 111 for testnet).
pay_to_public_key_hash_version = 111
# The pay-to-script-hash address version, defaults to 5 (use 196 for testnet).
# ~/.screenrc
# C-t r # resize mode
# C-t C-t
# C-t x 2 split
# C-t x o windowの移動
# basics
escape ^t^z
#zombie ^[
defscrollback 1000
@tumf
tumf / ansible-add-role.sh
Created September 18, 2014 01:03
create template for new ansible role.
#!/bin/bash
role_name=$1
main_yml_dirs="tasks handlers vars meta defaults"
dirs="${main_yml_dirs} templates files"
if [ -z $role_name ] ; then
echo "Usage: $0 role_name"
exit 1
fi
@tumf
tumf / file0.txt
Created June 2, 2014 10:09
複数のdaemontoolsサービスのログをまとめて見る ref: http://qiita.com/tumf/items/81d8d490e8c04651186d
gem install multilog-collector
@tumf
tumf / install-daemontools.sh
Last active August 29, 2015 14:00
install daemntools for CentOS6.5
yum install gcc patch
mkdir -p /package
chmod 1755 /package
cd /package
wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
tar xzvf daemontools-0.76.tar.gz
cd admin/daemontools-0.76
wget http://qmail.org/moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
patch -s -p1 <./daemontools-0.76.errno.patch
./package/install
@tumf
tumf / .bash_profile
Last active August 29, 2015 13:58
GNU screen attach
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific aliases and functions
if [ ! "$WINDOW" ]; then
screen -U -D -RR
fi
@tumf
tumf / .screenrc
Created April 6, 2014 16:57
GNU screen setting file
# ~/.screenrc
# C-t r # resize mode
# C-t C-t
# C-t x 2 split
# C-t x o windowã®ç§»å
# basics
escape ^t^z
#zombie ^[
defscrollback 1000