Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
echo "deb http://pkg.jenkins-ci.org/debian binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
sudo apt-get install jenkins
dd if=/dev/cdrom of=~/foo.iso
@yuuichi-fujioka
yuuichi-fujioka / install_start_stop_daemon.sh
Created June 7, 2014 15:11
install start-stop-daemon to centos, fedora, redhat.
#!/bin/bash
cd /usr/local/src
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2
gcc start-stop-daemon.c -o start-stop-daemon
cp start-stop-daemon /usr/sbin/
@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 / install package to qcow image.sh
Created April 17, 2014 04:14
install apt-get package to qcow2 image
sudo apt-get install qemu-utils
sudo modprobe nbd
sudo qemu-nbd --connect=/dev/nbd0 /full/path/to/qcow2/image/file
sudo mkdir /mnt/ubuntu
sudo mount /dev/nbd0p1 /mnt/ubuntu
VPNCMD="sudo /usr/local/vpnserver/vpncmd localhost:443 /SERVER /CMD"
# Create virtual hub
${VPNCMD} HubCreate ${HubName} /PASSWD:admin
# Create local bridge(connect to physical device)
${VPNCMD} BridgeCreate ${HubName} /DEVICE:${phy_dev_name:-eth0}
# Create local bridge(create tap interface)
@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 / su_git.sh
Created April 16, 2014 23:58
su to git that login shell is git-bash.
sudo su -s /bin/bash - git
@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