Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
@yuuichi-fujioka
yuuichi-fujioka / smb.conf
Created July 7, 2015 04:25
samba config file sample
[share]
path = /usr/share
writable = yes
guest ok = yes
create mode = 0777
directory mode = 0777
read only = no
@yuuichi-fujioka
yuuichi-fujioka / haproxy.cfg
Created June 24, 2015 05:03
simple haproxy.cfg
global
daemon
maxconn 256
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
@yuuichi-fujioka
yuuichi-fujioka / build_docker.sh
Created June 19, 2015 06:49
Building Docker on Ubuntu 14.04
# TODO install go 1.3 or later
sudo apt-get install btrfs-tools libsqlite3-dev libdevmapper-dev
git clone https://github.com/docker/docker
cd docker
AUTO_GOPATH=1 ./hack/make.sh dynbinary
cd bundles/latest/dynbinary/
@yuuichi-fujioka
yuuichi-fujioka / install2.sh
Created June 19, 2015 03:05
install go 1.4.2 to ubuntu 14.04
wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz -O /tmp/go.tar.gz
pushd /tmp
tar xf go.tar.gz
sudo mv go /usr/local/go
sudo rm -fr /etc/alternatives/go
sudo ln -s /usr/local/go/bin/go /etc/alternatives/go
popd
@yuuichi-fujioka
yuuichi-fujioka / step_executable.sh
Created June 16, 2015 06:49
bash step debugging. when DEBUG is in environment variable, this script runs with step debugging.
#!/bin/bash
if [ -n "$DEBUG" ]
then
trap 'read -p "$0($LINENO) $BASH_COMMAND"' DEBUG
fi
echo hello
echo world
@yuuichi-fujioka
yuuichi-fujioka / dhcp_init.sh
Created June 15, 2015 01:01
initialize nic with dhcp without /etc/network/interfaces.
sudo dhclient eth0
@yuuichi-fujioka
yuuichi-fujioka / hoge.py
Created June 5, 2015 02:45
header of utf8 python file
# -*- coding: utf-8 -*-
@yuuichi-fujioka
yuuichi-fujioka / jenkins_api.sh
Last active August 29, 2015 14:21
Jenkins REST? API
# Get jobs
curl http://192.168.0.1:8080/api/json
# Get job config
curl http://192.168.0.1:8080/job/${JOB_NAME}/config.xml
# Create a job
@yuuichi-fujioka
yuuichi-fujioka / pip.conf
Last active August 29, 2015 14:19
setting index to my pypi mirror. pip.conf should be "~/.config/pip/pip.conf". (defails: https://pip.pypa.io/en/latest/user_guide.html)
[global]
trusted-host = my.pypi.mirror
extra-index-url = http://my.pypi.mirror:8000/simple/
@yuuichi-fujioka
yuuichi-fujioka / ansible.cfg
Created April 15, 2015 07:23
ansible via a springboard server
[ssh_connection]
ssh_args = -F ssh_config