Skip to content

Instantly share code, notes, and snippets.

@thiagokronig
thiagokronig / oracle11g-install.sh
Last active August 13, 2016 22:55
Oracle 11.2.0 em Centos 6.4 x86_64 com VirtualBox 4.2.12
# Oracle 11.2.0 em Centos 6.4 x86_64 com VirtualBox 4.2.12
#
# VM Configuration
# oracle11g.ova
#
# 4 CPUS
# 4128 MB RAM
#
# IDE: PIIX4: use host i/o cache
# SATA: AHCI: 4 ports: use host i/o cache
@thiagokronig
thiagokronig / add_veth_pair.sh
Created August 5, 2015 16:54
Add veth pair to Docker container
# Fortemente baseado em https://github.com/jpetazzo/pipework
function add_veth_pair {
pid=$1 ; ipaddr=$2 ; container_ifname=$3
echo "Add interface $container_ifname with ip $ipaddr to container pid $pid"
local_ifname="v${container_ifname}l${pid}"
guest_ifname="v${container_ifname}g${pid}"
bridge='docker0'
mtu=$(ip link show $bridge | awk '{print $5}')
if ip link show "$local_ifname" >/dev/null 2>&1 ; then
ip link del "$local_ifname"