Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

adachi.ryo RVIRUS0817

:octocat:
View GitHub Profile
View digdag.txt
- digdag v0.10.2
- embulk v0.9.23
- dig file
+hoge:
sh_result>: mysql -uhoge -P$hogehoge"show tables;" | csvjson -d $'\t'
destination_variable: hogehoge
stdout_format: json-list-map
@RVIRUS0817
RVIRUS0817 / chatwork.go
Last active Apr 26, 2018
Vuls Chatwork support
View chatwork.go
// ChatWorkWriter定義。Writeメソッドを定義して、vuls report -to-chatworkを実行時に標準出力に加えてchatworkにもoutputするプログラム
package report
import (
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
@RVIRUS0817
RVIRUS0817 / vulsrepo
Last active Jan 12, 2018
/etc/init.d/
View vulsrepo
#!/bin/bash
#chkconfig: 2345 85 15
#descpriction: VulsRepo
#OS Amazon Linux/CentOS6
# source function library
. /etc/rc.d/init.d/functions
RETVAL=0
View delete-cloudfront.py
# coding: utf-8
# RDS delete
import boto3
# nodelete,trueを変数化
ND = 'nodelete'
TR = 'true'
def lambda_handler(event, context):
#if __name__ == '__main__':
View coreos-install.sh
#!/bin/bash
# Copyright (c) 2013 The CoreOS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e -o pipefail
error_output() {
echo "Error: return code $? from $BASH_COMMAND" >&2
}
View coreos-pythoninstall.sh
#!/bin/bash
VERSIONS=${VERSIONS:-"2.7.8.10"}
# make directory
mkdir -p /opt/bin
cd /opt/bin
wget http://downloads.activestate.com/ActivePython/releases/${VERSIONS}/ActivePython-${VERSIONS}-linux-x86_64.tar.gz
tar -xzvf ActivePython-${VERSIONS}-linux-x86_64.tar.gz
View keepalived.conf
virtual_server_group DOCKER_HTTP {
172.19.10.63 80
172.19.10.111 80
}
virtual_server group DOCKER_HTTP {
delay_loop 3
lvs_sched wrr
lvs_method NAT →Masp
View vrrp.conf
vrrp_sync_group VG {
group {
VI
VE
}
notify_master /etc/keepalived/vrrp_master.sh
notify_backup /etc/keepalived/vrrp_backup.sh
notify_fault /etc/keepalived/vrrp_backup.sh
notify /etc/keepalived/vrrp_state.sh
View kvm-cent7.txt
### 1. make Disk Imange
qemu-img create -f qcow2 /var/lib/libvirt/images/cent7.qcow2 20G
### 2. install and boot guest server
virt-install \
--connect qemu:///system \
--name cent7 \
--vcpus=2 \
--ram=2048 \
--hvm \
View kvm-cent7.cfg
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="http://xxx.xxx.xxx.xxx/os/7/os/x86_64/"
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=vda
# Keyboard layouts