Skip to content

Instantly share code, notes, and snippets.

yuuichi fujioka yuuichi-fujioka

Block or report user

Report or block yuuichi-fujioka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gitsetting.sh
#!/bin/bash
git config --global core.editor 'vim -c "set fenc=utf-8"'
ls ~/.config/git 2>/dev/null >/dev/null || mkdir -p ~/.config/git
cat << __EOF__ > ~/.config/git/gitignore
.idea
tags
TAGS
View Packageインストール
$ ks pkg list # Packageの一覧を確認する。
REGISTRY NAME VERSION INSTALLED ENVIRONMENTS
======== ==== ======= ========= ============
helm-stable acs-engine-autoscaler 2.2.0
helm-stable aerospike 0.1.7
helm-stable anchore-engine 0.2.0
...(すごく多いので略
helm-stable risk-advisor 2.0.4
helm-stable rocketchat 0.1.3
helm-stable rookout 0.1.0
@yuuichi-fujioka
yuuichi-fujioka / 2nd_dns
Created Dec 14, 2017
a 2nd dns that is used for resolving a specific domain with dnsmasq
View 2nd_dns
# /etc/dnsmasq.d/2nd_dns
server=/.localdomain/192.168.0.2
View ssh_proxy_command.py
import paramiko
c = paramiko.client.SSHClient()
c.load_system_host_keys()
c.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
c.connect('192.168.0.1', username='ubuntu', password='password',
sock=paramiko.ProxyCommand('ssh -W 192.168.0.1:22 -w 120 10.0.0.1'))
_in, _out, _err = c.exec_command('ls -la')
print _out.read()
View run_uwsgi.sh
uwsgi --wsgi-file app.py --http 0.0.0.0:8080
@yuuichi-fujioka
yuuichi-fujioka / hoge.vmx
Created Nov 22, 2016
Enable VNC Server for VM on VMWare
View hoge.vmx
RemoteDisplay.vnc.enabled = TRUE
RemoteDisplay.vnc.port = 5900
RemoteDisplay.vnc.password = password
RemoteDisplay.vnc.keyMap = jp
@yuuichi-fujioka
yuuichi-fujioka / Add_User.groovy
Created Oct 27, 2016
Add Jenkins User with script consle on web GUI
View Add_User.groovy
jenkins.model.Jenkins.instance.securityRealm.createAccount("user-name", "password");
@yuuichi-fujioka
yuuichi-fujioka / list_all_package_versions.sh
Created Sep 30, 2016
list up all pypi package versions
View list_all_package_versions.sh
curl https://pypi.python.org/pypi/pip/json | jq '.releases | keys[]' -r
View call_neutron_rpc.py
import json
import sys
from oslo_config import cfg
import oslo_i18n
from neutron.agent import rpc
from neutron.common import config
from neutron.common import rpc as n_rpc
from neutron.common import topics
View force_inject_port.sh
# tenant user
neutron port-create ${NET_NAME} --name my_port
# run on ovs-agent node
PORT_ADDR=$(...)
PORT_ID=$(neutron port-show my_port | awk '/ id /{print $4}')
PORT_MAC=$(neutron port-show my_port | awk '/ mac_address /{print $4}')
sudo ovs-vsctl add-port br-int injected_port -- set interface injected_port type=internal 'external_ids={attached-mac="'${PORT_MAC}'", iface-id="'${PORT_ID}'", iface-status=active}'
sudo ip link set up injected_port
You can’t perform that action at this time.