Skip to content

Instantly share code, notes, and snippets.

View hansode's full-sized avatar

Masahito Yoshida hansode

View GitHub Profile
$ ./setup-brvlan-pair.sh
=> /etc/sysconfig/network-scripts/ifcfg-brvlan2001
DEVICE=brvlan2001
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
=> /etc/sysconfig/network-scripts/ifcfg-vlan2001
DEVICE=vlan2001
BOOTPROTO=none
ONBOOT=yes
#!/bin/bash
#
# requires:
# bash
# git
#
set -e
set -o pipefail
set -x
@hansode
hansode / mirror-centos-to-local.sh
Created October 1, 2014 07:42
mirror-centos-to-local.sh
#!/bin/bash
#
# requires:
# bash
# mkdir, rsync
#
set -e
set -o pipefail
set -x
#!/bin/bash
#
# requires:
# bash
#
set -e
set -o pipefail
function nbd_used?() {
local devpath=${1}
@hansode
hansode / gist:755936
Last active September 24, 2015 13:37
IP packets debug with netfilter(iptables)
#!/bin/bash
#
#
#
nic=${1:-'eth0'}
#vif-jly0dfqe
bounds="s d"
cmds="F X Z"
@hansode
hansode / gist:759431
Created December 30, 2010 03:52
IP packets debug with netfilter(ebtables)
#!/bin/sh
#
#
#
nic=${1:-'eth0'}
#vif-jly0dfqe
protocol_maps="
ip4=ip4
ip6=ip6
arp=arp
@hansode
hansode / mirror-epel.sh
Created October 28, 2011 08:40
mirror part(s) of epel repository.
#!/bin/bash
pkg_keywords="^erlang|^wx"
rhel_ver=6
arch=x86_64
base_uri=http://download.fedora.redhat.com/pub/epel/${rhel_ver}/${arch}
wget_opts="-m --no-parent"
wget ${wget_opts} ${base_uri}/repodata/
@hansode
hansode / Makefile
Created November 14, 2011 05:53
bridge & bonding configuration files of rhel on virtualbox
all: deploy setup
restart:
/etc/init.d/network restart
setup:
yum install bridge-utils
modprobe bonding
deploy:
@hansode
hansode / build-bundled-tarball.sh
Created November 21, 2011 09:19
build local gem repository from Gemfile(s)
#!/bin/sh
#
#
set -e
LANG=C
LC_ALL=C
tarball=$1
[ $# = 1 ] || {
@hansode
hansode / _config.sh.example
Created December 5, 2011 10:21
build and deploy project(s)
prefix=/home/wakame
git_repo_maps="
wakame-adapters=git://github.com/axsh/wakame-adapters.git
wakame-vdc=git://github.com/axsh/wakame-vdc.git
"
initscript=./initializer/initscript.sh
environment=development
#environment=integration