Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
CREATE DATABASE ${database};
GRANT ALL PRIVILEGES ON ${database}.* TO '${user}'@'localhost' \
IDENTIFIED BY '${password}';
GRANT ALL PRIVILEGES ON ${database}.* TO '${user}'@'%' \
IDENTIFIED BY '${password}';
@yuuichi-fujioka
yuuichi-fujioka / dump http.sh
Last active August 29, 2015 14:16
dump http body and header using tcpick
tcpick -i eth0 "port 80" -yP -C -h
@yuuichi-fujioka
yuuichi-fujioka / pickup_branch_param.sh
Created March 2, 2015 05:31
pickup parameter name to set branch for local.conf
grep "[^$ {]\+BRANCH" ./lib/ -R -ho | sort | uniq
@yuuichi-fujioka
yuuichi-fujioka / monitoring_port.sh
Created February 26, 2015 03:50
monitoring ovsd
ovsdb-client -f json monitor Port name
@yuuichi-fujioka
yuuichi-fujioka / template.conf
Created February 24, 2015 08:37
docker container with upstart
description "Redis container"
author "Me"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
script
/usr/bin/docker start -a ${container name}
end script
@yuuichi-fujioka
yuuichi-fujioka / get ofport.sh
Created February 24, 2015 06:29
get of port number of port
ovs-vsctl get Interface ${port_name} ofport
@yuuichi-fujioka
yuuichi-fujioka / install nsenter.sh
Created February 23, 2015 10:40
install nsenter
docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
@yuuichi-fujioka
yuuichi-fujioka / Dockerfile
Last active August 29, 2015 14:15
run docker container as non container ubuntu. this is verified on ubuntu trusty.
FROM ubuntu:trusty
MAINTAINER [email protected]
RUN apt-get install openssh-server -y
RUN useradd -d /home/ubuntu -m -s /bin/bash -U ubuntu
RUN adduser ubuntu sudo
RUN echo "ubuntu ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu
RUN mkdir /home/ubuntu/.ssh
ADD id_rsa.pub /home/ubuntu/.ssh/authorized_keys
@yuuichi-fujioka
yuuichi-fujioka / default
Last active August 29, 2015 14:15
pxeboot config files on ubuntu 14.04
# /var/lib/tftpboot/pxelinux.cfg/default
default syslinux/vesamenu.c32
menu hshift 13
menu width 49
menu margin 8
menu title Installer boot menu
# example, for CoreOS
@yuuichi-fujioka
yuuichi-fujioka / ofctl.v1.3.sh
Created February 10, 2015 05:22
ovs with openflow 1.3
ovs-ofctl --protocols=OpenFlow13 show br0