This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from fabric.api import task | |
from fabric.api import env | |
# コマンドラインから`stage.production`ではなく`production`と指定できるように関数をインポートする | |
from stage import production, integration, staging, testing, development | |
import myapp # アプリケーションごとにモジュールをわける | |
# import myapp2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"syscall" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "log" | |
import "os" | |
import "strconv" | |
import "syscall" | |
func main() { | |
var err error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
OWNER=${1:?"repo onwer required"} | |
URL_BASE="https://api.github.com" | |
REPOS_URL="/users/$OWNER/repos?per_page=100" | |
PULLS_URL="/repos/$OWNER/%s/pulls" | |
ISSUES_URL="/repos/$OWNER/%s/issues" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vagrant/ |
pipework
やweave
を利用せずにコンテナに固定IPを設定するには、docker run
で--privileged
オプションを指定し、コンテナ内でIPを設定する方法がある。
$ HOST1=$(docker run --privileged -t -d ubuntu /bin/bash)
$ docker exec $HOST1 ip addr add 192.168.0.10/24 dev eth0
$ HOST2=$(docker run --privileged -t -d ubuntu /bin/bash)
$ docker exec $HOST2 ip addr add 192.168.0.11/24 dev eth0