Skip to content

Instantly share code, notes, and snippets.

View lorentzca's full-sized avatar
🏕️
In the Woods.

Kohta Kunishima lorentzca

🏕️
In the Woods.
View GitHub Profile
@lorentzca
lorentzca / keybase.md
Created August 17, 2016 01:53
Keybase proof

Keybase proof

I hereby claim:

  • I am lorentzca on github.
  • I am lorentzca (https://keybase.io/lorentzca) on keybase.
  • I have a public key ASD3TgppFzs5SyzJCQXrnu_MhWdO3Xhgy3VAqy0RMs378Qo

To claim this, I am signing this object:

@lorentzca
lorentzca / Dockerfile
Created February 9, 2016 16:39
run vault server
FROM lorentzca/vault_on_centos7
COPY ./config.hcl /root/config.hcl
@lorentzca
lorentzca / Dockerfile_centos7
Last active February 9, 2016 00:53
vault on docker
FROM centos:7
RUN \
yum install -y wget unzip && \
cd /usr/local/bin && \
wget https://releases.hashicorp.com/vault/0.4.1/vault_0.4.1_linux_amd64.zip && \
unzip vault_0.4.1_linux_amd64.zip && \
rm vault_0.4.1_linux_amd64.zip
@lorentzca
lorentzca / install_mha4mysql-manager.sh
Last active February 2, 2016 02:39
install mha4mysq (centos5)
#!/bin/sh
# install depend packages
sudo yum install -y epel-release wget
sudo yum install -y perl-DBD-MySQL
sudo yum install --enablerepo=epel -y perl-Config-Tiny perl-Log-Dispatch perl-Parallel-ForkManager
# install mha-node
wget --no-check-certificate -O /tmp/mha4mysql-node-0.56-0.el5.noarch.rpm https://72003f4c60f5cc941cd1c7d448fc3c99e0aebaa8.googledrive.com/host/0B1lu97m8-haWeHdGWXp0YVVUSlk/mha4mysql-node-0.56-0.el5.noarch.rpm
sudo rpm -ivh /tmp/mha4mysql-node-0.56-0.el5.noarch.rpm
@lorentzca
lorentzca / consul
Last active February 1, 2016 06:59 — forked from yunano/consul
/etc/init.d/consul for CentOS 5
#!/bin/sh
#
# consul - this script manages the consul agent
#
# chkconfig: 345 95 05
# description: consul_0.6.0
# processname: consul
### BEGIN INIT INFO
# Provides: consul
@lorentzca
lorentzca / install_consul.sh
Last active February 1, 2016 06:48
install consul (centos5)
#!/bin/sh
sudo yum install -y wget unzip
# add consul binary
wget --no-check-certificate -O /tmp/consul.zip https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_linux_amd64.zip
sudo unzip /tmp/consul.zip -d /usr/local/sbin
sudo rm -f /tmp/consul.zip
sudo chmod 755 /usr/local/sbin/consul
@lorentzca
lorentzca / config.json
Last active January 29, 2016 08:53
consul server用設定
{
"bootstrap_expect": 1 ,
"server": true,
"data_dir": "/var/consul",
"bind_addr": "127.0.0.1",
"client_addr": "0.0.0.0"
}
@lorentzca
lorentzca / mhamanager
Last active January 28, 2016 06:37
[WIP] mha-managerの起動スクリプト
#!/bin/bash
#
# chkconfig: - 58 74
# description: masterha_manager is master monitoring and running failover automatically in case of master down
# processname: masterha_manager
# pidfile: /var/lib/mysql/master1.pid
# config: /etc/masterha_default.cnf
# source profile
. /etc/profile
@lorentzca
lorentzca / kunishima.rb
Created January 21, 2016 10:46
集え我が一族
#!/usr/bin/ruby
require 'uri'
require 'open-uri'
require 'net/http'
open('http://data.iana.org/TLD/tlds-alpha-by-domain.txt') {|f|
f.each_line {|line|
next line if %r(^#) =~ line
url = "http://kunishima.#{line}"
@lorentzca
lorentzca / consul
Last active January 18, 2016 05:56
install monit (centos)
check process consul
with pidfile "/var/run/consul.pid"
start program "/etc/init.d/consul start"
stop program "/etc/init.d/consul stop"