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 / run helloworldbin on remote.sh
Created December 17, 2021 05:24
run single binary on remote host
cat helloworldbin | ssh server01 'sh -c '"'"'tmp=$(mktemp -d); cat > $tmp/helloworldbin; chmod +x $tmp/helloworldbin; $tmp/helloworldbin; rm -fr $tmp '"'"
@yuuichi-fujioka
yuuichi-fujioka / gitsetting.sh
Created February 12, 2019 05:06
my git setting
#!/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
@yuuichi-fujioka
yuuichi-fujioka / Packageインストール
Last active October 3, 2018 10:33
HelmのChartに少しだけ手を入れたいあなたへ ref: https://qiita.com/yuuichi-fujioka/items/c6899abfb09d60291f2f
$ 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 December 14, 2017 02:25
a 2nd dns that is used for resolving a specific domain with dnsmasq
# /etc/dnsmasq.d/2nd_dns
server=/.localdomain/192.168.0.2
@yuuichi-fujioka
yuuichi-fujioka / ssh_proxy_command.py
Last active May 19, 2017 08:34
ssh with paramiko +α
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()
@yuuichi-fujioka
yuuichi-fujioka / run_uwsgi.sh
Created December 20, 2016 02:53
launch up wsgi app
uwsgi --wsgi-file app.py --http 0.0.0.0:8080
@yuuichi-fujioka
yuuichi-fujioka / hoge.vmx
Created November 22, 2016 05:10
Enable VNC Server for VM on VMWare
RemoteDisplay.vnc.enabled = TRUE
RemoteDisplay.vnc.port = 5900
RemoteDisplay.vnc.password = password
RemoteDisplay.vnc.keyMap = jp
@yuuichi-fujioka
yuuichi-fujioka / Add_User.groovy
Created October 27, 2016 06:01
Add Jenkins User with script consle on web GUI
jenkins.model.Jenkins.instance.securityRealm.createAccount("user-name", "password");
@yuuichi-fujioka
yuuichi-fujioka / list_all_package_versions.sh
Created September 30, 2016 05:30
list up all pypi package versions
curl https://pypi.python.org/pypi/pip/json | jq '.releases | keys[]' -r
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