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 / add vxlan port.sh
Created January 8, 2015 10:09
add port for vxlan.
ovs-vsctl add-port ${BRIDGE_NAME} ${PORT_NAME} -- set interface ${PORT_NAME} type=vxlan options:remote_ip=${TARGET_VTEP_IP} options:key=${VXLAN_ID}
@yuuichi-fujioka
yuuichi-fujioka / add port as interface.sh
Created January 8, 2015 10:06
Add port to bridge as a network interface/
ovs-vsctl add-port ${BRIDGE_NAME} ${PORT_NAME} -- set interface ${PORT_NAME} type=internal
@yuuichi-fujioka
yuuichi-fujioka / name_number.sh
Last active August 29, 2015 14:13
get mapping between port name and port number
ovs-vsctl -f json list interface | jq '[.data[] | {key: .[22], value: .[23]}] | from_entries'
@yuuichi-fujioka
yuuichi-fujioka / vpnclient
Created December 16, 2014 23:53
vpnclient init script
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Client
DAEMON=/usr/local/vpnclient/vpnclient
LOCK=/var/lock/subsys/vpnclient
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
# In remote client side
# Shoud set to allow Access Database
ssh -p 29418 ${gerrit_admin_username}@${gerrit_host} gerrit gsql -c "UPDATE CHANGES SET DEST_PROJECT_NAME='NEW NAME' WHERE DEST_PROJECT_NAME='OLD NAME"
# In gerrit server side
# In gerrit site dir
mv "git/OLD NAME.git" "git/NEW NAME.git"
service gerrit2 stop
virsh -c qemu+ssh://${username}@${hostname}:${port_number}/system
@yuuichi-fujioka
yuuichi-fujioka / get_group_id.sh
Created September 23, 2014 08:09
Get group id with gitlabcurl and jq
gitlabcurl groups | jq ".[] | select(.name == \"${GROUP_NAME}\") | .id"
@yuuichi-fujioka
yuuichi-fujioka / gitlabcurl.rc
Created September 23, 2014 08:07
curl for gitlab api
function gitlabcurl() {
TOKEN=$GITLAB_TOKEN
URL=$GITLAB_URL
if [ -z $TOKEN ]
then
echo GITLAB_TOKEN is required in env
return 1
fi
if [ -z $URL ]
@yuuichi-fujioka
yuuichi-fujioka / keyinput
Created September 22, 2014 05:55
なんかrecordingってでたら
q
@yuuichi-fujioka
yuuichi-fujioka / keyinput
Last active August 29, 2015 14:06
ctrl + sで固まったら
ctrl + q