Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
docker images | awk '/<none/{print $3}' | xargs docker rmi
https://docs.mongodb.com/manual/reference/parameters/
db.getSiblingDB('admin').runCommand( { setParameter: 1, failIndexKeyTooLong: false } )
1 ls
2 mkdir /opt
3 cd /opt/
4 ls
5 curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > /opt/docker-compose
6 ls
7 mkdir bin
8 mv docker-compose bin/
9 chmod 755 bin/docker-compose
10 which docker-compose
for i in `git branch -r|grep -v HEAD|grep -v master|sed 's:origin/::g'`
do
git checkout --track -b $i origin/$i
done
git checkout master
権限>サービスアカウント>Compute Engine default service account>鍵を作成>jsonダウンロード>.ssh/google-compute-engine-xxxxxx.json
compute engine>メタデータ>SSHキー>公開鍵を追加
NW
ネットワーキング>ネットワーク>TODO
FW
ネットワーキング>ファイアーウォールルール>+ファイアーウォールを作成>80を許可
@runeleaf
runeleaf / puma
Created January 15, 2016 12:12
/etc/init.d/puma
#!/bin/bash
#
# puma-myproject
# chkconfig: 2345 82 55
# processname: puma-myproject
# description: Runs puma-myproject for nginx integration.
# Include RedHat function library
. /etc/rc.d/init.d/functions
ifcfg-***
DEVICETYPE=ovs
/etc/neutron/plugins/ml2
ml2_conf.ini:6:type_drivers = flat,vlan,gre,vxlan,geneve
/etc/neutron/plugin.ini
network_vlan_ranges = physnet1
bridge_mappings = physnet1:br-ex
@runeleaf
runeleaf / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env ruby
#
# 1. PIVOTAL API TOKENの取得
#
# 2. スクリプトの置き場所
# ~/bin/git-start
#
# 3. プロジェクトの指定
# cd PROJECT_DIR
# echo PIVOTALプロジェクト番号 > .gitproject
# setup
# export ANSIBLE_HOSTS=~/.ansible/hosts
# https://gist.github.com/runeleaf/5721014
- hosts: develop
user: kawashima
sudo: yes
tasks:
- include: centos/system-setup.yml
- include: centos/install-common-item.yml
- include: centos/install-add-item.yml