# apachectl -V
Server version: Apache/2.2.26 (Unix)
Server built: Dec 10 2013 22:09:38
Server's Module Magic Number: 20051115:33
Server loaded: APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
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 | |
# vi: set ts=4 sw=4 sts=0 et: | |
# [使いやすいシェルスクリプトを書く | SOTA](http://deeeet.com/writing/2014/05/18/shell-template/) | |
# [Zsh - シェルスクリプトのオプション設計ガイドライン - Qiita](http://qiita.com/mollifier/items/95a294f95f5977b9d663) | |
PROG=$(basename ${0}) | |
usage() { | |
cat <<EOF | |
${PROG} is a tool for %FIXME% |
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
#!/usr/bin/env python | |
# -*- coding: utf-8; -*- | |
# github に上げるテキストのタイトルを抜き出して目次を作る | |
# https://github.com/sonots/growthforecast-tuning/blob/master/toc.rb | |
# vi: set ts=4 sw=4 sts=0 et: | |
import os,sys,urllib | |
filename = sys.argv[1] | |
flag = 0 |
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
#!/usr/bin/python | |
# vi: set ts=4 sw=4 sts=0 et: | |
import sys,time,subprocess | |
from datetime import datetime | |
AIRPORT='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' | |
AIRPORT_OPT=('-I') | |
cmdline=(AIRPORT,AIRPORT_OPT) | |
subproc_args = {'shell': False, |
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
# bash の tcp 通信機能を使います | |
# 参考: http://qiita.com/k_ui/items/a01fdcfa8ac6729e7870 | |
exec 3<> /dev/tcp/file.mackerel.io/80 | |
echo -e "GET /agent/deb/mackerel-agent_latest.all.deb HTTP/1.0\nHost:file.mackerel.io\n\n" >&3 | |
cat <&3 >mackerel-agent_latest.all.deb | |
# header が付いているので除去 | |
# 参考: http://stackoverflow.com/questions/20179623/bash-remove-headers-from-http-response | |
sed -i '1,/^\r\{0,1\}$/d' mackerel-agent_latest.all.deb |
治った模様
$ for i in $(dig @d0.org.afilias-nst.org ftp.jp.debian.org ns | awk '/^debian.org/ {print $5}'); do echo "== ${i} ==";dig +short @${i} ftp.jp.debian.org;done
== dns1.easydns.com. ==
cdn.debian.or.jp.
== sec2.rcode0.net. ==
cdn.debian.or.jp.
通常 docker は -v /foo としてコンテナを起動した後にそのコンテナを docker rm
して、新たに docker run
で作りなおすと /foo の中身は引き継がない。
しかし、docker-compose を利用するとこれが引き継がれる。なぜかを調べてみた(docker-compose は stop/start ではなくちゃんと作りなおしているので修正した設定などが反映される)。
- -v で指定した場合(や Dockerfile の VOLUME で指定している場合)
/var/lib/docker/vfs/dir
に ID のディレクトリが掘られてそこが bind-mountされる - 対象コンテナは rm されない限りここを参照する。
- 対象コンテナが rm されると紐付け(config.json)が消えるが、データは消されない(ただ当然どのコンテナからも通常アクセス出来ない)
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
[mysqld] | |
server_id = 101 | |
user = mysql | |
port = 3306 | |
bind_address = 0.0.0.0 | |
character_set_server = utf8mb4 | |
datadir = /fioa/mysql | |
tmpdir = /fioa/tmp | |
socket = /fioa/mysql/mysql.sock | |
default_storage_engine = InnoDB |
OlderNewer