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
@atomd-zz
atomd-zz / master_ip_failover
Created April 5, 2012 12:14
MHA master_ip_failover script
use strict;
use warnings FATAL => 'all';
use Getopt::Long;
my (
$command, $ssh_user, $orig_master_host, $orig_master_ip,
$orig_master_port, $new_master_host, $new_master_ip, $new_master_port
);
@chsh
chsh / facebook-app-template.rb
Created June 17, 2012 04:44
Rails3 template to generate facebook app.
# facebootstrap: Rails3 template
app_h_name = app_name.gsub(/_/, '-')
app_c_name = app_name.classify
ruby_version = '1.9.3-p286'
repository_path = "git@codeplane.com:chsh/#{app_h_name}.git"
target_branch = 'develop' # or master etc...
deploy_server = '[YOUR DEPLOY SERVER]'
target_mode = 'edge' # or 'live' or 'develop' etc...
# additional_path = '/usr/pgsql-9.1/bin'
@mechamogera
mechamogera / Gemfile
Last active March 18, 2016 03:22
Github Organizationのメンバー一覧を取得するRubyスクリプト
# A sample Gemfile
source "https://rubygems.org"
gem 'github_api'
gem 'highline'
gem 'trollop'
#
# AWS TOTAL Billing information
#
<source>
type cloudwatch
tag cloudwatch-billing.amount
cw_endpoint monitoring.us-east-1.amazonaws.com
namespace AWS/Billing
metric_name EstimatedCharges
@masutaka
masutaka / hoge.sh
Last active November 10, 2016 15:36
Shell Script $* and $@
#!/bin/sh
echo $*
echo ---
echo $@
echo ---
@lorentzca
lorentzca / ghostblog_update.sh
Last active April 19, 2017 04:41
my ghostblog updater
#/bin/sh -x
# version
version="0.11.8"
# backup
cd /var/www/ghost
sudo tar cpf /tmp/ghost_snapshot_$(date +%Y%m%d%H%M).tar .
# download latest ghost
@hayajo
hayajo / README.md
Last active May 9, 2018 12:59
Vagrant で gVisor を試す
@inokappa
inokappa / gist:124b1ee5f3e3fbe6b172
Last active November 21, 2018 00:37
corosync.conf の設定メモ
@blalor
blalor / gist:c325d500818361e28daf
Created May 2, 2014 04:37
redhat init script for consul
#!/bin/bash
#
# consul Manage the consul agent
#
# chkconfig: 2345 95 95
# description: Consul is a tool for service discovery and configuration
# processname: consul
# config: /etc/consul.conf
# pidfile: /var/run/consul.pid
@teuteuguy
teuteuguy / greengrassd.service
Last active May 30, 2020 07:53
greengrassd.service
[Unit]
Description=Start Greengrass at Boot
[Service]
Type=forking
PIDFile=/var/run/greengrassd.pid
Restart=on-failure
ExecStart=/greengrass/ggc/core/greengrassd start
ExecReload=/greengrass/ggc/core/greengrassd restart
ExecStop=/greengrass/ggc/core/greengrassd stop