diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 5951316a..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "plugins/pelican-plugins"] - path = plugins/pelican-plugins - url = https://github.com/getpelican/pelican-plugins.git diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 26a9a177..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: python -git: - submodules: false -python: -- '3.5' -branches: - only: - - master -before_install: -- pip install -U pip -install: -- pip install -r requirements.txt -- git submodule update --init -- cd ./plugins/pelican-plugins/ && git submodule update --init pelican-gist && cd $TRAVIS_BUILD_DIR -script: "./script/deploy.sh" -notifications: - slack: - secure: XEWtJape3GQSntCHwKGnz/ZNlcG9U5IKq94l4qbitjVCcg+NUtJ1l9fyev6aFgmCaJUH4MVg6Su+LGR/eKmOfC8E4e5GtDDapt0Ry0hLKZRjhZVsTkh+SvRpDB6J33b6GQNeww9lzLrH/C9qoPFRf3vC108X7j5oOniDoi1iCCA= diff --git a/content/extra/_well-known/nostr.json b/.well-known/nostr.json similarity index 100% rename from content/extra/_well-known/nostr.json rename to .well-known/nostr.json diff --git a/content/extra/CNAME b/CNAME similarity index 100% rename from content/extra/CNAME rename to CNAME diff --git a/Makefile b/Makefile deleted file mode 100644 index c5fa8705..00000000 --- a/Makefile +++ /dev/null @@ -1,112 +0,0 @@ -PY?=python3 -PELICAN?=pelican -PELICANOPTS= - -THEME=themes/Flex -BASEDIR=$(CURDIR) -INPUTDIR=$(BASEDIR)/content -OUTPUTDIR=$(BASEDIR)/output -CONFFILE=$(BASEDIR)/pelicanconf.py -PUBLISHCONF=$(BASEDIR)/publishconf.py - -FTP_HOST=localhost -FTP_USER=anonymous -FTP_TARGET_DIR=/ - -SSH_HOST=localhost -SSH_PORT=22 -SSH_USER=root -SSH_TARGET_DIR=/var/www - -S3_BUCKET=my_s3_bucket - -CLOUDFILES_USERNAME=my_rackspace_username -CLOUDFILES_API_KEY=my_rackspace_api_key -CLOUDFILES_CONTAINER=my_cloudfiles_container - -DROPBOX_DIR=~/Dropbox/Public/ - -GITHUB_PAGES_BRANCH=gh-pages - -DEBUG ?= 0 -ifeq ($(DEBUG), 1) - PELICANOPTS += -D -endif - -help: - @echo 'Makefile for a pelican Web site ' - @echo ' ' - @echo 'Usage: ' - @echo ' make html (re)generate the web site ' - @echo ' make clean remove the generated files ' - @echo ' make regenerate regenerate files upon modification ' - @echo ' make publish generate using production settings ' - @echo ' make serve [PORT=8000] serve site at http://localhost:8000' - @echo ' make devserver [PORT=8000] start/restart develop_server.sh ' - @echo ' make stopserver stop local server ' - @echo ' make ssh_upload upload the web site via SSH ' - @echo ' make rsync_upload upload the web site via rsync+ssh ' - @echo ' make dropbox_upload upload the web site via Dropbox ' - @echo ' make ftp_upload upload the web site via FTP ' - @echo ' make s3_upload upload the web site via S3 ' - @echo ' make cf_upload upload the web site via Cloud Files' - @echo ' make github upload the web site via gh-pages ' - @echo ' ' - @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html' - @echo ' ' - -html: - [ -e $(THEME) ] || git clone https://github.com/hitsumabushi/Flex.git $(THEME) - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) - -clean: - [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) - -regenerate: - $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) - -serve: -ifdef PORT - cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT) -else - cd $(OUTPUTDIR) && $(PY) -m pelican.server -endif - -devserver: -ifdef PORT - $(BASEDIR)/develop_server.sh restart $(PORT) -else - $(BASEDIR)/develop_server.sh restart -endif - -stopserver: - kill -9 `cat pelican.pid` - kill -9 `cat srv.pid` - @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' - -publish: - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) - -ssh_upload: publish - scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) - -rsync_upload: publish - rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude - -dropbox_upload: publish - cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) - -ftp_upload: publish - lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit" - -s3_upload: publish - s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type - -cf_upload: publish - cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) . - -github: publish - ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR) - git push origin $(GITHUB_PAGES_BRANCH) - -.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github diff --git a/archives.html b/archives.html new file mode 100644 index 00000000..b77e475a --- /dev/null +++ b/archives.html @@ -0,0 +1,564 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Archives + + + + +
+ + + +
+
+

Archives

+
+
+
+ +
Tue 12 October 2021
+ +
+ CloudFormation Stackを安全に削除する +
+
Tue 12 October 2021
+ +
+ 1Password CLIを使ってTOTPを取得する +
+
Tue 12 February 2019
+ +
+ Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった +
+
Fri 25 January 2019
+ +
+ CloudFormation の不満点 +
+
Wed 31 October 2018
+ +
+ DebianでLuaJITTeXを使いたい +
+
Wed 11 April 2018
+ +
+ Debian でログインシェルをzshにしている人が snappy を使う場合の注意 +
+
Thu 05 April 2018
+ +
+ PyPIへパッケージをアップロードする +
+
Mon 05 February 2018
+ +
+ Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ +
+
Tue 05 December 2017
+ +
+ さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話 +
+
Fri 01 December 2017
+ +
+ Mesos の sandbox のログローテーションをする +
+
Fri 10 November 2017
+ +
+ Ansible でバージョンチェックする +
+
Tue 17 October 2017
+ +
+ Travis CIで git submodule update --init --recursive を止める +
+
Fri 13 October 2017
+ +
+ Intel NUC 上に vSphere 6.5 のVSAN環境を作る +
+
Mon 10 July 2017
+ +
+ さくらのクラウドを便利に使うためのツールメモ +
+
Wed 08 February 2017
+ +
+ 自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ +
+
Tue 07 February 2017
+ +
+ Rust を始めるための設定 +
+
Tue 31 January 2017
+ +
+ ニフティ株式会社を退職しました +
+
Thu 15 December 2016
+ +
+ チーム活動で失敗したことの振り返り +
+
Thu 10 November 2016
+ +
+ git bisect でバグ/仕様変更のコミットを探す +
+
Tue 27 September 2016
+ +
+ DockerHub で docker build のオプションを設定したい +
+
Tue 12 July 2016
+ +
+ GnuPGのメモ @ Debian Sid +
+
Mon 11 July 2016
+ +
+ もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ +
+
Sun 10 July 2016
+ +
+ s3で自前 Debian Package リポジトリを作る +
+
Sat 09 July 2016
+ +
+ VCP6-NV 取得した +
+
Thu 07 July 2016
+ +
+ VCP6-NV 試験勉強メモ 2日目 +
+
Tue 05 July 2016
+ +
+ VCP6-NV 試験勉強メモ +
+
Tue 05 July 2016
+ +
+ VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる +
+
Thu 16 June 2016
+ +
+ 会社にslack入ったので、色々やってた +
+
Thu 16 June 2016
+ +
+ Anisble for Windows +
+
Tue 03 May 2016
+ +
+ YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する +
+
Fri 25 March 2016
+ +
+ 久しぶりにGitHub Pagesのjekyll触ったので、メモ +
+
Sat 02 January 2016
+ +
+ Travis コマンドでのエラー +
+
Tue 08 December 2015
+ +
+ vSphere 6.0 でのHA機能のエンハンスの要点 +
+
Sat 31 October 2015
+ +
+ 最近の仕事の振り返り +
+
Tue 15 September 2015
+ +
+ Dockerの細々としたメモ +
+
Sun 26 July 2015
+ +
+ VM Resource Allocation +
+
Fri 26 June 2015
+ +
+ Twitterからメールアドレス拾えるんじゃね?的な攻撃について +
+
Tue 23 June 2015
+ +
+ runCをDebianで実行する +
+
Mon 15 June 2015
+ +
+ Windowsの勉強を始めた +
+
Sun 07 June 2015
+ +
+ VDI, DaaS市場を調べてみた +
+
Thu 28 May 2015
+ +
+ WindowsをAnsibleで設定する +
+
Sat 09 May 2015
+ +
+ Ravelloが便利 +
+
Sun 05 April 2015
+ +
+ Xmonadの設定 +
+
Mon 09 February 2015
+ +
+ Hatena Engineer Seminar #4に行ってきました +
+
Mon 09 February 2015
+ +
+ fioを使ったベンチマーク +
+
Sat 07 February 2015
+ +
+ Easter Egg Collections +
+
Sun 01 February 2015
+ +
+ Consistent Algorithm +
+
Sat 31 January 2015
+ +
+ CROSS 2015のアンカンファレンスで話しました +
+
Fri 30 January 2015
+ +
+ CROSS2015の運営をしたので、やったこととわかったことを書いておく +
+
Thu 29 January 2015
+ +
+ Dockerのプロキシ設定 +
+
Mon 26 January 2015
+ +
+ DNS サーバーの比較資料集め +
+
Sun 25 January 2015
+ +
+ vShere Beta Program の注意点 +
+
Fri 16 January 2015
+ +
+ VCP5-DCV取得した +
+
Sat 10 January 2015
+ +
+ vDSのポートバインドタイプ +
+
Wed 07 January 2015
+ +
+ vSphere 5.5環境でMSCSクラスタを組むときの制約 +
+
Wed 07 January 2015
+ +
+ VMware VDP, VDPA +
+
Tue 06 January 2015
+ +
+ ESXiをkickstartでインストールする +
+
Mon 05 January 2015
+ +
+ vCloud Airの価格感を調べる +
+
Wed 31 December 2014
+ +
+ 2014年のまとめをしておかねば +
+
Tue 30 December 2014
+ +
+ VCPの学習中のメモ +
+
Tue 30 December 2014
+ +
+ VMware環境でのNPIVについて +
+
Tue 30 December 2014
+ +
+ VCP-DCVの概要 : VCP550 +
+
Wed 17 December 2014
+ +
+ fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編) +
+
Wed 17 December 2014
+ +
+ VMware 環境でのMACアドレス割当て +
+
Tue 16 December 2014
+ +
+ ソースコードリーディングをするときにctagsを使いたい +
+
Mon 15 December 2014
+ +
+ drone.ioを使って、pelicanをビルドする +
+
Sat 01 November 2014
+ +
+ Consul 使ってみる +
+
Thu 14 August 2014
+ +
+ vSphere API事始め +
+
Tue 12 August 2014
+ +
+ IPv6のことを調べ始めた +
+
Sun 27 July 2014
+ +
+ DebianにOzをインストールする +
+
Thu 17 July 2014
+ +
+ [論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads +
+
Mon 09 June 2014
+ +
+ DebianでZNCを使って、快適なIRC生活を送る +
+
Sun 08 June 2014
+ +
+ WebHDFSで詰まったこと +
+
Mon 02 June 2014
+ +
+ LEDバックライトの調整 +
+
Tue 07 January 2014
+ +
+ Perl の正規表現 +
+
Tue 07 January 2014
+ +
+ Perlスクリプトメモ +
+
Mon 06 January 2014
+ +
+ VPLSについてのメモ +
+
Thu 02 January 2014
+ +
+ 便利なツール +
+
Wed 01 January 2014
+ +
+ PXEブートでインストーラを起動する +
+
Wed 01 January 2014
+ +
+ 実UID, 実行UID +
+
Wed 01 January 2014
+ +
+ DNS サーバー +
+
Wed 01 January 2014
+ +
+ Perl のコンパイラオプション +
+
+
+
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi.html b/author/hitsumabushi.html new file mode 100644 index 00000000..f266d40d --- /dev/null +++ b/author/hitsumabushi.html @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

CloudFormation Stackを安全に削除する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以前、CloudFormation の不満点 というのを書いたが、諦めて大半のCfnをterraformに移行した。
+その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。

+

概要

+

アイデアは簡単で以下の通り。

+
    +
  1. cfn の操作のみが許可されているIAM roleを作成する
  2. +
  3. 上記roleを指定して cfn stackをdeleteする
  4. +
+

モチベーション

+

そもそも以前の記事でも、予期せぬ手作業の …

+
+ + Continue reading + +
+
+
+
+
+

1Password CLIを使ってTOTPを取得する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, 1password +

+
+
+
+

2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。
+TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。
+ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。

+

1Password CLIの初期設定

+

1Password CLI を利用できるようにする。
+1Password CLIのGetting Startedを見て、初期設定 …

+
+ + Continue reading + +
+
+
+
+
+

Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった

+

+ Posted on Tue 12 February 2019 in blog + + • Tagged with + python, yaml +

+
+
+
+

資料

+ +

背景

+

とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。
+sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。

+
    +
  • コメントは消したくない
  • +
  • ブロックスタイルのままにしたい
  • +
  • diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)
  • +
+

ruamel.yaml

+

python で yaml を扱うときは …

+
+ + Continue reading + +
+
+
+
+
+

CloudFormation の不満点

+

+ Posted on Fri 25 January 2019 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。

+

要点

+
    +
  • CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない
  • +
  • Drift 検出は誤検出が多すぎて使いづらい
  • +
  • Change Set は動いている状態との差分を見ていないので、信用できない
  • +
+

経緯

+

CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。
+ただ、各サービ …

+
+ + Continue reading + +
+
+
+
+
+

DebianでLuaJITTeXを使いたい

+

+ Posted on Wed 31 October 2018 in blog + + • Tagged with + tex, debian +

+
+
+
+

そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。

+

参考

+ +

未解決の問題

+
    +
  • /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST が自動生成されている、とコメントされているが、元ファイルがわからない
  • +
+
### This file was automatically generated by update-fmtutil.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on …
+
+ + Continue reading + +
+
+
+
+
+

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + + • Tagged with + debian, snappy, zsh +

+
+
+
+

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バ …

+
+ + Continue reading + +
+
+
+
+
+

PyPIへパッケージをアップロードする

+

+ Posted on Thu 05 April 2018 in blog + + • Tagged with + pypi, python +

+
+
+
+

資料

+
    +
  • パッケージ構成については github.com/pypa/sampleproject
  • +
  • https://pypi.python.org/pypi/twine
  • +
  • https://packaging.python.org/tutorials/distributing-packages/
  • +
+

手順

+

PyPIへユーザー登録する

+

PyPI には普段使われている本番環境とは別に、テスト環境がある。
+アカウントがそれぞれ独立しているので、両方で作成する必要がある。

+ +

.pypirc の作成

+

以下のように ~/.pypirc を作成して、test 環境を利用できるようにしておく。
+平分でパスワードを書くことになる …

+
+ + Continue reading + +
+
+
+
+
+

Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ

+

+ Posted on Mon 05 February 2018 in blog + + • Tagged with + GCP, golang +

+
+
+
+

概要

+

Google Pub/SubGoのSDK から使おうとしていました。
+やっているといくつか詰まったので、メモしておきます。

+
    +
  1. サービスアカウントを利用するためにCredentials JSONを指定する
  2. +
  3. サブスクリプションの Pub/Sub サブスクライバー権限 を与えても Permission Denied になる
  4. +
+

サービスアカウントを利用するためにCredentials JSONを指定する

+

権限の都合上、サービスアカウントのCredentials JSONを利用して認証 …

+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + + • Tagged with + sakrua, ansible, terraform +

+
+
+
+
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果と …

+
+ + Continue reading + +
+
+
+
+
+

Mesos の sandbox のログローテーションをする

+

+ Posted on Fri 01 December 2017 in blog + + • Tagged with + mesos, docker +

+
+
+
+

結論

+
    +
  • http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger
  • +
  • LogrotateContainerLogger を使って、 module parameter を設定する
  • +
+

概要

+

Mesos + Marathon 環境でdockerを動かしている。
+基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。
+調べてみると、 /var/lib/mesos-slave/slaves/ 以下にあるフォルダのうち、sandbox のログが肥大化していた。
+sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosか …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi2.html b/author/hitsumabushi2.html new file mode 100644 index 00000000..f59eb1ae --- /dev/null +++ b/author/hitsumabushi2.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

Ansible でバージョンチェックする

+

+ Posted on Fri 10 November 2017 in blog + + • Tagged with + ansible, debian +

+
+
+
+

やりたいこと

+

サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。
+- インストールされていなかったらインストール
+- あるバージョン未満だったらアップデート

+

pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。
+いい感じに playbook の中でバー …

+
+ + Continue reading + +
+
+
+
+
+

Travis CIで git submodule update --init --recursive を止める

+

+ Posted on Tue 17 October 2017 in blog + + • Tagged with + git, travis-ci +

+
+
+
+

結論

+ +
git:
+  submodule: false
+
+
    +
  • 個別に git submodule update --init hoge していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 $TRAVIS_BUILD_DIR を使えば良い。
  • +
+

経緯

+

久しぶりにこのブログを書いたらビルドに失敗していた。
+原因としては、このブログで利用している getpelican/pelican-plugins のsubmoduleの設定によって、
+取得で …

+
+ + Continue reading + +
+
+
+
+
+

Intel NUC 上に vSphere 6.5 のVSAN環境を作る

+

+ Posted on Fri 13 October 2017 in blog + + • Tagged with + vmware +

+
+
+
+

あまりVMwareを触らなくなってきて、何も見ずにvCenterの設定とかMaximum configurationsとか言えなくなってきたので、VMware周りのことをメモに残しておくことにする。
+ひとまず、自宅のVSAN環境の構築メモ。

+

環境

+

以下の構成のIntel NUC 3台にESXiをインストールして、その上にvCenterを立て、VSAN環境を作る。

+
+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + + • Tagged with + sakura, terraform, peco +

+
+
+
+

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example …
+
+ + Continue reading + +
+
+
+
+
+

自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ

+

+ Posted on Wed 08 February 2017 in blog + + • Tagged with + coreos, containerlinux +

+
+
+
+

構成

+

Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。

+

OSイメージ

+

VMware用のイメージを利用。
+/usr/share/oem/cloud-config.yml に vmware tools周りの設定が入っているので便利。

+

password の変更

+

grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。

+

初期設定: cloud-config

+

/var/lib/coreos-install/user_data を編集する。
+(作法を無視すれば、 /usr/share/oem/cloud-config.yml でも良いはず。)

+
#cloud-config
+coreos:
+  units:
+    - name: docker-tcp.socket
+      command …
+
+ + Continue reading + +
+
+
+
+
+

Rust を始めるための設定

+

+ Posted on Tue 07 February 2017 in blog + + • Tagged with + rust, vim +

+
+
+
+

rust のインストール

+

公式からインストールのためのスクリプトが提供されている。
+これを使うと、rustup というrustのマネージャが使えるようになって、
+rustc のバージョンアップや切替なんかができるらしい。

+
## rustup のインストール
+curl https://sh.rustup.rs -sSf | sh
+
+## これを .zshrc などに加える
+source ${HOME}/.cargo/env
+
+

rust のツールのインストール

+

cargo というので、いろんなライブラリとかツールをダウン …

+
+ + Continue reading + +
+
+
+
+
+

ニフティ株式会社を退職しました

+

+ Posted on Tue 31 January 2017 in blog + + +

+
+
+
+

本日最終出社日でした。

+

ニフティでやったこと

+

ニフティでは、ニフティクラウドのIaaSを中心に仕事をしていました。
+基本的にずっと @ysaotome さんの下で働いており、
+チームメンバーも優秀だったので、とても面白い環境でした。

+

本来は仮想ネットワークチームという名前だったのですが、割と何でもやるチームで、
+自身がやっていた仕事も、仮想ファイアウォー …

+
+ + Continue reading + +
+
+
+
+
+

チーム活動で失敗したことの振り返り

+

+ Posted on Thu 15 December 2016 in blog + + • Tagged with + teaming +

+
+
+
+
+

これは、 NIFTY Advent Calendar 2016 の15日目です。

+

@plan0213 さんの 『ネットワーク機器へのコマンド入力自動化』でした。
+ネットワークインフラエンジニアが大好きな話でしたね。

+

はじめに

+

今日の記事ですが、私が社内でやっていたチーム活動について振り返りを書きます。
+特に、失敗した点に注目して共有することで役に立てばと思っています。
+大前提としては、私は一般社員であ …

+
+ + Continue reading + +
+
+
+
+
+

git bisect でバグ/仕様変更のコミットを探す

+

+ Posted on Thu 10 November 2016 in blog + + • Tagged with + git, ansible +

+
+
+
+

まとめ

+
    +
  • git bisect が便利
  • +
  • ansible 2.1.0 -> 2.1.1 で group名に / を入れるとうまく動かないケースが存在する
      +
    • ansible リポジトリでbisect すると対象のコミットは 7287effb5ce241ce645d61e55e981edc73fa382a
    • +
    • group名には / を入れないように、 group_vars 以下はフラットな構成にしよう
    • +
    +
  • +
+

遭遇した問題

+

ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、
+複数のリージョンやゾーンにまたがるシステムのため、うまく設 …

+
+ + Continue reading + +
+
+
+
+
+

DockerHub で docker build のオプションを設定したい

+

+ Posted on Tue 27 September 2016 in blog + + • Tagged with + docker, dockerhub +

+
+
+
+

参考リポジトリ

+
    +
  • https://github.com/hitsumabushi/docker-phpipam
  • +
+

目的

+
    +
  • Dockerfile の中で、 ARGを使いたい。
      +
    • LABEL としてビルドした日付や、 VCSのリビジョンを入れたい
    • +
    • ソフトウェアのバージョンをARGで指定したい
    • +
    +
  • +
+

やること

+
    +
  1. Dockerfile と同じ場所に、 hook ディレクトリを作成する。
  2. +
  3. hook ディレクトリ以下に、 build というファイルを作成する。
      +
    • build には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。
    • +
    • 自分で docker build …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi3.html b/author/hitsumabushi3.html new file mode 100644 index 00000000..4787d78f --- /dev/null +++ b/author/hitsumabushi3.html @@ -0,0 +1,509 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

GnuPGのメモ @ Debian Sid

+

+ Posted on Tue 12 July 2016 in blog + + • Tagged with + gpg, debian +

+
+
+
+

Debain での GnuPG

+

GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。
+Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。
+普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。
+以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思っ …

+
+ + Continue reading + +
+
+
+
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+
+
+
+

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + + • Tagged with + debian, apt, s3 +

+
+
+
+

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバ …
+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読 …

+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

資料

+ +

NSX におけるVXLAN

+

関係する要素

+
    +
  • 論理スイッチ
  • +
  • 分散論理ルータ
  • +
  • 論理ルータコントロール …
+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

資料

+

最も公式っぽい資料

+ +

ブログ : シリーズものは一通り目を通した方が良い

+
+
+ + Continue reading + +
+
+
+
+
+

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系 …

+
+ + Continue reading + +
+
+
+
+
+

会社にslack入ったので、色々やってた

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + slack, hubot +

+
+
+
+

勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。

+

現在のチャンネル構成

+
    +
  • 定常系
      +
    • 分報用のチャンネル。個々人が作る
    • +
    • 部署用
    • +
    • チーム用
    • +
    • プロジェクト用
    • +
    +
  • +
  • 雑多な情報共有用
      +
    • ニュース用
    • +
    +
  • +
  • トラブル用
  • +
  • その他
      +
    • 臨時に必要になるとか
    • +
    • テストとか
    • +
    +
  • +
+

やったことメモ

+

RSS を Slack に移行

+

live dwango reader をずっと使っていたのだけど、更新頻度が …

+
+ + Continue reading + +
+
+
+
+
+

Anisble for Windows

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + ansible, windows +

+
+
+
+

久しぶりに ansible で windows を操作するので、メモ。
+実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。
+ansibleは2.1.0を使っている。

+

やること

+

以下を anisble で実行する。

+
    +
  1. Windows Update
  2. +
  3. Windows Server 2012 R2 に AD をインストール
  4. +
  5. ADに適当なダミーエントリを突っ込む
  6. +
+

初期設定

+

ansible 実行サーバーの準備

+

winrm経由で実行することになるので、 pywinrm が必要。

+
# pip install ansible pywinrm
+
+

Inventory

+
[windows_server …
+
+ + Continue reading + +
+
+
+
+
+

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + + • Tagged with + vyos, YAMAHA, NIFTY +

+
+
+
+

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi4.html b/author/hitsumabushi4.html new file mode 100644 index 00000000..49849d6f --- /dev/null +++ b/author/hitsumabushi4.html @@ -0,0 +1,471 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

久しぶりにGitHub Pagesのjekyll触ったので、メモ

+

+ Posted on Fri 25 March 2016 in blog + + • Tagged with + jekyll, github +

+
+
+
+

このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、
+昔とだいぶ状況も変わっていそうだったので、メモをしておく。

+

gem

+

とりあえず、Gemfileを用意して、以下の2行を書く

+
source 'https://rubygems.org'
+gem 'github-pages'
+
+

全体的なconfig

+

GFMを使う

+

ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、_config.ymlに以下を追加しておいた方が良さそう。

+
markdown: kramdown
+kramdown:
+  input: GFM
+
+

related post …

+
+ + Continue reading + +
+
+
+
+
+

Travis コマンドでのエラー

+

+ Posted on Sat 02 January 2016 in blog + + • Tagged with + travis +

+
+
+
+

Travis CIでCIする素振りをしていたら、最新版のtravisコマンドでエラーが出るようになった。

+

発生した問題

+
$ travis setup releases
+Invalid scheme format: git@github.com
+for a full error report, run travis report
+
+

問題の解析

+

こういう時には、

+
$ travis report
+
+

をして、スタックトレースを見るものらしい。

+
$ travis report
+System
+Ruby:                     Ruby 2.3.0-p0
+Operating System:         Mac OS X 10.11.2
+RubyGems:                 RubyGems 2.5.1
+
+CLI
+Version:                  1.8.0
+Plugins:                  none
+Auto-Completion:          yes
+Last Version Check:       2016-01-02 14:54:05 +0900
+
+Session
+API Endpoint:             https://api.travis-ci.org/
+Logged In:                as "<username>"
+Verify SSL:               yes
+Enterprise:               no
+
+Endpoints
+org …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 6.0 でのHA機能のエンハンスの要点

+

+ Posted on Tue 08 December 2015 in blog + + • Tagged with + VMware, vSphere +

+
+
+
+

まとめ

+
    +
  1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。
  2. +
  3. vCenterは watchdogs によりプロセス落下時には再起動される
  4. +
  5. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある
  6. +
+

資料

+
    +
  1. VMware vSphere 6 のドキュメント
    +
  2. +
  3. http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf
  4. +
  5. vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)
  6. +
+

vSphere 5.5 までの …

+
+ + Continue reading + +
+
+
+
+
+

最近の仕事の振り返り

+

+ Posted on Sat 31 October 2015 in blog + + +

+
+
+

最近、仕事のやり方について考えている(悩んでいるに近いかも)ことが多いので、
+頭の中を整理するために、文章にしてみようと思う。

+

なので、技術的な内容は一切ない。

+ +

目次

+
    +
  1. スケジュール調整と突発案件
  2. +
  3. エンジニアの成長パス
  4. +
  5. 愚痴とポエム
  6. +
+

スケジュール調整と突発案件

+

前置き

+

どんな仕事にも突発的な仕事は大なり小なりあると思う。
+自分としては精神 …

+
+ + Continue reading + +
+
+
+
+
+

Dockerの細々としたメモ

+

+ Posted on Tue 15 September 2015 in blog + + • Tagged with + docker, debian +

+
+
+

Debian で利用する際のメモを書いておく。

+ +

grub でのカーネルパラメータ

+
    +
  1. systemd を利用する設定
  2. +
  3. cgroups で、メモリに制限をかけるための設定
  4. +
+
# quiet はあってもなくても良い
+GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

cgroups まわり

+

cgroups のディレクトリ配下に設定がある

+
/sys/fs/cgroup/cpu,cpuacct/docker/
+
+

network

+

参考: Dockerのネットワーク管理とnetnsの関係

+

docker コンテナを1つ立ち上げるごとに、vethデバイスができる …

+
+ + Continue reading + +
+
+
+
+
+

VM Resource Allocation

+

+ Posted on Sun 26 July 2015 in blog + + • Tagged with + math, papers, 論文 +

+
+
+

資料

+
+
+
+
+
+
+

Twitterからメールアドレス拾えるんじゃね?的な攻撃について

+

+ Posted on Fri 26 June 2015 in blog + + • Tagged with + security +

+
+
+

任意のTwitterアカウントの登録メールアドレス(伏せ字含)を表示させる攻撃が急増中(対策設定有り) というエントリが盛り上がっていたらしい。(とてもシェアされている)
+ただ、自分には有用な攻撃シナリオには見えなかったので、考えを整理するために書いておきます。
+自分はセキュリティ素人なので、間違った考察かもしれません。

+ +

リンク先ブログの主張 …

+
+ + Continue reading + +
+
+
+
+
+

runCをDebianで実行する

+

+ Posted on Tue 23 June 2015 in blog + + • Tagged with + runc, debian +

+
+
+

opencontainers/runc を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。

+ +

runCのインストール

+

golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。

+
git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc
+cd $GOPATH/src/github.com/opencontainers/runc/
+make
+sudo make install
+
+

状況

+

ディレクトリ構成

+
.
+├── container.json (とりあえず、runc spec で生成されるもので …
+
+ + Continue reading + +
+
+
+
+
+

Windowsの勉強を始めた

+

+ Posted on Mon 15 June 2015 in blog + + • Tagged with + Windows +

+
+
+

人生で初めて、Windowsの勉強を始めた。
+進捗は以下のgithub pagesから確認できる。
+とりあえず、章立てを書いて、内容を徐々に埋めているところ。

+ +

内容の誤りやコメントなどあれば、githubのissueで欲しい。

+
+
+
+
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi5.html b/author/hitsumabushi5.html new file mode 100644 index 00000000..0680aa7c --- /dev/null +++ b/author/hitsumabushi5.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

WindowsをAnsibleで設定する

+

+ Posted on Thu 28 May 2015 in blog + + • Tagged with + Windows, ansible +

+
+
+
+

資料

+

Windows Support — Ansible Documentation

+

マシンの準備

+

ansibleコマンドを実行するマシン

+

ansibleがすでに実行できる状況であれば、

+
pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm
+pip install kerberos # AD accountを使う場合
+
+

とすればOK。

+

Windowsマシン

+

要件

+
    +
  1. WinRM がインストール済み
  2. +
  3. PowerShell version > 3.0
  4. +
  5. 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる
  6. +
  7. Windows Server 2012ははじめからPowershell 4.0がインストールされている
  8. +
+

セットアップ方法

+
    +
  1. Powershell 3.0にアップデートが必要な場合 …
+
+ + Continue reading + +
+
+
+
+
+

Ravelloが便利

+

+ Posted on Sat 09 May 2015 in blog + + • Tagged with + ravello, VMware +

+
+
+
+

VMware環境のテストをしたい

+

会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。
+今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。
+あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、という …

+
+ + Continue reading + +
+
+
+
+
+

Xmonadの設定

+

+ Posted on Sun 05 April 2015 in blog + + • Tagged with + debian, xmonad +

+
+
+
+

資料

+
    +
  1. http://xmonad.org/documentation.html
  2. +
  3. Archlinux Wiki - Xmonad
  4. +
  5. Xmonad/Config archive/John Goerzen's Configuration
  6. +
  7. Xmonadの設定 1/3 「基本」編 - ナレッジエース
  8. +
+

環境

+

Debian Sid & Xfce4

+

Install and Initial Configure

+

Package install

+
# basic packages
+sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev
+# for adding launcher
+sudo apt-get install dmenu
+# for status bar
+sudo apt-get install xmobar
+# tools
+sudo apt-get install suckless-tools scrot tilda trayer
+
+

Xsession

+
    +
  1. +

    add /usr/share/xsessions/custom.desktop

    +
    [Desktop Entry]
    +Name=Xsession
    +Exec=/etc/X11/Xsession
    +
    +
  2. +
  3. +

    ${HOME}/.xsession

    +
    xmodmap ~/.Xmodmap
    +exec xmonad
    +
    +
  4. +
+

Edit config

+
import XMonad
+
+main = do
+xmonad $ defaultConfig
+
+

Set xmonad as the default window manager

+
$ sudo update-alternatives --config x-window-manager
+
+

デフォルトのキーボードショートカットは、man xmonadで見ることができる。
+とりあえず、Alt + Shift …

+
+ + Continue reading + +
+
+
+
+
+

Hatena Engineer Seminar #4に行ってきました

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + 勉強会 +

+
+
+
+

Intro

+

タイトルどおり、行ってきました。
+目当ては、mackerelの話だったんですが、思ったより他の話も面白かったです。
+今回は抽選だったし、参加できなかった人のためにも、メモと感想を書いておきます。
+序盤の話はTwitterでつぶやいているので、参考までに。(後半はPCの電源が死んだのでないです)

+

資料は見つけたら追加します。

+

開会の挨拶

+

はてなの東京オフィスが増床 …

+
+ + Continue reading + +
+
+
+
+
+

fioを使ったベンチマーク

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + fio, benchmark +

+
+
+
+

Intro

+

ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。
+今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。
+ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。

+

オプション

+

オプションの与え方

+

以下の2つが使える。

+
    +
  • コマンドラインオプション …
+
+ + Continue reading + +
+
+
+
+
+

Easter Egg Collections

+

+ Posted on Sat 07 February 2015 in blog + + • Tagged with + 遊び +

+
+
+

イースターエッグは、見つかるとよく話題に上がっているけど、
+実際にどんなものがあるのか、よく知らないなー、と思ったので集めようと思う。
+ただ、調べてみると、昔あったものがなくなってたりして、このリストも最新状態に保つ必要があるので、なくなってたら教えてほしいです。

+

とりあえずは、いろいろ見つけるたびに徐々に更新していきたいと思い …

+
+ + Continue reading + +
+
+
+
+
+

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + + • Tagged with + Algorithm, papers, 論文 +

+
+
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノー …
+
+ + Continue reading + +
+
+
+
+
+

CROSS 2015のアンカンファレンスで話しました

+

+ Posted on Sat 31 January 2015 in blog + + • Tagged with + 勉強会, 脆弱性 +

+
+
+

CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。
+スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。
+たぶんプレゼン作成時間30分くらい。

+ + +

書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。
+自分自身は何か情報系の教育を受 …

+
+ + Continue reading + +
+
+
+
+
+

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + + • Tagged with + CROSS, 勉強会, 運営 +

+
+
+
+

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋 …

+
+ + Continue reading + +
+
+
+
+
+

Dockerのプロキシ設定

+

+ Posted on Thu 29 January 2015 in blog + + • Tagged with + Docker, Debian +

+
+
+

自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。
+bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、
+あらためて考えると解決できた。

+

結論は、dockerのデーモンが起動すると …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi6.html b/author/hitsumabushi6.html new file mode 100644 index 00000000..ae26933a --- /dev/null +++ b/author/hitsumabushi6.html @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

DNS サーバーの比較資料集め

+

+ Posted on Mon 26 January 2015 in blog + + • Tagged with + DNS, Debian +

+
+
+

自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。
+DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。
+以下に、参考ページを列挙する。

+ +

参考になるページ

+

権威サーバ

+ +

キャッシュサーバ

+
+
+ + Continue reading + +
+
+
+
+
+

vShere Beta Program の注意点

+

+ Posted on Sun 25 January 2015 in blog + + • Tagged with + VMware +

+
+
+

VMware のBetaプログラムの利用について、基本的なルールがあるので、忘れないようにまとめた。
+ここに書いてあることは、オレオレ要約なので、きちんと自分で確認してください。

+

ざっくり言うと、「ここで知ったことは他で話すなよ」ってことでした。

+ +

資料

+ +

利用方法

+

上記ページから"Join Now!"して、規約に同意すれば良い。
+規約は以下の2つあるので、それぞれ同意 …

+
+ + Continue reading + +
+
+
+
+
+

VCP5-DCV取得した

+

+ Posted on Fri 16 January 2015 in blog + + • Tagged with + VMware, VCP +

+
+
+

最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。
+VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。

+ +

VCPトレーニングと試験内容のギャップ

+

トレーニングを受講しても、おそらく言われると思いますが、
+VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたこと …

+
+ + Continue reading + +
+
+
+
+
+

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + + • Tagged with + VMware, VCP, vDS +

+
+
+
+

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バイン …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+
+
+
+

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, VDP +

+
+
+
+

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる …
+
+ + Continue reading + +
+
+
+
+
+

ESXiをkickstartでインストールする

+

+ Posted on Tue 06 January 2015 in blog + + • Tagged with + VMware, ESXi +

+
+
+

ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。

+ +

利用OS

+
    +
  • ESXi 5.5
  • +
  • Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる)
  • +
+

DHCP, TFTP, HTTPサーバーの準備

+

必要なソフトウェアのインストール

+
apt-get install tftpd-hpa isc-dhcp-server xinetd apache2
+
+

DHCPサーバーの設定

+

BOOTPでインストールするため、あまり自由度がない。

+
+ +
+
+ + Continue reading + +
+
+
+
+
+

vCloud Airの価格感を調べる

+

+ Posted on Mon 05 January 2015 in blog + + • Tagged with + VMware, クラウド +

+
+
+
+

資料

+ +

vCloud Airとは

+

VMwareが提供している、ハイブリッドクラウドのサービス。

+

特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、
+vSphere Clientのプラグインと統合して操作ができることが挙げられる。

+

日本では、ソフトバンクと提携しているようだ

+

vCloud Air の価格感を調べる

+

大前提として、一般的なクラウドサービスと …

+
+ + Continue reading + +
+
+
+
+
+

2014年のまとめをしておかねば

+

+ Posted on Wed 31 December 2014 in blog + + • Tagged with + KPT +

+
+
+

今年1年は反省の多い年だったので、きちんと書いて残しておく。

+ +

2014年面白かった技術、触りたかったソフトウェア

+

新たに導入したもの

+
    +
  1. Ansible
  2. +
  3. Ceph
  4. +
  5. Pelican(このブログを生成してるやつ)
  6. +
  7. Flask
  8. +
+

ちょっとしか触れず...

+
    +
  1. VyOS
  2. +
  3. Consul
  4. +
  5. Fluentd
  6. +
  7. Golang
  8. +
  9. Docker
  10. +
  11. CoreOS
  12. +
  13. Hashicorpのツールその他
  14. +
  15. Hadoop
  16. +
+

触りたかったけど、触らず

+
    +
  1. Strom
  2. +
  3. Rust
  4. +
+

2014年のトピックス

+

思い返すと1月のこととかは何年も前に感じるが、今年は割と色々あっ …

+
+ + Continue reading + +
+
+
+
+
+

VCPの学習中のメモ

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VCP, VMware +

+
+
+

項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。
+特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。

+ +

VMware Data Recovery

+

資料

+ +

概要

+

デプロイ

+

OVF形式で提供されているので、OVF deployします。

+

動作

+

VMware vStorage API for Data Protectionを使って、バックアップを …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi7.html b/author/hitsumabushi7.html new file mode 100644 index 00000000..19798a3a --- /dev/null +++ b/author/hitsumabushi7.html @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+
+

VCP-DCV取得のために勉強していたところ、NPIVという用語が出てきたので、調べてみたことを書いておきます。

+ +

資料

+
+
+ + Continue reading + +
+
+
+
+
+

VCP-DCVの概要 : VCP550

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

資料

+

VCP-Data Center Virtualization
+受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。

+

VCP-DCVの概要

+

バージョン

+

VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。
+例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。

+

さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバ …

+
+ + Continue reading + +
+
+
+
+
+

fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編)

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + Ruby, Fluentd +

+
+
+

本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。
+ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。

+ +

基本情報

+
    +
  1. +

    lib/fluent/plugin/{TYPE}_{NAME}.rb 以下がプラグインの本体。

    +
      +
    • TYPE : in, out, buf,... etc
    • +
    • NAME : プラグインの名前
    • +
    +
  2. +
  3. +

    pluginを書く時のお約束

    +
      +
    • Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する
    • +
    • 設 …
+
+ + Continue reading + +
+
+
+
+
+

VMware 環境でのMACアドレス割当て

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

1. まとめ

+

vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、

+
    +
  1. vCenter環境でプレフィックス指定
  2. +
  3. 固定割当て
  4. +
+

といった方法を使いましょう

+

2. MACアドレスの割当て方式

+
    +
  1. vCenterによる自動割当て
      +
    1. VMware OUI
    2. +
    3. プレフィックスベース
    4. +
    5. 範囲ベース
    6. +
    +
  2. +
  3. vCenterに接続されていないESXiによる自動割当て
  4. +
  5. 手動での割当て
  6. +
+

vCenterによる自動割当て

+

設定の …

+
+ + Continue reading + +
+
+
+
+
+

ソースコードリーディングをするときにctagsを使いたい

+

+ Posted on Tue 16 December 2014 in blog + + • Tagged with + Emacs, Ruby +

+
+
+

きっかけ

+

とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。
+でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。
+そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、
+ぱっと見でわからず、いちいち時 …

+
+ + Continue reading + +
+
+
+
+
+

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + + • Tagged with + CI, drone.io, pelican +

+
+
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分が …

+
+ + Continue reading + +
+
+
+
+
+

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + + • Tagged with + consul, provisioning, cluster +

+
+
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス …
+
+ + Continue reading + +
+
+
+
+
+

vSphere API事始め

+

+ Posted on Thu 14 August 2014 in blog + + • Tagged with + VMware +

+
+
+

リファレンス

+
    +
  • https://www.vmware.com/support/developer/vc-sdk/
  • +
  • https:// "vcenter_ip" /mob/
  • +
+

参考サイト

+
    +
  • http://thinkit.co.jp/story/2010/06/23/1617
  • +
+

Overview

+

Types

+

4つのタイプがある。

+ + + + + + + + + + + + + + + + + + + + + + + + + +
vSphere APIの型普通のプログラミングとの類推
managed object typeプリミティブ型、複合型
data object type抽象データ型
enumerated type定数
Fault type例外型
+

1. Managed object types

+

Managed object typeとは

+

(サーバーサイドのオブジェクトモデルの基本的なデータを担っている。data objectも同じく。)
+managed objectには、大きく2つの種類が …

+
+ + Continue reading + +
+
+
+
+
+

IPv6のことを調べ始めた

+

+ Posted on Tue 12 August 2014 in blog + + • Tagged with + IPv6 +

+
+
+

IPv6 環境構築

+

ひとまず参照すべきRFC

+
    +
  • RFC3315(DHCPv6) とそれをupdateしているやつ
  • +
  • RFC4861(Neighbor DiscoveryのIPv6バージョン)
  • +
  • RFC5942(IPv6のsubnet model)
  • +
+

IPv6 アドレス配布方式について

+

全体としては、下記の4パターンある。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
アドレス配布方式RAは必要?RAにプレフィックス情報は必要?m-flago-flag配布できるもの
手動xx---
ステートレスアドレス自動設定(SLAAC)oooffoffプレフィックスのみ
ステートフルDHCPv6oo(たぶ …
+
+ + Continue reading + +
+
+
+
+
+

DebianにOzをインストールする

+

+ Posted on Sun 27 July 2014 in blog + + • Tagged with + Debian, CTMCP +

+
+
+

ガウディ本読みはじめた。

+ + +

困ったこと

+

この本で使われるOzという言語をDebian上で実行するのに、少し困った。
+morzart2をダウンロードして、適当にインストールしただけだと、
+emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。
+正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。

+

このために、必要なパッケージが …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi8.html b/author/hitsumabushi8.html new file mode 100644 index 00000000..6fe143e7 --- /dev/null +++ b/author/hitsumabushi8.html @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

[論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads

+

+ Posted on Thu 17 July 2014 in blog + + • Tagged with + Paper +

+
+
+
+

読んだもの

+

http://research.google.com/pubs/pub41179.html

+

主な内容

+
    +
  • 『2種類の異なるストレージ(フラッシュとディスク)を複数のワークロードで共用する』効率的な使い方を最適化問題への帰着
    + 使い方に2つの戦略があって、『FIFO or LRU』。
  • +
  • LRUの方がキャッシュヒットレート的には良いけど、メトリクスを取るのが複雑になりがちなので、FIFOで良いのでは。
  • +
  • 実システムでの計測結果
  • +
+

使われて …

+
+ + Continue reading + +
+
+
+
+
+

DebianでZNCを使って、快適なIRC生活を送る

+

+ Posted on Mon 09 June 2014 in blog + + • Tagged with + Debian +

+
+
+

やりたいこと

+

最近、自分の興味のあるソフトウェアのIRCによく引きこもっています。
+自宅のPCはつけっぱなしにしておけば、全部のログを見れるのですが、
+会社やスマホで見るときには、接続している間のことしか確認できず、若干もどかしいです。

+

そういうわけで、ZNCサーバーを立てて、IRCのログを出先からでも確認できるようにしましょう。

+

実現するこ …

+
+ + Continue reading + +
+
+
+
+
+

WebHDFSで詰まったこと

+

+ Posted on Sun 08 June 2014 in blog + + • Tagged with + Hadoop, WebHDFS +

+
+
+

困っていたこと

+

HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。
+ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。
+しかし、実際にやっているとうまくいかないケースがあった。

+
% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open"
+HTTP/1.1 307 TEMPORARY_REDIRECT …
+
+ + Continue reading + +
+
+
+
+
+

LEDバックライトの調整

+

+ Posted on Mon 02 June 2014 in blog + + • Tagged with + Debian, Linux +

+
+
+

ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。
+GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。

+

環境

+
    +
  • PC: ASUS 24A
  • +
  • OS: Linux(Debian sid amd64)
  • +
+

調整可能な範囲

+
  cat /sys/class/backlight/intel_backlight/max_brightness
+
+ +

ディスプレイの明るさ変更

+
  # 明るさを800にするとき
+  echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness
+
+
+
+
+
+
+

Perl の正規表現

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

マッチ演算子

+

評価の結果は真偽値としては、マッチすれば真、そうでなければ偽。 +and, or, ! が役立つのは間違いない。

+
+

$_ にマッチさせる

+
/regex/
+m:regex:
+
+
+
+

string にマッチさせる

+
string =~ /regex/
+string =~ m:regex:
+
+
+
+

$_ の文字列置換

+
s/regex/new/
+s:regex:new:
+
+
+
+

string の文字列置換

+
string =~ s/regex/new/
+string =~ s:regex:new:
+
+
+
+
+

特殊なメタキャラクタ

+
+

^, $

+
    +
  • 行頭、末尾にマッチ
  • +
+
+
+

.

+
    +
  • ニューライン以外の任意の文字にマッチ
  • +
+
+
+

[chars]

+
    +
  • chars に含まれる任意の1文字にマッチ …
+
+ + Continue reading + +
+
+
+
+
+

Perlスクリプトメモ

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考文献

+
    +
  1. Perl基礎文法最速マスター
  2. +
  3. ミニマル perl
  4. +
+
+
+

スクリプトを書く時

+
    +
  • プラグマ +
  • +
  • 推奨 : スクリプト先頭に書く
  • +
+
use strict;
+use warnings;
+
+
    +
  • 1文字でも減らしたい

    +
    +
      +
    • print のデフォルト引数は、 $_
    • +
    • print $_; したいだけなら書く必要ない。
    • +
    +
    +
  • +
+
+
+

用語

+
+

レコード

+
    +
  • 1つのまとまりとして読み書きされる文字の集合
  • +
  • 入出力の際、ファイルはレコードの集まりと見ることができる。 +この時、デフォルトでは …
+
+ + Continue reading + +
+
+
+
+
+

VPLSについてのメモ

+

+ Posted on Mon 06 January 2014 in blog + + • Tagged with + vpls +

+
+
+
+

What is VPLS

+
    +
  • Virtual Private LAN
  • +
  • MACフレームを、ルーターを含むネットワークを超えて、やり取りするための技術の1つ
  • +
  • +
    MPLSはIPにラベルをつけるが、VPLSはMACにラベルをつけるというイメージ
    +
      +
    • ラベルを使う理由としては、元々、経路計算を高速にしたかったはずだけど、今はそんなに気にしなくて良いっぽい
    • +
    +
    +
    +
  • +
+
+
+

Why VPLS

+

MPLSが便利なのと、同じ。

+
    +
  • VPN
  • +
  • +
    TE(Trafic Engineering)
    +
      +
    • 明示的な経路選択
    • +
    • 回線使用率か …
+
+ + Continue reading + +
+
+
+
+
+

便利なツール

+

+ Posted on Thu 02 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

POD

+
    +
  • Plain Old Documentation
  • +
  • man perldoc を参照
  • +
+
+
+

lwp-request

+
    +
  • Webサーバーにリクエストを送って、適当な形式に変換してくれる
  • +
  • GET, POST, PUT も選べる。
  • +
  • 出力形式としては、 text, ps, links, html, dump
  • +
+
lwp-request -o text www.example.com
+
+
+
+

Text::Autoformat

+
+
+

Text::Tabs

+
    +
  • タブをスペースに変換
  • +
+
+
+

String::Approx

+
    +
  • あいまいなマッチをする
  • +
+
+
+

Template-Toolkit

+
+
+

Lingua::En::Inflect 'PL_N'

+
    +
  • 単数形と複数形を変換してくれる
  • +
+
+
+
+
+
+
+
+

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + pxe, preseed, kickstart +

+
+
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立 …
+
+ + Continue reading + +
+
+
+
+
+

実UID, 実行UID

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + linux +

+
+
+

プロセスはいくつかのIDを持っている。 +あまり深く考えず、実UIDと実行UIDについて考える。

+
+

実UID(UID)

+
    +
  • 呼び出し元のプロセス(親プロセス)の実ユーザーID。
  • +
  • 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。
  • +
+
+
+

実効UID

+
    +
  • 呼び出し元のプロセス(親プロセス)の実効ユーザーID …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/author/hitsumabushi9.html b/author/hitsumabushi9.html new file mode 100644 index 00000000..53e0aa1c --- /dev/null +++ b/author/hitsumabushi9.html @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Posts by hitsumabushi: + + + + +
+ + + + + +
+
+

DNS サーバー

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + dns +

+
+
+

ニフティクラウド上でサーバーを立てた。 +いろいろと設定していこうかと思っているが、まずはDNSから始める。

+
+

作業内容

+

1. /etc/bind/named.conf.options +以下のように書き換える:

+
+// v6の設定: v6は応答しない
+// listen-on-v6 { any; };
+listen-on-v6 { none; };
+
+// transfer を許すIPを制限
+allow-transfer "192.168.100.1";
+
+

2. /etc/bind/named.conf.local +ゾーンの設定:

+
+zone "example.com" {
+   type master;
+   file "example.db";
+};
+zone "100.168.192.in-addr.arpa" {
+   type master;
+   file "192.rev"
+};
+
+
+
+
+
+
+
+
+

Perl のコンパイラオプション

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考ページ

+ +
+
+

基本的なオプション

+
+

-e

+
    +
  • ワンライナーを書くために必須。
  • +
  • 複数並べられるので、それなりに色々書ける
  • +
  • 直後にperlプログラムを書ける。
  • +
+
perl -e 'print 11/2'
+
+
+
+

-l[8進数]

+
    +
  • 行末に指定された8進数に変える。-l のみの場合、改行になる。
  • +
+
perl -e 'print 22'       #=> 22
+perl -l -e 'print 22'    #=> 22\n
+perl -l101 -e 'print 22' #=> 22A
+
+
+
+

-0[digits]

+
    +
  • -l の入力セパレータバージョン

    +
  • +
  • -00 とすれば、空行を区切 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/01/0237.html b/blog/2014/01/01/0237.html new file mode 100644 index 00000000..56a61457 --- /dev/null +++ b/blog/2014/01/01/0237.html @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Perl のコンパイラオプション + + + + +
+ + + +
+
+ +

Perl のコンパイラオプション

+

+ Posted on Wed 01 January 2014 in blog + +

+
+ + +
+ +
+
+

参考ページ

+ +
+
+

基本的なオプション

+
+

-e

+
    +
  • ワンライナーを書くために必須。
  • +
  • 複数並べられるので、それなりに色々書ける
  • +
  • 直後にperlプログラムを書ける。
  • +
+
perl -e 'print 11/2'
+
+
+
+

-l[8進数]

+
    +
  • 行末に指定された8進数に変える。-l のみの場合、改行になる。
  • +
+
perl -e 'print 22'       #=> 22
+perl -l -e 'print 22'    #=> 22\n
+perl -l101 -e 'print 22' #=> 22A
+
+
+
+

-0[digits]

+
    +
  • -l の入力セパレータバージョン

    +
  • +
  • -00 とすれば、空行を区切り。段落モード。

    +
    +
      +
    • $/ = "";
    • +
    +
    +
  • +
  • -777 とすればファイルごとの区切りになる。

    +
  • +
+
+
+
+

使い勝手の良いオプション

+
+

-n

+
    +
  • while (<>) { ...} の中にスクリプトを入れたと思って実行
  • +
+
+
+

-p

+
    +
  • -n みたいなもの。ただし、行($_)を出力する。
  • +
  • sed に似たやつ。
  • +
+
+
+

-a

+
    +
  • -n, -p と一緒に使用
  • +
  • $_ を自動的に改行で分割し、配列 @F に入れる
  • +
+
perl -ane 'print $F[0], "\n"' /etc/passwd
+
+
+
+

-F/pattern/

+
    +
  • -a の分割のデリミタを指定する
  • +
  • パターンは複数文字でも良い。そのときは、' ' または / / で囲む
  • +
+
perl -F':' -ane 'print $F[0],":",$F[2] ,"\n"' /etc/passwd
+
+
+
+

-i[拡張子]

+
    +
  • 拡張子がないとき、<>のファイルを直接編集する
  • +
  • 拡張子があるとき、<>の元ファイルは、拡張子をつけたファイルにバックアップされる。
  • +
  • $SECONDS を使うのがオススメ
  • +
+
perl -i.back -pe `s/foo/bar/g' sample.txt
+perl -i.$SECONDS -pe `s/foo/bar/g' sample.txt
+
+
+
+
+

デバッグに使えるオプション

+
+

-c

+
    +
  • スクリプトのシンタックスチェックのみ行う
  • +
+
+
+

-d[:debugger]

+
    +
  • debugger の下で走らせる
  • +
+
+
+

-w

+
    +
  • より多くの Warning を出す
  • +
+
+
+

-W (-X)

+
    +
  • すべての Warning を出す(出さない)
  • +
+
+
+ +
+
+
+

+ perl +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/01/0241.html b/blog/2014/01/01/0241.html new file mode 100644 index 00000000..beacd2c8 --- /dev/null +++ b/blog/2014/01/01/0241.html @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – DNS サーバー + + + + +
+ + + +
+
+ +

DNS サーバー

+

+ Posted on Wed 01 January 2014 in blog + +

+
+ + +
+ +
+

ニフティクラウド上でサーバーを立てた。 +いろいろと設定していこうかと思っているが、まずはDNSから始める。

+
+

作業内容

+

1. /etc/bind/named.conf.options +以下のように書き換える:

+
+// v6の設定: v6は応答しない
+// listen-on-v6 { any; };
+listen-on-v6 { none; };
+
+// transfer を許すIPを制限
+allow-transfer "192.168.100.1";
+
+

2. /etc/bind/named.conf.local +ゾーンの設定:

+
+zone "example.com" {
+   type master;
+   file "example.db";
+};
+zone "100.168.192.in-addr.arpa" {
+   type master;
+   file "192.rev"
+};
+
+
+ +
+
+
+

+ dns +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/01/0243.html b/blog/2014/01/01/0243.html new file mode 100644 index 00000000..691381c0 --- /dev/null +++ b/blog/2014/01/01/0243.html @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 実UID, 実行UID + + + + +
+ + + +
+
+ +

実UID, 実行UID

+

+ Posted on Wed 01 January 2014 in blog + +

+
+ + +
+ +
+

プロセスはいくつかのIDを持っている。 +あまり深く考えず、実UIDと実行UIDについて考える。

+
+

実UID(UID)

+
    +
  • 呼び出し元のプロセス(親プロセス)の実ユーザーID。
  • +
  • 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。
  • +
+
+
+

実効UID

+
    +
  • 呼び出し元のプロセス(親プロセス)の実効ユーザーID。
  • +
  • ファイルアクセスに影響。
  • +
  • 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。
  • +
  • ただし、SUID ビットがあるときは、それに従う。
  • +
+
+

SUID, SGID, スティッキービット

+
+
+
+

SUID, SGID

+
+
それぞれ setuid, setgidのこと。
+
まず、 SUID(SGID) ビットが立っているファイルについて見る。
+
+
$ ls -l
+-rwsr-xr-x 1 root root 51096 5月 26 2012 /usr/bin/passwd
+
+
+
このように、sというビットがユーザーパーミッションを表す部分(SGIDのときは、グループパーミッション部分)に立っている。
+
さて、パーミッションを見ると passwd はどんなユーザーでも実行できる。
+
実行した場合、実効UIDがファイルの所有ユーザーとして実行される。(SGIDビットが立っているときは、所有グループが実効GIDになる。)
+
この仕組みが必要な理由は、例えば、一般ユーザーが自身のパスワードを変更するために、/etc/shadow を書き換える必要がある。しかし、一般ユーザー権限では書き換えることができない。これを解決するためである。
+
+
+
SUID, SGID ビットの設定は以下のようにする。
+
+
# SUID ビットを立てる
+$ chmod 4770 foo
+# SGID ビットを立てる
+$ chmod 2770 bar
+
+# 別の方法として、 +sx を使う方法がある
+# SUID
+$ chmod u+sx foo
+# SGID
+$ chmod g+sx bar
+
+
+
+

スティッキービット

+
+
(元々は違うけど、)ディレクトリ配下のファイルの削除についての設定。
+
典型例は /tmp。
+
このディレクトリの持つ特徴を考えてみよう。
+
+
    +
  • 誰でもファイルを作成できる。
  • +
  • 自分の作ったファイルを削除できる。
  • +
+
+
ここまでであれば、
+
+
# /tmp : 誰でもファイルを作成できる
+$ sudo chmod 777 tmp
+
+# 試しに、適当なファイルを作成・削除できるか試す
+$ cd tmp
+$ touch user
+$ rm user
+
+# root ユーザーでもファイルを作成してみる
+$ sudo touch root
+
+
    +
  • 他のユーザーのファイルは一般ユーザーは削除できない。
  • +
+
# 先ほどの tmp ではこれが満たされていない
+$ rm root #=> 消える!!
+
+
+
これは当たり前で、tmp のパーミッションが 777。ディレクトリの write ができるということは、ファイルの新規作成・削除ができる。
+
では、 tmp はどのように実現すれば良いだろうか。
+
そんな時に、スティッキービットが役に立つ。
+
+
# スティッキービットを立てる
+$ sudo chmod 1777 ../tmp
+
+# 別の方法として、 +t を使う方法がある。
+$ sudo chmod a+rwxt ../tmp
+
+
+
スティッキービットをディレクトリに立てておくと、ファイルやディレクトリの所有者しか削除できなくなる。
+
+
+
+

まとめ

+
    +
  • 実効UID, 実効GID でファイルアクセスの管理がなされる
  • +
  • SUID, SGIDビットを使って、実行したユーザーと実効UID, 実効GID を変更できる。
  • +
  • スティッキービットを使えば、誰でも新規にファイルを作れるが、消すのは本人のみ、というディレクトリを作成できる。
  • +
+
+ + +
+
+
+

+ linux +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/01/0244.html b/blog/2014/01/01/0244.html new file mode 100644 index 00000000..60da1790 --- /dev/null +++ b/blog/2014/01/01/0244.html @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – PXEブートでインストーラを起動する + + + + +
+ + + +
+
+ +

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + +

+
+ + +
+ +
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立てておき、DebianまたはCentOSをインストールすることにします。
+
+ +
+

1. Debian Install

+
+
最初のDebianはCDやらで手動でインストールしてください。
+
Debianのインストール手順は省略します。
+
+
+
+

2. DHCPサーバーを立てる

+
# Install DHCP Server
+apt-get install isc-dhcp-server
+
+# Config DHCP : INTERFACES
+vi /etc/default/isc-dhcp-server
+# Modify INTERFACES="" to INTERFACES "eth1"
+
+# Config DHCP : Server setting
+vi /etc/dhcp/dhcpd.conf
+
+

編集する箇所は以下の通りです。

+

https://gist.github.com/10664868

+

DHCPサーバーを再起動して設定を反映させます。

+
# Restart DHCP Server
+/etc/init.d/isc-dhcp-server restart
+
+
+
+

3. TFTPサーバーを立てる

+

デフォルトで大丈夫でした。

+
# Install TFTP Server
+apt-get install tftpd-hpa
+
+
+
+

4. PXEブート用のイメージを準備する

+

以下のページから適当にnetbootイメージを選んで、netboot/netboot.tar.gzを取って来ます。

+ +
# 展開する
+tar xvf netboot.tar.gz
+# move files to root dir of TFTP
+mv ./* /srv/tftp
+
+
+
+

5. 中間チェック

+

この段階でPXEブートしてみると、Debianのインストーラが立ち上がるようになります。

+
+

ブート画面でOSを選択できるようにする

+
+
+
+

6. CentOSのインストーラを準備

+
    +
  1. mkdir -p /srv/tftp/centos/6.5/x86_64
  2. +
  3. CentOSのインストールDVDを持って来る
  4. +
  5. mount -o loop <CentOS install ISO> /media
  6. +
  7. +
    /media/images/pxeboot/にある次の2つのファイルを/srv/tftp/centos/6.5/x86_64/以下にコピーしてくる
    +
      +
    • initrd.img
    • +
    • vmlinuz
    • +
    +
    +
    +
  8. +
  9. umount /media
  10. +
+

ここで、Debianのインストーラたちも整理して、 +/srv/tftp/debian/7.4/amd64 以下にあるとします。:

+
+/srv/tftp/
+        |
+        |-debian/7.4/amd64/
+        |       |
+        |       |-boot-screens
+        |       |
+        |       |-initrd.gz
+        |       |
+        |       |-linux
+        |       |
+        |       |-pxelinux.0
+        |       |
+        |       |-pxelinux.cfg/default
+        |
+        |-centos/6.5/x86_64
+        |       |
+        |       |-initrd.img
+        |       |
+        |       |-vmlinuz
+        |
+        |-pxelinux.0 -(シンボリックリンク)-> debian/7.4/amd64/pxelinux.0
+        |
+        |-pxelinux.cfg -(シンボリックリンク)-> debian/7.4/amd64/pxelinux.cfg
+
+
+
+

7. メニューの作成

+

pxelinux.cfg/defaultの内容を以下のように編集します。 +後でもう少し修正します。 +最終形はGistにあがっているので、 そちらを見てください。

+
# D-I config version 2.0
+default debian/7.4/amd64/boot-screens/vesamenu.c32
+
+# Boot Menuに入りたい
+prompt 1
+timeout 300
+menu title - Boop Options Menu -
+
+label Debian-7.4
+menu label ^0 Debian 7.4
+#include debian/7.4/amd64/boot-screens/menu.cfg
+kernel debian/7.4/amd64/linux
+append priority=critical vga=788 initrd=debian/7.4/amd64/initrd.gz
+
+label CentOS-6.5
+menu label ^1 CentOS 6.5
+kernel centos/6.5/x86_64/vmlinuz
+append initrd=centos/6.5/x86_64/initrd.img
+
+
+

Debianインストールの自動化

+
+
ここまでで、PXEブートさえしていれば、複数のOSを選んでインストールできるようになりました。
+
いまのところの問題点としては、結局インストーラを起動した後は手作業になっていることです。
+
次は、PXEブートした後、放っておくと勝手にインストールが終わっているようにしましょう。
+
+
+
Debianの場合にこれを実現するには、preseedと呼ばれる設定ファイルを書けば良いです。
+
普通にインストールするときに色々な質問に答える必要があると思いますが、その答えを事前に書いておくものです。
+
ただ、preseedが読まれる前に、インストーラから質問される(インストールのタイプなど)ことがあるので、そのあたりはブート時のパラメータとして渡しましょう。
+
+
+
+
+

8. preseed ファイル作成

+
+
preseedファイルはかなり長いです。
+
昔はpreseedのドキュメントを読んでも、作るの大変だった印象があったのですが、コメント付きのpreseedの例がある ので、これを元に書いて行けば特に大きくは困らないです。
+
ただ、例に書かれていないのですが、GRUBの設定を追加しないといけないのはわかりづらいかも知れません。
+
preseedで細かく設定しようとすると大変なので、それはAnsibleなどインストール終わってからの自動化に入れる方針です。
+
+
+
今回はパーティションなどは全部インストーラに任せています。
+
パーティションを変える場合などは、コメントアウトされているところを変更してください。
+
+

https://gist.github.com/10664868 の preseed.cfgを参照。

+
+
+

9. pxelinux.cfg/default 書き換え

+
+
今書いたpreseedファイルを debian/7.4/preseed.cfg として配置したことにします。
+
ブートオプションなどを追加した pxelinux.cfg/default ファイルは以下のようになります。
+
+
+
あとでどうせCentOSも自動化するので、そちらもあわせてオプションをつけておきます。
+
+

https://gist.github.com/10664868 の defaultを参照。

+
+
+

10. Debianインストールのチェック

+
+
また実際にPXEブートしてみましょう。
+
Debianをメニューで選択すると、今度は勝手に画面が進んで行くと思います。
+
最後までインストールが終わり、勝手にリブートされてこれば、成功です。s
+
+
+

Cent OSインストールの自動化

+
+
+
+

11. httpサーバー作成

+
+
後でやるように、kickstartファイルはhttp経由で配ろうと思います。(TFTPでできないっぽかった)
+
なので、httpサーバーを予め立てておくことにします。
+
+
# apache install
+apt-get install apache2
+
+
+
+

12. CentOSイメージのマウント

+
mkdir -p /var/www/images/centos
+mount -o loop <CentOS install ISO> /var/www/images/centos
+
+
+
+

13. kickstartファイルの準備

+

kickstartファイルの詳細については、 +redhatのページ +が参考になります。というか、コレ見たら大体で書ける。

+

今回使っているkickstartfileは以下の通りです。

+

https://gist.github.com/10664868 の kickstart.cfgを参照。

+
+
+

14. kickstartファイルの配置

+
+
pxelinux.cfg/defaultファイルの内容に合わせて、kickstart.cfgを配置します。
+
今回は、apacheのドキュメントルート直下に置けば良いようにしました。
+
+
mv kickstart.cfg /var/www/
+
+
+
+

15. CentOSインストールのチェック

+
+
最後に、CentOSのインストールを確かめます。
+
実際にPXEブートして、CentOSをメニューで選択すると、勝手に画面が進んで行くと思います。
+
最後までインストールが終わり、勝手にリブートされてこれば、成功です。
+
+
+

もっと自動化できるけど...

+
+
今回は、インストールの自動化を行いました。
+
一応、インストールするOSの種類を選ぶところを手でやることにしましたが、普通はOSは一種類で良いか、MACアドレスでインストールするOSを分けてしまうのだと思います。
+
そうしておけば、OSの種類を選ぶところも自動化することができます。
+
自分としては、基本はDebianをインストールしたくて、たまにCentOSも選びたいという程度なので、ここまでで止めておきます。
+
+
+
機会があれば、preseedやkickstartでホスト依存な部分(例えば固定IPとか)を都度生成してインストールする方法も考えたいですね。
+
+
+
+

さらに読もうと思ってるサイト

+ +
+
+ +
+
+
+

+ pxe + preseed + kickstart +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/02/0240.html b/blog/2014/01/02/0240.html new file mode 100644 index 00000000..5825d650 --- /dev/null +++ b/blog/2014/01/02/0240.html @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 便利なツール + + + + +
+ + + +
+
+ +

便利なツール

+

+ Posted on Thu 02 January 2014 in blog + +

+
+ + +
+ +
+
+

POD

+
    +
  • Plain Old Documentation
  • +
  • man perldoc を参照
  • +
+
+
+

lwp-request

+
    +
  • Webサーバーにリクエストを送って、適当な形式に変換してくれる
  • +
  • GET, POST, PUT も選べる。
  • +
  • 出力形式としては、 text, ps, links, html, dump
  • +
+
lwp-request -o text www.example.com
+
+
+
+

Text::Autoformat

+
+
+

Text::Tabs

+
    +
  • タブをスペースに変換
  • +
+
+
+

String::Approx

+
    +
  • あいまいなマッチをする
  • +
+
+
+

Template-Toolkit

+
+
+

Lingua::En::Inflect 'PL_N'

+
    +
  • 単数形と複数形を変換してくれる
  • +
+
+ +
+
+
+

+ perl +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/06/0243.html b/blog/2014/01/06/0243.html new file mode 100644 index 00000000..df126c22 --- /dev/null +++ b/blog/2014/01/06/0243.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VPLSについてのメモ + + + + +
+ + + +
+
+ +

VPLSについてのメモ

+

+ Posted on Mon 06 January 2014 in blog + +

+
+ + +
+ +
+
+

What is VPLS

+
    +
  • Virtual Private LAN
  • +
  • MACフレームを、ルーターを含むネットワークを超えて、やり取りするための技術の1つ
  • +
  • +
    MPLSはIPにラベルをつけるが、VPLSはMACにラベルをつけるというイメージ
    +
      +
    • ラベルを使う理由としては、元々、経路計算を高速にしたかったはずだけど、今はそんなに気にしなくて良いっぽい
    • +
    +
    +
    +
  • +
+
+
+

Why VPLS

+

MPLSが便利なのと、同じ。

+
    +
  • VPN
  • +
  • +
    TE(Trafic Engineering)
    +
      +
    • 明示的な経路選択
    • +
    • 回線使用率から選択したり。
    • +
    • ループフリー&自由なネットワークトポロジー
    • +
    +
    +
    +
  • +
  • +
    障害検知&切り替え
    +
      +
    • FRR(Fast ReRoute)
    • +
    • 代替経路へ即座に切り替えが起こる
    • +
    • 1 sec以内で切り替えられるらしい
    • +
    +
    +
    +
  • +
+
+ + +
+
+
+

+ vpls +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/07/0238.html b/blog/2014/01/07/0238.html new file mode 100644 index 00000000..f3c5b769 --- /dev/null +++ b/blog/2014/01/07/0238.html @@ -0,0 +1,754 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Perlスクリプトメモ + + + + +
+ + + +
+
+ +

Perlスクリプトメモ

+

+ Posted on Tue 07 January 2014 in blog + +

+
+ + +
+ +
+
+

参考文献

+
    +
  1. Perl基礎文法最速マスター
  2. +
  3. ミニマル perl
  4. +
+
+
+

スクリプトを書く時

+
    +
  • プラグマ +
  • +
  • 推奨 : スクリプト先頭に書く
  • +
+
use strict;
+use warnings;
+
+
    +
  • 1文字でも減らしたい

    +
    +
      +
    • print のデフォルト引数は、 $_
    • +
    • print $_; したいだけなら書く必要ない。
    • +
    +
    +
  • +
+
+
+

用語

+
+

レコード

+
    +
  • 1つのまとまりとして読み書きされる文字の集合
  • +
  • 入出力の際、ファイルはレコードの集まりと見ることができる。 +この時、デフォルトでは、1行がレコード。
  • +
+
+
+

入力レコードセパレータ

+
    +
  • 入力レコードの終端区切りを表す文字、または文字シーケンス(文字の並び)。
  • +
  • Linuxとかでは、デフォルトではラインフィード。
  • +
  • Perl ではOS固有の入力レコードセパレータを n として、参照できる。
  • +
+
+
+

ニューライン

+
    +
  • n のこと。
  • +
  • OS固有の入力レコードセパレータ。
  • +
+
+
+

スイッチ引数

+
    +
  • -s オプション
  • +
  • 良い感じのコマンドラインオプションを取ることができる。
  • +
  • 引数の与え方で2つの方法がある。
  • +
+
-foo='test' #=> $foo == 'test'
+-foo        #=> $foo == true : -debugで、デバッグ用、みたい使う。
+
+
    +
  • スイッチ引数を任意にしているスクリプトでは、冒頭にour関数を使うのが良い。
  • +
+
our($foo);
+our($foo, $bar, ...);
+
+
+
+
+

真偽値

+

偽になるのは、次の3パターンある。

+
    +
  1. 数値
      +
    • 0 と同等な値
    • +
    +
  2. +
  3. 文字列
      +
    • null文字列
    • +
    • 0 を保持する文字列 ( '0' みたいな)
    • +
    +
  4. +
  5. 変数 : 値を持たない変数
      +
    • まだ設定されていない変数とか。定義されているかは、 defined を使うとわかる。
    • +
    +
  6. +
+
+
+

特別な文字列

+
+

$/, $\

+
    +
  • 入力,出力レコードセパレータを指定する
  • +
+
+
+

$.

+
    +
  • 今読んでいる入力レコードが何番目か、を表す

    +
  • +
  • 通常は行数

    +
  • +
  • コマンドラインオプションや$/で、入力レコードセパレータを指定したときは、行数じゃなくなる

    +
  • +
  • 複数のファイルを読んでいる場合、ファイルをまたいで番号付けらられる

    +
  • +
  • 以下のようにすることで、ファイルごとに $. の値をリセットできる

    +
    +
    # 各ファイル終了時にレコードカウンタの $. をリセット
    +eof and close ARGV
    +
    +
    +
  • +
+
+
+

$_

+
    +
  • 最後に読み込んだ入力レコード。
  • +
+
+
+

$"

+
    +
  • ダブルクォートで囲んだ配列の各要素の間に挿入される文字
  • +
  • デフォルトはスペース
  • +
+
+
+

$,

+
    +
  • print 文の2種類の特殊なフォーマット処理に利用

    +
    +
      +
    • print の引数を区切るコンマの代わりに出力で使用される
    • +
    • クォートされていない配列やハッシュの要素の区切り
    • +
    +
    +
  • +
  • デフォルトは空文字

    +
  • +
+
+
+

$&

+
    +
  • マッチした文字列の表示
  • +
+
+
+

$`

+
    +
  • マッチしたレコード中で最後のマッチの開始部分の前の部分、を保持
  • +
+
+
+

$'

+
    +
  • マッチしたレコード中で最後のマッチの末尾の後の部分、を保持
  • +
+
+
+

ARGV

+
    +
  • 現在の入力ソースのファイルハンドル。
  • +
  • 特にクローズのために使われる。
  • +
+
+
+

$ARGV

+
    +
  • n, p オプションや空の入力演算子を使用すると、ファイル名が格納される。
  • +
  • STDIN の時は、 - が表示される。
  • +
+
+
+

@ARGV

+
    +
  • n, p や入力演算子を使わないときに、自前でプログラムの引数にアクセスするために使う。
  • +
+
+
+

<>

+
+
+

\n

+
    +
  • OS 固有のレコードセパレータ
  • +
+
+
+
+

変数

+
+

$var : 変数

+
    +
  • 宣言と代入
  • +
+
my $var = 'aaa'
+
+
    +
  • '' と ""
      +
    • シングルクォートとダブルクォートの違いは、変数が展開されるかどうか。
    • +
    +
  • +
  • join (.), split, length, substr, index
  • +
+
+
+

@array : 配列

+
    +
  • 宣言と代入
  • +
+
my @array
+@array = (1,2,3)
+
+
    +
  • $array[0] などとして、各値を得る
  • +
  • $array[-2] というようにすれば、最後から2番目の意味
  • +
  • pop, push, shift, unshift も使える
  • +
  • 配列の大きさを得るのは、
  • +
+
$array_size = @array
+
+

などとする

+
+
+

%hash : ハッシュ

+
    +
  • 宣言と代入
  • +
+
my %hash; %hash = (a => 1, b => 2);
+
+
    +
  • $hash{a} などとして、各値を得る
  • +
  • keys, values, exists, delete
  • +
+
+
+
+

制御構文

+
+

if { ~ }

+
+
+

if { ~ } else { ~ }

+
+
+

if { ~ } elsif { ~ }

+
+
+

while ( 条件 ) { ~ }

+
+
+

for ( my $i =0 ; $i < 5 ; $i++ ) { ~ }

+
+
+

foreach my $field (@fields) { ~ }

+
    +
  • 配列の各要素に対して何かを行う
  • +
  • foreach は for のエイリアスらしい。
  • +
+
+
+
+

比較演算子

+
+

文字列比較

+
    +
  • $s eq $t
  • +
  • $s ne $t
  • +
  • $s lt $t
  • +
  • $s gt $t
  • +
  • $s le $t
  • +
  • $s ge $t
  • +
+
+
+
+

サブルーチン : 関数

+

他の言語との違いは、

+
    +
  • 引数を関数宣言に書かない
  • +
  • @_ を使って引数にアクセス
  • +
+
sub sub {
+  my ($num1, $num2) = @_;
+  my $result = $num1 - $num2;
+  return $result;
+}
+
+
+
+

BEGIN, END

+
+
入力の処理の前や後に、処理を行う。
+
BEGIN は、Usage の表示に使ったりする。
+
END は、全体の結果・統計の計算・表示に使ったりする。
+
+
BEGIN { statements; }
+
+END { statements; }
+
+
+
+

文字列修飾子

+

以下の2箇所で使える。

+
    +
  • ダブルクォート中の文字列
  • +
  • 置換後文字列フィールド
  • +
+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + +
文字列修飾子
修飾子効果
\U右側の文字列を、\E または文字列の末尾まで、大文字に変換
\u右側の文字を大文字に変換
\L右側の文字列を、\E または文字列の末尾まで、小文字に変換
\l右側の文字を小文字に変換
\E変換を終了
+
+
+

論理演算

+
+

and, or

+

and の方が or より優先度が高い。

+
$one or $two and $three
+# => $one or ( $two and $three )
+
+
+
+

!

+

論理否定。

+
+
+
+

関係演算子

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
関係演算子
数値文字列意味
==eq等しい
!=ne等しくない
>gtより大きい
>=ge以上
<ltより小さい
<=le以下
<=>cmp
+
比較
+
-1 : 左辺が小さい
+
0 : 等しい
+
1 : 左辺が大きい
+
+
+

以下は、組み込み関数

+
+
+

IOに関連する関数

+
+

print

+

STDOUT に出力する

+
+
+

printf

+
    +
  • print のニューラインなしバージョン : -l の影響を受けない
  • +
  • 他にもたくさん使い勝手が良い
  • +
+
+
+

warn

+

STDERR にメッセージを送る。

+
# 出力メッセージのあと、更にエラー行が付加される。
+warn "msg\n"
+# \n を入れると簡潔なエラーメッセージ : エラー行などを表示しない。
+warn "msg\n"
+print STRERR "a", "b"
+
+
+
+

die

+
+
STDERR にメッセージを送って、プロセスを終了する。
+
出力メッセージの形式は warn と同様。
+
デフォルトのエラーコードは255。
+
+
# BEGIN ブロックの外で
+die "$0 : msg\n"
+# BEGIN ブロックの中で
+$success or warn "msg\n" and exit 255;
+
+
+
+

close

+
+
ファイルハンドルを引数に取って、ファイルを閉じる。
+
+
close ARGV
+
+
+
+

eof

+
+
現在のファイルを最後まで読み込んだら、真を返す。
+
+
# 各ファイル終了時にレコードカウンタの $. をリセット
+eof and close ARGV
+
+
+
+

dbmopen, dbmclose

+
+
+

flock

+
+
+

format

+
+
+
+

文字列操作

+
+

chomp

+
+
+

chop

+
+
+

chr

+
+
+

crypt

+
+
+

hex

+
+
+

index

+
+
+

lc, lcfirst, uc, ucfirst

+
    +
  • それぞれ \L, \l, \U, \u
  • +
+
+
+

length

+
    +
  • 文字列の長さ
  • +
+
+
+

substr

+
    +
  • 文字列の切り出し
  • +
  • 添字は 0 から始まる
  • +
+
# 文字列先頭から、4文字目まで
+substr $_, 0, 3;
+
+
+
+
+

その他

+
+

defined

+
+
+

undef

+
+
+

dump

+
+
+

eval

+
+
+

formline

+
+
+

time, gmtime, localtime

+
+
+

local

+
+
+

pos

+
+
+

scalar

+
+
+

reset

+
+
+

system

+
+
+ +
+
+
+

+ perl +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/01/07/0239.html b/blog/2014/01/07/0239.html new file mode 100644 index 00000000..9c226f1a --- /dev/null +++ b/blog/2014/01/07/0239.html @@ -0,0 +1,896 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Perl の正規表現 + + + + +
+ + + +
+
+ +

Perl の正規表現

+

+ Posted on Tue 07 January 2014 in blog + +

+
+ + +
+ +
+
+

マッチ演算子

+

評価の結果は真偽値としては、マッチすれば真、そうでなければ偽。 +and, or, ! が役立つのは間違いない。

+
+

$_ にマッチさせる

+
/regex/
+m:regex:
+
+
+
+

string にマッチさせる

+
string =~ /regex/
+string =~ m:regex:
+
+
+
+

$_ の文字列置換

+
s/regex/new/
+s:regex:new:
+
+
+
+

string の文字列置換

+
string =~ s/regex/new/
+string =~ s:regex:new:
+
+
+
+
+

特殊なメタキャラクタ

+
+

^, $

+
    +
  • 行頭、末尾にマッチ
  • +
+
+
+

.

+
    +
  • ニューライン以外の任意の文字にマッチ
  • +
+
+
+

[chars]

+
    +
  • chars に含まれる任意の1文字にマッチ
  • +
  • chars 内のバックスラッシュ付き英数字以外のメタキャラクタは、リテラル扱い
  • +
+
+
+

[^ chars]

+
    +
  • chars に含まれない任意の1文字にマッチ
  • +
  • メタキャラクタの扱いは [chars] と同様
  • +
+
+
+

[char1-char2]

+
    +
  • char1char2 の間に入る任意の文字にマッチ
  • +
  • char1, char2 を含む。
  • +
+
+
+

$&

+
    +
  • 最後にマッチした内容を保持
  • +
  • 'Foo' =~ /^[A-Z]/ なら $& は F
  • +
+
+
+

\

+
    +
  • メタキャラクタに使ったり、エスケープに使う
  • +
+
+
+

\b

+
    +
  • 単語の区切りにマッチする
  • +
  • 'abc def' にマッチさせたいときに、'Zabc def' にマッチしないよう、'babc def' と書いておく。
  • +
  • アルファベットは、単語構成文字クラスなので、スペースや!は、b にマッチするが、Zはマッチしない。
  • +
+
+
+

\n

+
    +
  • ニューライン
  • +
+
+
+

\r

+
    +
  • キャリッジリターン文字
  • +
  • カーソルを行頭に戻す
  • +
+
+
+

\t

+
    +
  • タブ
  • +
+
+
+

\f

+
    +
  • フォームフィード
  • +
  • 改ページ
  • +
+
+
+

\e

+
    +
  • エスケープ文字
  • +
+
+
+

\NNN

+
    +
  • 8進数が NNN となる文字
  • +
  • 例えば、040 はスペース
  • +
+
+

備考

+

8進数や16進数を調べるには、man ascii

+
+
+
+

\xNN

+
    +
  • 16進数が NN となる文字
  • +
  • 例えば、x20 はスペース
  • +
+
+
+

\cX

+
    +
  • X によって表される制御文字
  • +
  • 例えば、 cC はCtrl-C
  • +
+
+
+

\Q, \E

+
    +
  • メタキャラクタを文字として見せたい部分を、\Q ... \E で囲む
  • +
+
+
+
+

POSIX の文字クラスとショートカットメタキャラクタ

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
文字クラスショートカットメタキャラクタ説明
[a-zA-Z0-9_]\w単語構成文字
[^a-zA-Z0-9_]\W非単語構成文字
[\040\t\r\n\cJ\cL]\s空白文字
[^\040\t\r\n\cJ\cL]\S非空白文字
[0-9]\d数字
[^0-9]\D数字以外の文字
+
+
+

マッチ修飾子

+

/RE/i や m%RE%xs, s/RE/new/e など、最後に修飾子をいくつかつけて、マッチングの動作を変更させることができる。

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
マッチ修飾子
修飾子説明
i
+
大文字小文字の違いを無視
+
+
x
+
拡張モード
+
REフィールドに空白文字とコメントを許す
+
+
s
+
シングルラインモード
+
. をニューラインにもマッチさせる
+
+
m
+
マルチラインモード
+
^, $ を文字列の絶対的な先頭、末尾でなく、ターゲット文字列中の行の先頭、末尾にマッチさせる
+
+
g
+
すべてのマッチを、スカラーコンテキストかリストコンテキストかによって、連続的もしくは集合的に返す
+
+
e
+
置換の時に使う。 new を Perl のコードとして評価して、RE にマッチしたものをその結果で置き換える。
+
+
+
+
+

その他の構文

+ ++++ + + + + + + + + + + + + + + + + + + + + + +
選択、グループ化、キャプチャ、後方参照
構文説明
X|Y|Z
+
X, Y, Zのいずれかにまっち
+
+
(X)
+
グループ化とキャプチャ
+
a(X|Y)bc や (XY)+ といった感じで使う
+
+
\1, \2, ...
+
後方参照。検索文字列フィールドで使用
+
+
$1, $2, ...
+
後方参照。検索文字列フィールド以外で使用
+
+
+
+
+

量指定子

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
量指定子
構文説明
X*
+
0回以上の繰り返し
+
+
X+
+
1回以上の繰り返し
+
+
X?
+
0 または 1回の出現
+
+
X{min, max}
+
min回以上max回以下の繰り返し
+
+
X{min, }
+
min回以上の繰り返し
+
+
X{count}
+
count回の繰り返し
+
+
X{, max}
+
max回以下の繰り返し
+
+
REP?
+
量指定子の直後に ? をつけると、最短マッチ
+
例えば、.*? という風な。
+
+
+

以下は、Perl で正規表現を扱うときのコツ

+
+
+

grep

+
+

grep -v

+
    +
  • +
    perl で grep -v のように、マッチしないものを表示させるのは、次のように行う。
    +
    +
    # 空行以外を表示
    +perl -wnl -e '/^$/ or print;' file
    +
    +
    +
    このように or を使うと便利。
    +
    +
  • +
+
+
+

grep -l

+
# foo にマッチするもののファイル名を表示
+# close することで、マッチした後は探索しない。
+perl -wnl -e '/\bfoo\b/ and print $ARGV and close ARGV;' file
+
+
+
+

カスケードフィルタ

+
    +
  • シェルで grep "regex1" file | grep "regex2" とやることに相当

    +
    +
    # foo という単語と bar という単語を含む行を見つける
    +perl -wnl -e '/\bfoo\b/ and /\bbar\b/ and print;' file
    +
    +
    +
  • +
+
+
+

コンテキスト表示

+
    +
  • 段落モード -00 と ファイルモード -0777 を上手く使う

    +
  • +
  • /regex/s も上手く使うと良い

    +
  • +
  • 行をまたがるマッチングを行うとき、間にどんな文字を許すか考える必要がある。ニューラインについて言えば、

    +
    +
      +
    • マッチ修飾子の s を使って . をニューラインにマッチさせる
    • +
    • [\t\n]+ や [_\s]+ というように、明示的に指定したり、[^aiueo]+ などを使う
    • +
    • s を使う
    • +
    +
    +
  • +
+
+
+
+

sed

+
+

置換のデリミタ

+
    +
  • 対応する括弧も使用可能

    +
    +
    s/.../.../
    +s|...|...|
    +s{...}{...}, s(...)(...)
    +
    +
    +
  • +
+
+
+

行指定置換, コンテキストアドレス

+
    +
  • sed では、次のように、置換の構文の前に、アドレスを指定して、置換する場所を制限できる。

    +
    +
    # 2行目のみ置換
    +2s/regex/new/g
    +# 2〜5行目のみ置換
    +2,5s/regex/new/g
    +# 行頭が fff の行について置換
    +/^fff/s/regex/new/g
    +
    +
    +
  • +
  • これを Perl では、行数に関する条件式で書く必要がある

    +
    +
    # 2行目のみ置換
    +perl -wpl -e '$. == 2 and s/regex/new/g;' file
    +# 2〜5行目のみ置換
    +perl -wpl -e '2 <= $. and $. <= 5 and s/regex/new/g;' file
    +# 行頭が fff の行について置換
    +perl -wpl -e '/^fff/ and s/regex/new/g;' file
    +
    +
    +
  • +
+
+
+

後方参照

+
    +
  • sed では、キャプチャするときに、 ? を使えなかった。 Perl では、? を使える。

    +
  • +
  • sed では、どこでも 1, 2, ...で参照したが、Perlでは 1, 2, ... と $1, $2, ... とどこから参照するかによって異なる。

    +
    +
    # Mr か Mr. を見る
    +perl -wnl -e 's/(Mr.?) (Fo[oa])/$1 Bar $2/g;' file
    +
    +
    +
  • +
+
+
+

計算結果で置換

+
    +
  • sed では、置換文字列フィールドに計算結果を入れることが難しかった。(できるか知らない。)

    +
  • +
  • perl では、簡単にできる。マッチ修飾子の e が必要。

    +
    +
    perl -wnl -e 's/\d+/$& * 2.1/ge;' file
    +
    +
    +
  • +
+
+
+
+

AWK

+
+

フィールドアクセス

+
    +
  • AWK では、フィールドアクセスが便利

    +
    +
    # スペースorタブ区切りのフィールドの順番を入れ替える
    +awk '{ print $2, $1}' file
    +
    +
    +
  • +
  • Perl で似たようなことをやるには、2つ方法がある。

    +
      +
    1. コマンドラインオプション -a (と合わせて、-F)を使う

      +
    2. +
    3. 自分で各フィールドを変数に代入する

      +
      + ++++ + + + + + + + + + + + + + + + + + + +
      フィールドアクセス
      構文コメント
      ($A, $B)=@F;それぞれの変数にセット
      ($A, undef, $B)=@F;第2フィールドは変数に入れない
      $numfields=@F;レコードのフィールド数を格納
      +
      +
    4. +
    +
  • +
+
+
+

パターン範囲

+ +++++ + + + + + + + + + + + + + + + + + + +
パターン範囲
演算子構文コメント
..regex1 .. regex2
+
regex1を含む最初のレコードからregex2を含む最初のレコードまでの範囲
+
一旦regex1とregex2の組が見つかると次のregex1を見つけるまで、無視
+
regex1とregex2が同じレコードにある場合もマッチ。
+
+
...regex1 ... regex2
+
.. とほぼ同じ。
+
ただし、regex2はregex1の次の行以降から探す。
+
+
+
+
+
+

find

+
+

ファイル属性テスト

+ ++++ + + + + + + + + + + + + + + + + + + + + + +
ファイル属性テスト (○ は属性に対応する文字)
構文コメント
-○ filenamefilename が○という属性を有していることをテスト
! -○ filenamefilename が○という属性を有していないことをテスト
-○$_ が○という属性を有していることをテスト
! -○$_ が○という属性を有していないことをテスト
+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ファイル属性と対応する演算子
ファイル属性演算子
通常ファイル-f
ディレクトリ-d
シンボリックリンク-l
名前付きパイプ-p
キャラクタ-c
ブロック-b
ソケット-S
-z
空でない-s
実UID/GIDで読取り可-R
実UID/GIDで書込み可-W
実UID/GIDで実行可-X
実UIDが所有-O
実効UID/GIDで読取り可-r
実効UID/GIDで書込み可-w
実効UID/GIDで実行可-x
実効UIDが所有-o
指定のUID/GIDが所有stat
setuid-u
setgid-g
sticky-k
テキスト-T
バイナリ-B
別のファイルより新しいstat
別のファイルより後にアクセスされたstat
リンクの数stat
inode番号stat
+
+
+ +
+
+
+

+ perl +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/06/02/1631.html b/blog/2014/06/02/1631.html new file mode 100644 index 00000000..a711a87d --- /dev/null +++ b/blog/2014/06/02/1631.html @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – LEDバックライトの調整 + + + + +
+ + + +
+
+ +

LEDバックライトの調整

+

+ Posted on Mon 02 June 2014 in blog + +

+
+ + +
+ +
+

ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。
+GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。

+

環境

+
    +
  • PC: ASUS 24A
  • +
  • OS: Linux(Debian sid amd64)
  • +
+

調整可能な範囲

+
  cat /sys/class/backlight/intel_backlight/max_brightness
+
+ +

ディスプレイの明るさ変更

+
  # 明るさを800にするとき
+  echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness
+
+
+
+
+

+ Debian + Linux +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/06/08/1633.html b/blog/2014/06/08/1633.html new file mode 100644 index 00000000..51a40c59 --- /dev/null +++ b/blog/2014/06/08/1633.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – WebHDFSで詰まったこと + + + + +
+ + + +
+
+ +

WebHDFSで詰まったこと

+

+ Posted on Sun 08 June 2014 in blog + +

+
+ + +
+ +
+

困っていたこと

+

HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。
+ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。
+しかし、実際にやっているとうまくいかないケースがあった。

+
% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open"
+HTTP/1.1 307 TEMPORARY_REDIRECT
+Cache-Control: no-cache
+Expires: Mon, 02 Jun 2014 20:27:09 GMT
+Date: Mon, 02 Jun 2014 20:27:09 GMT
+Pragma: no-cache
+Expires: Mon, 02 Jun 2014 20:27:09 GMT
+Date: Mon, 02 Jun 2014 20:27:09 GMT
+Pragma: no-cache
+Content-Type: application/octet-stream
+Location: http://localhost:50075/webhdfs/v1/tmp/client.retry?op=OPEN&namenoderpcaddress=namenode:8020&offset=0
+Content-Length: 0
+Server: Jetty(6.1.26)
+
+ +

解決

+

これは簡単で、ホスト名の設定がおかしい。

+
   hostname
+   # => hostname.example.com
+
+ +

となるだけではダメで、

+
   hostname -f
+   # => (ダメな例)localhost
+   # => (正しい例)hostname.example.com
+
+ +

となるようにしないといけない。
+CentOS初めて使ったけど、ドメイン名がどこで決まるかとか、難しいな。

+
+
+
+

+ Hadoop + WebHDFS +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/06/09/1634.html b/blog/2014/06/09/1634.html new file mode 100644 index 00000000..c60451a2 --- /dev/null +++ b/blog/2014/06/09/1634.html @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – DebianでZNCを使って、快適なIRC生活を送る + + + + +
+ + + +
+
+ +

DebianでZNCを使って、快適なIRC生活を送る

+

+ Posted on Mon 09 June 2014 in blog + +

+
+ + +
+ +
+

やりたいこと

+

最近、自分の興味のあるソフトウェアのIRCによく引きこもっています。
+自宅のPCはつけっぱなしにしておけば、全部のログを見れるのですが、
+会社やスマホで見るときには、接続している間のことしか確認できず、若干もどかしいです。

+

そういうわけで、ZNCサーバーを立てて、IRCのログを出先からでも確認できるようにしましょう。

+

実現すること

+
    +
  • スマホからIRCのログを見る
  • +
+

作業環境

+
# lsb_release  -a
+No LSB modules are available.
+Distributor ID: Debian
+Description:  Debian GNU/Linux 7.5 (wheezy)
+Release:  7.5
+Codename: wheezy
+
+ +

インストール

+

色んなブログでは、build-depして自前でビルドするように書かれているが、今はパッケージがあるので、それを使おう。

+
$ sudo apt-get install znc
+
+ +

設定

+
    +
  1. +

    ユーザーの作成
    + zncを動かすユーザーを作成しておく。

    +
    $ useradd -d /home/znc -s /bin/bash -m znc
    +
    + +
  2. +
  3. +

    設定ファイルの作成
    + 適当に答えるだけです。
    + 設定値もモジュールも後からどうにでもなると思うので、気にしない。
    + webadminを入れて、webから設定をできるようにしておきます。

    +
    $ znc --makeconf
    +[ ** ] Building new config
    +[ ** ].
    +[ ** ] First let's start with some global settings...
    +[ ** ].
    +[ ?? ] What port would you like ZNC to listen on? (1025 to 65535): 6667
    +[ ?? ] Would you like ZNC to listen using SSL? (yes/no) [no]:.
    +[ ?? ] Would you like ZNC to listen using ipv6? (yes/no) [yes]: no
    +[ ?? ] Listen Host (Blank for all ips):.
    +[ ok ] Verifying the listener....
    +[ ** ].
    +[ ** ] -- Global Modules --
    +[ ** ].
    +[ ** ] +-----------+----------------------------------------------------------+
    +[ ** ] | Name      | Description                                              |
    +[ ** ] +-----------+----------------------------------------------------------+
    +[ ** ] | partyline | Internal channels and queries for users connected to znc |
    +[ ** ] | webadmin  | Web based administration module                          |
    +[ ** ] +-----------+----------------------------------------------------------+
    +[ ** ] And 13 other (uncommon) modules. You can enable those later.
    +[ ** ].
    +[ ?? ] Load global module <partyline>? (yes/no) [no]:.
    +[ ?? ] Load global module <webadmin>? (yes/no) [no]: yes 
    +[ ** ].
    +[ ** ] Now we need to set up a user...
    +[ ** ] ZNC needs one user per IRC network.
    +[ ** ].
    +[ ?? ] Username (AlphaNumeric): hitsumabushi
    +[ ?? ] Enter Password:.
    +[ ?? ] Confirm Password:.
    +[ ?? ] Would you like this user to be an admin? (yes/no) [yes]:.
    +[ ?? ] Nick [hitsumabushi]:.
    +[ ?? ] Alt Nick [hitsumabushi_]:.
    +[ ?? ] Ident [hitsumabushi]:.
    +[ ?? ] Real Name [Got ZNC?]: <name>
    +[ ?? ] Bind Host (optional):.
    +[ ?? ] Number of lines to buffer per channel [50]:.
    +[ ?? ] Would you like to keep buffers after replay? (yes/no) [no]:.
    +[ ?? ] Default channel modes [+stn]:.
    +[ ** ].
    +[ ** ] -- User Modules --
    +[ ** ].
    +[ ** ] +-------------+------------------------------------------------------------------------------------------------------------+
    +[ ** ] | Name        | Description                                                                                                |
    +[ ** ] +-------------+------------------------------------------------------------------------------------------------------------+
    +[ ** ] | admin       | Dynamic configuration of users/settings through IRC. Allows editing only yourself if you're not ZNC admin. |
    +[ ** ] | chansaver   | Keep config up-to-date when user joins/parts                                                               |
    +[ ** ] | keepnick    | Keep trying for your primary nick                                                                          |
    +[ ** ] | kickrejoin  | Autorejoin on kick                                                                                         |
    +[ ** ] | nickserv    | Auths you with NickServ                                                                                    |
    +[ ** ] | perform     | Keeps a list of commands to be executed when ZNC connects to IRC.                                          |
    +[ ** ] | simple_away | Auto away when last client disconnects                                                                     |
    +[ ** ] +-------------+------------------------------------------------------------------------------------------------------------+
    +[ ** ] And 36 other (uncommon) modules. You can enable those later.
    +[ ** ].
    +[ ?? ] Load module <admin>? (yes/no) [no]: yes
    +[ ?? ] Load module <chansaver>? (yes/no) [no]:.
    +[ ?? ] Load module <keepnick>? (yes/no) [no]:.
    +[ ?? ] Load module <kickrejoin>? (yes/no) [no]:.
    +[ ?? ] Load module <nickserv>? (yes/no) [no]: yes
    +[ ?? ] Load module <perform>? (yes/no) [no]:.
    +[ ?? ] Load module <simple_away>? (yes/no) [no]: yes
    +[ ** ].
    +[ ** ] -- IRC Servers --
    +[ ** ] Only add servers from the same IRC network.
    +[ ** ] If a server from the list can't be reached, another server will be used.
    +[ ** ].
    +[ ?? ] IRC server (host only): irc.freenode.net
    +[ ?? ] [irc.freenode.net] Port (1 to 65535) [6667]:.
    +[ ?? ] [irc.freenode.net] Password (probably empty):....
    +[ ?? ] Does this server use SSL? (yes/no) [no]:.
    +[ ** ].
    +[ ?? ] Would you like to add another server for this IRC network? (yes/no) [no]:.
    +[ ** ].
    +[ ** ] -- Channels --
    +[ ** ].
    +[ ?? ] Would you like to add a channel for ZNC to automatically join? (yes/no) [yes]:.
    +[ ?? ] Channel name: #ceph
    +[ ?? ] Would you like to add another channel? (yes/no) [no]:.
    +[ ** ].
    +[ ?? ] Would you like to set up another user (e.g. for connecting to another network)? (yes/no) [no]:.
    +[ ok ] Writing config [/home/znc/.znc/configs/znc.conf]....
    +[ ** ].
    +[ ** ] To connect to this ZNC you need to connect to it as your IRC server
    +[ ** ] using the port that you supplied.  You have to supply your login info
    +[ ** ] as the IRC server password like this: user:pass.
    +[ ** ].
    +[ ** ] Try something like this in your IRC client...
    +[ ** ] /server <znc_server_ip> 6667 hitsumabushi:<pass>
    +[ ** ] And this in your browser...
    +[ ** ] http://<znc_server_ip>:6667/
    +[ ** ].
    +[ ?? ] Launch ZNC now? (yes/no) [yes]:...
    +[ ok ] Opening Config [/home/znc/.znc/configs/znc.conf]....
    +[ ok ] Loading Global Module [webadmin]... [/usr/lib/znc/webadmin.so]
    +[ ok ] Binding to port [6667]....
    +[ ** ] Loading user [hitsumabushi]
    +[ ok ] Adding Server [irc.freenode.net 6667 ]....
    +[ ok ] Adding Server [irc.oftc.net 6667 ]....
    +[ ok ] Loading Module [admin]... [/usr/lib/znc/admin.so]
    +[ ok ] Loading Module [nickserv]... [/usr/lib/znc/nickserv.so]
    +[ ok ] Loading Module [simple_away]... [/usr/lib/znc/simple_away.so]
    +[ ok ] Forking into the background... [pid: 27494]
    +[ ** ] ZNC 0.206+deb2 - http://znc.in
    +
    + +
  4. +
  5. +

    Webからzncに接続する
    + ブラウザから http(s)://hostname:6667 にアクセスする
    + ログインして、List Users→Editを開いて、log モジュールにチェックを入れておくと、IRCのログを書いてくれる。

    +
  6. +
  7. +

    クライアントから接続する
    + xchatでやってみた。
    + SSLで接続する場合には、ネットワーク一覧の設定から、SSLで接続するように設定をし、SSL不正な証明書を受け入れるようにしておく必要がある。
    + 例として、zncサーバーが blog.hitsumabushi.org:6667, ユーザー名が oftc, パスワードが 123456 というユーザーで接続したことにすると、以下のようになる。
    +XChat

    +
  8. +
+

おわり

+

これで快適なIRC生活がおくれるぞ!

+
+
+
+

+ Debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/07/17/1635.html b/blog/2014/07/17/1635.html new file mode 100644 index 00000000..2c6937a6 --- /dev/null +++ b/blog/2014/07/17/1635.html @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – [論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads + + + + +
+ + + +
+
+ +

[論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads

+

+ Posted on Thu 17 July 2014 in blog + +

+
+ + +
+ + +
+ +

読んだもの

+

http://research.google.com/pubs/pub41179.html

+

主な内容

+
    +
  • 『2種類の異なるストレージ(フラッシュとディスク)を複数のワークロードで共用する』効率的な使い方を最適化問題への帰着
    + 使い方に2つの戦略があって、『FIFO or LRU』。
  • +
  • LRUの方がキャッシュヒットレート的には良いけど、メトリクスを取るのが複雑になりがちなので、FIFOで良いのでは。
  • +
  • 実システムでの計測結果
  • +
+

使われているシステム, 技術要素

+
    +
  • Clossus (GFSの改良版)
  • +
  • アルゴリズム: 貪欲法
  • +
+

大事なこと

+
    +
  • 最適化問題を特にあたって、ワークロード特性を表す関数を、convexで近似したことにすることがアイディアの1つ。
  • +
  • 理論としては、piecewise-linearでなくても良いが、実測では有限個の点しか取れないので、piecewise-linearとしておくと計算が楽になる。
  • +
  • 運用中もワークロード特性を測定してフィードバックすることで、特性の変化に対応することができる。
  • +
+

所感

+
    +
  • +

    よくまとまっているので、とても良い。

    +
  • +
  • +

    実際にこの論文と同じことを行う際には、現状のストレージをどういうふうに使っているかが問題になる。
    + GFSのようなマスターを持つ分散ストレージを使っているなら、この論文の内容は実践しやすい。
    + (もちろん、ワークロードのメトリクスを取るようにしたり、最適化問題を解くロジックを入れるなど、変更は必要。)

    +
  • +
  • 個人的にはマスターに色々聞かなくて済むような分散ストレージ(Cephとか)の方がアーキテクチャ的に好きなのだけど、
    + この論文を読むと、マスターがあったほうが均質じゃないシステムの制御は、扱いやすいように見える。
  • +
+
+
+
+

+ Paper +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/07/27/1637.html b/blog/2014/07/27/1637.html new file mode 100644 index 00000000..2ea37a44 --- /dev/null +++ b/blog/2014/07/27/1637.html @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – DebianにOzをインストールする + + + + +
+ + + +
+
+ +

DebianにOzをインストールする

+

+ Posted on Sun 27 July 2014 in blog + +

+
+ + +
+ +
+

ガウディ本読みはじめた。

+ + +

困ったこと

+

この本で使われるOzという言語をDebian上で実行するのに、少し困った。
+morzart2をダウンロードして、適当にインストールしただけだと、
+emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。
+正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。

+

このために、必要なパッケージがあるので、それを予めインストールしておくと良い。

+

インストール手順

+
    +
  1. 必要なパッケージをインストール
    sudo apt-get install tcl tk8.5
    +
    + +
  2. +
+

最初は、tk8.5ではなく、tkを指定して、tk8.6だけがインストールされていた。
+ この状況では、結果が表示されない。

+
    +
  1. morzart2のダウンロード
  2. +
+

以下のページからダウンロード。(Githubからでも良い)
+Source Forge

+
    +
  1. +

    morzart2の展開

    +
    tar xf "ダウンロードしたファイル"
    +
    + +
  2. +
  3. +

    実行

    +
    cd "展開したディレクトリ"
    +bin/oz
    +
    + +
  4. +
+

こんな感じ。
+必要ならパスを通しておくと良い。

+
+
+
+

+ Debian + CTMCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/08/12/1638.html b/blog/2014/08/12/1638.html new file mode 100644 index 00000000..ab9bad59 --- /dev/null +++ b/blog/2014/08/12/1638.html @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – IPv6のことを調べ始めた + + + + +
+ + + +
+
+ +

IPv6のことを調べ始めた

+

+ Posted on Tue 12 August 2014 in blog + +

+
+ + +
+ +
+

IPv6 環境構築

+

ひとまず参照すべきRFC

+
    +
  • RFC3315(DHCPv6) とそれをupdateしているやつ
  • +
  • RFC4861(Neighbor DiscoveryのIPv6バージョン)
  • +
  • RFC5942(IPv6のsubnet model)
  • +
+

IPv6 アドレス配布方式について

+

全体としては、下記の4パターンある。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
アドレス配布方式RAは必要?RAにプレフィックス情報は必要?m-flago-flag配布できるもの
手動xx---
ステートレスアドレス自動設定(SLAAC)oooffoffプレフィックスのみ
ステートフルDHCPv6oo(たぶん。)ononIPアドレスとDUIDの組, DNSなど
ステートレスDHCPv6oxoffonDNSなど
+

よく使われそうな、SLAACとステートフルDHCPv6には、以下のようなメリット・デメリットがある。

+ + + + + + + + + + + + + + + + + + + + +
方式メリットデメリット
SLAACルーター設定のみでOKIPを固定化しづらい
ステートフルDHCPv6DHCPDを立てる必要ありIP固定化できる。DNS情報もその気になれば配布できる
+
+
+
+

+ IPv6 +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/08/14/1639.html b/blog/2014/08/14/1639.html new file mode 100644 index 00000000..64e46b8a --- /dev/null +++ b/blog/2014/08/14/1639.html @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vSphere API事始め + + + + +
+ + + +
+
+ +

vSphere API事始め

+

+ Posted on Thu 14 August 2014 in blog + +

+
+ + +
+ +
+

リファレンス

+
    +
  • https://www.vmware.com/support/developer/vc-sdk/
  • +
  • https:// "vcenter_ip" /mob/
  • +
+

参考サイト

+
    +
  • http://thinkit.co.jp/story/2010/06/23/1617
  • +
+

Overview

+

Types

+

4つのタイプがある。

+ + + + + + + + + + + + + + + + + + + + + + + + + +
vSphere APIの型普通のプログラミングとの類推
managed object typeプリミティブ型、複合型
data object type抽象データ型
enumerated type定数
Fault type例外型
+

1. Managed object types

+

Managed object typeとは

+

(サーバーサイドのオブジェクトモデルの基本的なデータを担っている。data objectも同じく。)
+managed objectには、大きく2つの種類がある。

+
    +
  1. +

    ManagedEntity を拡張したもので、仮想コンポーネントのインベントリとして使われている。
    + "managed entities"と呼ばれることもある。

    +

    例えば以下のようなものがある。

    +
    | HostSystem     | ホストシステムのインスタンス |
    +| VirtualMachine | VM                     |
    +| Datastore      | データストア              |
    +
    + +
  2. +
  3. +

    システム全体のための、サービスを提供するもの。
    + 例えば、以下のもの。

    +
    | PerfomanceManager  | パフォーマンス管理         |
    +| LicenseManager     | VMware製品のライセンス管理 |
    +| VirtualDiskManager | 仮想ストレージの管理       |
    +
    + +
  4. +
+

Managed object typeの使い方

+

使いはじめるには、

+
    +
  1. connect : サーバーに接続
  2. +
  3. authenticate :認証を通す
  4. +
  5. session : セッションを得る
  6. +
+

というステップがある。

+

セッションを貼った後は、ServiceInstance という managed objectを得る。
+ServiceInstance の下には、 Data object typesがぶら下がっている。
+以下の図で、"MOR"というのは、 ManagedObjectRefarence の略で、
+これは、server-side object へのリファレンスを与えるdata objectである。

+

※図はvmwareのドキュメントから。

+

ServiceInstance_TopLevel_Figure
+凡例
+legend_figures

+

managed obejectは、property と operation(method)を持っている。

+

2. Data object types

+

Data object typeとは

+

Javaでいう抽象データ型や、C++でいうstructデータ型のようなもの。
+managed object typeが、プリミティブデータ型だったり、複合データ型だったりする。
+(vSphere API的な意味での、プリミティブデータ型は、 XML Schemeプリミティブで書かれている。例えば、xsd:string とか。)

+

※図はvmwareのドキュメント から。

+

ServiceInstance_AboutInfo_Detail

+

Data object typeの例

+ + + + + + + + + + + + + + + + + +
data object説明
AlarmInfoAlarmSpecから継承するプロパティ + ManagedObjectReference(Alarm managed objectへのリファレンス)
ManagedObjectReferenceMOR, reference, MoRefとか呼ばれる。server-side managed objectのリファレンス
+

3. Enumerated types (enumeration)

+

予め定義されている値や予め定義されたオブジェクトが保管されているオブジェクト。
+つまり、定数のように使われる。

+

| VirtualMachinePowerState | VMの起動状態を持っている。 poweredOff,poweredOn,suspended |

+

4. Fault types

+

サーバーによってあげられる例外。

+ + + + + + + + + + + + + + + + + +
Fault説明
NotSuported呼ばれたメソッドがサーバーでサポートされていなかったとき。vCetnerのメソッドをESXiで呼んだりとかの場合も。
NoPermissionclientユーザーの権限が足りないとき。権限が必要だった、MORを含んで返してくれる
+
+
+
+

+ VMware +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/11/01/0243.html b/blog/2014/11/01/0243.html new file mode 100644 index 00000000..d58af39d --- /dev/null +++ b/blog/2014/11/01/0243.html @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Consul 使ってみる + + + + +
+ + + +
+
+ +

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + +

+
+ + +
+ +
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス検出コンポーネントを使って、良くない状態のホストを迂回できる
    • +
    +
    +
  • +
  • Key/Value Store

    +
    +
      +
    • アプリケーションはConsulの階層的なKey/Valueストアを利用できる
    • +
    • 動的な設定変更や、フラグを立てたり、色々使える
    • +
    • HTTP APIで簡単に使える
    • +
    +
    +
  • +
  • Multi Datacenter

    +
    +
      +
    • リージョンのことは気にしなくても、Consulが上手いことやる
    • +
    • (複数のgpssipプールを持っている云々書いているので、LANとWANで変えているのだと思う)
    • +
    +
    +
  • +
+

ステータスの確認のためには、謎のキレイなWebUIもある。

+
+
+

個人的に良いと思っているところ

+
    +
  • DNSインターフェースでホストのIPを取得できるので、クラスター用のDNSサーバーのメンテナンスがいらないのが嬉しい
  • +
  • ホストの情報が散らばらずに、各サーバーで書かれている。それでいて、問い合わせは分散させられるのが嬉しい。
  • +
  • 一貫性は正義
  • +
+
+
+

登場するサーバー

+
    +
  • Agent

    +
    +
      +
    • Server or Client
    • +
    • HTTP, DNS, RPCのインターフェースを持ちうるやつ。 +(実際に、持つかどうかは、起動時のclientオプションで決まる)
    • +
    +
    +
  • +
  • Server

    +
    +
      +
    • クラスタ状況の管理
    • +
    • クライアントからのRPCへの応答
    • +
    • WAN側gossip, リモートデータセンターのリーダーへクエリ
    • +
    • クラスタ内ではそれほど多くなくて良いはず
    • +
    +
    +
  • +
  • Client

    +
    +
      +
    • サーバーにRPCを送ってアピール
    • +
    • (gossipプールへの参加に関することを除いて、)割とステートレス
    • +
    • 通信料もそんなに多くない
    • +
    • いくらでもいて良い
    • +
    +
    +
  • +
+
+
+
+

インストール

+

バイナリを持ってきて、パス通ってるとこに置く。

+

http://www.consul.io/downloads.html

+
+
+

起動方法

+
    +
  • Agentの起動
  • +
+
# server : serverオプションを指定
+# - clientオプションは、RPC, DNS, HTTPのためのもの
+# - bindオプションは、cluster情報のやりとりに使うっぽい
+# - dcはデータセンター名らしい
+# - nodeはホスト名
+# - bootstrapは最初の1つだけにつける。他は大体joinしとけば良い。
+consul agent -server -bootstrap -client=192.168.2.5 -dc=local \
+      -node=con -data-dir=/tmp/consul -bind=192.168.2.5
+
+# client
+# - joinオプションで、agentのアドレスを指定。何個か書けるらしい
+consul agent -dc=local -node=consul2 -data-dir=/tmp/consul2 \
+      -bind=192.168.39.6 -join=192.168.39.5
+
+
    +
  • Agentの再起動
  • +
+

Agentの再起動時には、 SIGHUP を送れば良い。

+
+
+

使い方

+
+

clusterからの情報を取得

+
    +
  • Consulメンバー
  • +
+
# 自分の胸に聞くときは、"-rpc-addr"は不要
+consul members
+# クラスタの外にいたりして、誰かに教えてもらうとき
+consul members -rpc-addr=192.168.2.5:8400
+
+
    +
  • HTTPインターフェース
  • +
+
# JSON形式で情報が返る
+curl 192.168.2.5:8500/v1/catalog/nodes
+
+
    +
  • DNS
  • +
+
# 聞く先は適当に。 anyリクエスト投げとけば良いと思う
+# <hostname>.node.consul (データセンターはlocalになる)という形式か、
+# <hostname>.node.<datacenter>.consul という形式で問い合わせ。
+dig @192.168.2.5 -p 8600 con.node.local.consul
+
+
+
+

Key/Valueストア

+
    +
  • put
  • +
+
curl -X PUT -d 'first object' 192.168.2.5:8500/v1/kv/namespaces/keyname
+
+# Check-And-Set : atomicなkey変更をするときに使うパラメータ
+# ModifyIndex の値を指定して更新できる。
+# まず、GETしてModifyIndexを見てPUTする、という操作をatomicにできる
+curl -X PUT -d 'first object' 192.168.2.5:8500/v1/kv/namespaces/keyname?cas=97
+
+
    +
  • get
  • +
+
curl -s 192.168.2.5:8500/v1/kv/namespaces/keyname
+# => jsonが改行もされず表示されて辛い気持ちになる
+curl -s 192.168.2.5:8500/v1/kv/namespaces/keyname | python -mjson.tool
+# => 見やすくしてくれる
+curl -s 192.168.2.5:8500/v1/kv/namespaces/?recurse
+# => 再帰的に見てくれる
+
+# index=101 : ModifyIndexが101より大きいものが帰ってくるまで聞き続ける
+# wait=5s などすれば、5秒までしか聞かない
+
+
+
+
+

もっとConsul

+
+

Service, Health Check を定義する

+
+
定義はjson形式で書く。
+
サービスを定義したいサーバーの例えば、/etc/consul.d/以下に
+
+
# /etc/consul.d/mysql.json : サービスを定義
+{"service": {"name": "mysql",  "tags": ["mysql", "db"],  "port": 3306}}
+
+# /etc/consul.d/ping.json : pingステータスをチェック
+{
+"check": {"name": "ping",  "script": "ping -c1 google.com >/dev/null",  "interval": "30s"}
+}
+
+# /etc/consul.d/web.json : サービスを定義しつつ、サービスレベルでヘルスチェック
+{"service": {"name": "web",  "tags": ["rails"],  "port": 80,
+"check": {"script": "curl localhost:80 >/dev/null 2>&1",  "interval": "30s"}}}
+
+

とか書いて、起動オプションに、 -config-dir=/etc/consul.d を加える。

+
+
+

Service, Halthの確認

+

他のサーバーから定義されたサービスやステータスを知りたい。

+
    +
  • DNS
  • +
+
+
NAME.service.consul or TAG.NAME.service.consul を使う。
+
さらに、SRVレコードを見れば、ポートもわかる
+
+
# Serviceを知る
+dig @127.0.0.1 -p 8600 mysql.service.consul SRV
+dig @127.0.0.1 -p 8600 db.mysql.service.consul SRV
+
+# Health Checkに失敗してるやつ
+dig @127.0.0.1 -p 8600 web.service.consul
+
+
    +
  • HTTP
  • +
+
# Serviceを知る
+curl -s http://192.168.2.5:8500/v1/catalog/service/mysql
+
+# Halth Checkに失敗してるやつ
+curl http://localhost:8500/v1/health/state/critical
+
+
+
+ + +
+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/15/2300.html b/blog/2014/12/15/2300.html new file mode 100644 index 00000000..c3777218 --- /dev/null +++ b/blog/2014/12/15/2300.html @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – drone.ioを使って、pelicanをビルドする + + + + +
+ + + +
+
+ +

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + +

+
+ + +
+ +
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分がのらなかったのです。
+pelicanは割と軽量っぽく見えたのと、reStructuredTextでもMarkdownでも書けるのが、自分には気楽だったから採用しました。

+

やり方

+
    +
  1. drone.io で New Project -> Github -> 適当なリポジトリを選ぶ
  2. +
  3. drone.io で Settings -> Repository -> View Key をクリックすると、SSH keyが表示される。
  4. +
  5. Githubの自分のリポジトリで、Settings -> Deploy keys に追加する
  6. +
  7. 後は、自分のビルドの設定をして、ビルドするなり、git pushするなりするだけ。
  8. +
+

困った...?と思ったこと

+
    +
  1. SSHキーがどこから見るのかわからなくて、git pushできないかと思って焦りました。
  2. +
  3. いい感じにgit pushするスクリプトがなかったので、変なデプロイ用のシェルを書くことになった。しかも、毎回 gh-pages にforce pushするという感じになってしまった。
  4. +
+

感想

+

まだテーマとかいじってないので、テーマをいじるかも。
+テーマいじらないとタグクラウドの設定ができないっぽいので。
+使ってみた感じ、割とブログには便利だと思うなー。

+
+
+
+

+ CI + drone.io + pelican +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/16/2000.html b/blog/2014/12/16/2000.html new file mode 100644 index 00000000..e37e35d0 --- /dev/null +++ b/blog/2014/12/16/2000.html @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – ソースコードリーディングをするときにctagsを使いたい + + + + +
+ + + +
+
+ +

ソースコードリーディングをするときにctagsを使いたい

+

+ Posted on Tue 16 December 2014 in blog + +

+
+ + +
+ +
+

きっかけ

+

とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。
+でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。
+そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、
+ぱっと見でわからず、いちいち時間がかかっていた感じです。

+

ソースコードを読む上で支援してくれるものがあったらなー、と思っていたら、タグをつけると良いと聞いたので、やってみます。

+

流れ

+

今回はmacでやることにします。
+brew がインストールしてあることにしています。

+
    +
  1. +

    Exuberant Ctagsのインストール

    +
    brew install ctags
    +
    + +
  2. +
  3. +

    tagの生成(Emacsから使うには、etagsと呼ばれる形式で生成)

    +
    # 読みたいソースのトップに移動
    +cd /home/me/app
    +# タグの生成 (Emacs の場合)
    +ctags -Re
    +# タグの生成 (Vim の場合)
    +ctags -R
    +
    + +
  4. +
  5. +

    コードリーディング

    +
      +
    1. +

      Emacs の場合

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      キー意味
      M-.ジャンプ(関数, クラス)
      C-u M-.次の検索
      C-u – M-.前の検索
      M-*元の場所
      +
    2. +
    3. +

      Vim の場合

      +

      いつも以下のサイトを参考にして生きている。

      +

      http://archiva.jp/web/tool/vim_ctags.html

      +
    4. +
    +
  6. +
+
+
+
+

+ Emacs + Ruby +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/17/1440.html b/blog/2014/12/17/1440.html new file mode 100644 index 00000000..807cc67e --- /dev/null +++ b/blog/2014/12/17/1440.html @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware 環境でのMACアドレス割当て + + + + +
+ + + +
+
+ +

VMware 環境でのMACアドレス割当て

+

+ Posted on Wed 17 December 2014 in blog + +

+
+ + +
+ + +
+ +

1. まとめ

+

vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、

+
    +
  1. vCenter環境でプレフィックス指定
  2. +
  3. 固定割当て
  4. +
+

といった方法を使いましょう

+

2. MACアドレスの割当て方式

+
    +
  1. vCenterによる自動割当て
      +
    1. VMware OUI
    2. +
    3. プレフィックスベース
    4. +
    5. 範囲ベース
    6. +
    +
  2. +
  3. vCenterに接続されていないESXiによる自動割当て
  4. +
  5. 手動での割当て
  6. +
+

vCenterによる自動割当て

+

設定の変更は、vSphere Web Clientから行うか、vpxd.cfgから行います。

+

VMware OUI

+

これがデフォルトの設定ですが、00:50:56:{XX}:{YY}:{ZZ} という割当てを行います。
+ただし、XX = {vCenterのid} + 0x80 で決めています。
+そういうわけで、XXはvCenterごとに固定なので、65536個だけ利用可能だということになります。

+

普通は、こんなにMACアドレスを使う前に、他の上限値(VM作成上限数やvCPU上限など)にぶち当たって悲しみを抱えるので、大丈夫だと思われます。
+複数のvCenterを利用している人は、vCenter間でIDがかぶっていないことは確認する必要があります。

+

この割当て方式では、00:50:56:80:{YY}:{ZZ} - 00:50:56:BF:{YY}:{ZZ} までの範囲が割当てられるので、見ればわかります。

+

以下が vpxd.cfgでの例です。

+
<vpxd>
+<macAllocScheme>
+<VMwareOUI>true</VMwareOUI>
+</macAllocScheme>
+</vpxd>
+
+

プレフィックスベース

+

5.1以降の環境では、デフォルトの00:50:56以外のプレフィックスを指定できます。
+また、個数が足りない時には LAA(ローカル管理アドレス)プレフィックスを使うこともできます。
+自分のOUIを使いたいときとか、複数vCenterがある時にLAA使う場合に使いそうです。

+

以下の設定は、00:50:26または、00:50:27から始まるMACアドレスを割当てる例です。

+
<vpxd>
+<macAllocScheme>
+<prefixScheme>
+<prefix>005026</prefix>
+<prefixLength>23</prefixLength>
+</prefixScheme>
+</macAllocScheme>
+</vpxd>
+
+

範囲ベース

+

開始と終了のMACアドレスを指定するものです。
+LAAの複数の範囲を指定できるので、便利かもしれません。

+

これも複数vCenterを使うときには、分割して使えるので便利だと思います。

+

たぶん、こっちの方が、後で拡張したいときには便利なので、(そんなことあるのか知らないけど、)自由に使えるMACアドレス数が少ない場合には、後で追加しやすくて便利だと思います。

+

以下が、範囲ベース割当ての例です。 range idは0から始まります。 以下の例では、00:50:67:00:00:01のみの範囲1つだけを利用する例です。

+
<vpxd>
+<macAllocScheme>
+<rangeScheme>
+<range id="0">
+  <begin>005067000001</begin>
+  <end>005067000001</end>
+</range>
+</rangeScheme>
+</macAllocScheme>
+</vpxd>
+
+

vCenterに接続されていないESXiにより自動割当て

+

これが利用されるのは、
+1. vCenterに接続されていない
+2. vmxファイルに、MACアドレスやMACアドレス割当てタイプが書かれていない
+場合です。

+

割当てられるMACアドレスは 00:0C:29 + {UUIDの最後の3オクテット} です。

+

固定割当て

+

デフォルトのOUIは 00:50:56 です。
+このOUIを利用する場合、上で見たように他の用途で使われる箇所は予約されています。そのため、 00:50:56:00:{YY}:{ZZ} - 00:50:56:3F:{YY}:{ZZ} のみが利用可能です。

+

これを利用するためには、以下を削除して、

+
ethernetN.generatedAddress
+ethernetN.addressType
+ethernetN.generatedAddressOffset
+
+

以下を記述します。

+
ethernetN.addressType = static
+ethernetN.address     = {MAC ADDRESS}
+
+

3. MACアドレスが足りなくなった時の動作

+

起動されるときに、MACアドレスが生成されます。
+基本的には、起動中のMACアドレスとの衝突しか検知しないので、仮想マシンを一時的に停止している場合、再起動したときに、たまにMACアドレスが変更されてしまうことがありえます。

+

4. 資料

+

vSphere ネットワークガイド
+- MACアドレスの管理

+
+
+
+

+ VMware + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/17/2345.html b/blog/2014/12/17/2345.html new file mode 100644 index 00000000..e59ec2d1 --- /dev/null +++ b/blog/2014/12/17/2345.html @@ -0,0 +1,405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編) + + + + +
+ + + +
+
+ +

fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編)

+

+ Posted on Wed 17 December 2014 in blog + +

+
+ + +
+ + +
+

本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。
+ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。

+ +

基本情報

+
    +
  1. +

    lib/fluent/plugin/{TYPE}_{NAME}.rb 以下がプラグインの本体。

    +
      +
    • TYPE : in, out, buf,... etc
    • +
    • NAME : プラグインの名前
    • +
    +
  2. +
  3. +

    pluginを書く時のお約束

    +
      +
    • Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する
    • +
    • 設定ファイル中で type hoge と書きたいなら、Fluent::Plugin.register_input('hoge', self) をクラス定義中に書く
    • +
    • config_param を使うと、インスタンス変数が宣言できる。(実装はまだ読めていない)
    • +
    +
  4. +
  5. +

    Fluentdの起動順序 : See docs.fluentd.org - plugin-development

    +
      +
    1. +

      Fluent::Supervisor#run_configure

      +
        +
      1. require
      2. +
      3. new
      4. +
      5. configure(conf)
      6. +
      +
    2. +
    3. +

      Fluent::Supervisor#run_engine

      +
        +
      1. start
      2. +
      3. shutdown
      4. +
      +
    4. +
    +
  6. +
+

fluentd-plugin-secure-forward を読み始める

+

準備

+

何はともあれ、クローンしてきます。

+
$ git clone https://github.com/tagomoris/fluent-plugin-secure-forward.git
+$ cd fluent-plugin-secure-forward
+
+

さて、ライブラリの本体は、以下の通りです。

+
$ ls lib/fluent/plugin/
+in_secure_forward.rb   input_session.rb       openssl_util.rb        out_secure_forward.rb  output_node.rb
+
+

これを見ると、

+
    +
  • in_secure_forward.rb
  • +
  • out_secure_forward.rb
  • +
+

があるので、このプラグインは、 input, outputについてプラグインを作っているようです。

+

in_secure_forward を読む

+

require & new

+

さっそく中を見てみます。

+
require 'fluent/mixin/config_placeholders'
+
+

これは、github.com/tagomoris/fluent-mixin-config-placeholdersを読んでいます。
+動作については、http://d.hatena.ne.jp/tagomoris/20120820/1345455837に書いてありますが、fluentdの設定ファイル中のプレースホルダ(${...}みたいなの)を展開した状態で、変数に格納してくれるものらしいです。

+

secure_forwardを使うときには、 self_hostname で自分のホスト名を宣言しますが、その時にhostnameコマンドの結果で定義したいのが人情というものなので、その時に使われていそうです。
+とりあえず、設定ファイル中の値を参照できることとして(configureメソッドのsuperが呼ばれてから参照できます)、次に進みます。

+
module Fluent
+  class SecureForwardInput < Input
+  end
+end
+
+

これはお約束みたいなやつで、Inputプラグインは、Fluentモジュールの、Inputを継承したクラスとして定義するようです。中身は後で定義されています。

+

先に進みます。

+
require_relative 'input_session'
+
+

これは暗号化するためのセッションを扱うものなので、後で考えます。

+
module Fluent
+  class SecureForwardInput < Input
+    DEFAULT_SECURE_LISTEN_PORT = 24284
+
+    Fluent::Plugin.register_input('secure_forward', self)
+
+    config_param :self_hostname, :string
+    include Fluent::Mixin::ConfigPlaceholders
+    ...
+
+

ここで大事そうなのは、 Fluent::Plugin.register_input('secure_forward', self)です。
+これを書いておくと、fluentd.conf(のinputセクション)で type secure_forward と書いたとき、このプラグインを使います。

+
    # Define `log` method for v0.10.42 or earlier
+    unless method_defined?(:log)
+      define_method("log") { $log }
+    end
+
+

昔はlogを出すときに$logと書いていたけども、今はlogと書く、という差を吸収するための設定みたいです。

+

configure

+
    def configure(conf)
+      super
+      ...
+      @clients.each do |client|
+        ...
+        @nodes.push({
+            address: source_addr,
+            shared_key: (client.shared_key || @shared_key),
+            users: (client.users ? client.users.split(',') : nil)
+          })
+      end
+
+      @generate_cert_common_name ||= @self_hostname
+      self.certificate
+      ...
+    end
+
+

最初の superで、fluent/mixin/config_placeholders を使って、hostnameのプレースホルダーを展開した値を参照できるようになりました。次に、@clients になにが入ってるかといえば、

+
    config_section :client, param_name: :clients do
+      config_param :host, :string, default: nil
+      config_param :network, :string, default: nil
+      config_param :shared_key, :string, default: nil
+      config_param :users, :string, default: nil # comma separated username list
+    end
+
+

というのがあるので、設定ファイル中 <client>セクションで定義している中身が入っていることになります。
+source_addrというのは、クライアントのアドレス、またはネットワークアドレスで、shared_keyとuserと一緒にpushしています。

+

self.certificateというのを見てみると、@certと@keyが宣言されていないとき、証明書とキーを生成して、@cert, @keyとして定義するものです。このときコモンネームは、@generate_cert_common_name ||= @self_hostnameから決まっているので、指定がないならホスト名になります。

+

start & shutdown

+

さて、configureは読んだので、実行時の挙動を調べます。

+
    def start
+      super
+      OpenSSL::Random.seed(File.read("/dev/urandom", 16))
+      @sessions = []
+      @sock = nil
+      @listener = Thread.new(&method(:run))
+    end
+
+    def shutdown
+      @listener.kill
+      @listener.join
+      @sessions.each{ |s| s.shutdown }
+      @sock.close
+    end
+
+

特に、変なところはないですが、@listener, @session の中身が気になるところです。早速 runの中身を見てみましょう。

+
    def run # sslsocket server thread
+      log.trace "setup for ssl sessions"
+      cert, key = self.certificate
+      ctx = OpenSSL::SSL::SSLContext.new
+      ctx.cert = cert
+      ctx.key = key
+
+      log.trace "start to listen", :bind => @bind, :port => @port
+      server = TCPServer.new(@bind, @port)
+      log.trace "starting SSL server", :bind => @bind, :port => @port
+      @sock = OpenSSL::SSL::SSLServer.new(server, ctx)
+      @sock.start_immediately = false
+      begin
+        log.trace "accepting sessions"
+        loop do
+          while socket = @sock.accept
+            log.trace "accept tcp connection (ssl session not established yet)"
+            @sessions.push Session.new(self, socket)
+
+            # cleanup closed session instance
+            @sessions.delete_if(&:closed?)
+            log.trace "session instances:", :all => @sessions.size, :closed => @sessions.select(&:closed?).size
+          end
+        end
+      rescue OpenSSL::SSL::SSLError => e
+        raise unless e.message.start_with?('SSL_accept SYSCALL') # signal trap on accept
+      end
+    end
+
+

あまりOpenSSL:SSL::SSLserverについて調べていないですが、パッと見、

+
    +
  1. 設定されている証明書, キーでSSLサーバーを立てて、loopで待ち続ける
  2. +
  3. テキトーなポート,バインドでリッスンする
  4. +
  5. TCPコネクションが確立されるごとに @sessions に格納していく (@sock.start_immediately = falseとしているので、SSLはまだハンドシェイクできてない)
  6. +
  7. セッションが切れるたびに、@sessionsから削除する
  8. +
+

という動作みたいです。特に3.について、なぜこの実装なのかはわかっていないです。
+あと、ここで @sessions.push Session.new(self, socket)という部分がありますが、ここのSessionは、input_session.rb で定義されているものです。
+こっちの方がこのプラグインの肝な感じですが、Fluentdのプラグインの作り方とはあまり関係ないので、見ないことにします。(最初にping pongをやって、それが終わってから、ソケットを読みにいってはon_messageを呼ぶ、みたいなことをしているみたいです)

+

とりあえず、以上でざっくりと Inputプラグインの中身がわかりました。

+

まとめ

+

Inputプラグインの場合は、

+
    +
  1. configure(config)
  2. +
  3. start
  4. +
  5. stop
  6. +
+

に集中して読み始めるとわかりやすいと思いました。
+その他は割と雑多なので、困った時に読めば良さそうです。

+

追記(2014-12-18)

+ + +
+
+
+

+ Ruby + Fluentd +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/30/0130.html b/blog/2014/12/30/0130.html new file mode 100644 index 00000000..8994ddef --- /dev/null +++ b/blog/2014/12/30/0130.html @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VCP-DCVの概要 : VCP550 + + + + +
+ + + +
+
+ +

VCP-DCVの概要 : VCP550

+

+ Posted on Tue 30 December 2014 in blog + +

+
+ + +
+ + +
+ +

資料

+

VCP-Data Center Virtualization
+受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。

+

VCP-DCVの概要

+

バージョン

+

VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。
+例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。

+

さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバージョンがあります。
+それが、VCP510, VCP550で、vSphereのマイナーバージョンレベルでの違いです。
+(他に前バージョンからのアップデート用試験もあります。Deltaみたいな感じで書かれていると、アップデート用試験です。)

+

有効期限

+

VCPの有効期限は、取得日から2年間です。

+

延長の方法は、3つあります。
+1. 同じ試験に合格する
+2. 上位試験に合格する
+3. 他の試験(例えば、VCP-Cloud)に合格する

+

必須条件

+

新しくVCP-DCVを取得しようとする場合、トレーニングを受講する必要があります。
+5種類のうち、対応するバージョンのものを、どれか1つ受講すれば良いですが、初心者向けの1.を受講することが多いようです。

+
    +
  1. VMware vSphere: Install, Configure, Manage [V5.x]
  2. +
  3. VMware vSphere: Fast Track [V5.x]
  4. +
  5. VMware vSphere: Optimize and Scale [V5.x]
  6. +
  7. VMware vSphere: Troubleshooting Workshop [V5.x]
  8. +
  9. vSphere with Operations Management: Fast Track [V5.x]
  10. +
+

ただし、日本で開催されているトレーニングは3つしかないようですが...。

+

試験内容

+

試験時間

+

120分
+(+非英語圏の人は、+30分? 聞いている話だと日本語で受験できるはずなので、受験してみて確認します)

+

問題数

+

135問

+

合格点

+

300/500点

+

試験勉強に役立つもの

+

pre-test

+

VMware Certification

+

vCenter5.5 + ESXi環境

+

実機検証が何より役立つと思う。
+あと5.5だとWeb Clientからしか使えない機能も増えているので、Web Clientを使っておいたほうが良いと予想している。

+

書籍

+

マスタリングVMware vSphere 5.5

+

個人的には、この本が一番良いと思っている。試験勉強中は、参照用に置いておくとはかどる。
+実務でも役立つこと請け合いなので、試験が終わっても、とりあえず手元に持っておくと便利。

+
+
+
+

+ VMware + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/30/0257.html b/blog/2014/12/30/0257.html new file mode 100644 index 00000000..d1127853 --- /dev/null +++ b/blog/2014/12/30/0257.html @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware環境でのNPIVについて + + + + +
+ + + +
+
+ +

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + +

+
+ + +
+ + +
+

VCP-DCV取得のために勉強していたところ、NPIVという用語が出てきたので、調べてみたことを書いておきます。

+ +

資料

+ +

まとめ

+
    +
  1. NPIV = N_Port ID Virtualization
  2. +
  3. NPIVとは、1つのHBAに対して複数のID(WWPN)を割り当てることで、1つのHBAポートを複数のHBAポートに見せる ための技術
  4. +
  5. VMware的には、RDMのディスクを持つ仮想マシンについて、 アクセス制御, QoSなどのために使われる
  6. +
  7. NPIVのしようとして、1ポートあたり255WWPNしか割り当てられない
  8. +
+

NPIVとは

+

FC環境の基本

+

FC環境では、各ノードはWWN(World Wide Name)を用いて識別されています。
+IPプロトコルで言うところの、IPアドレスと同様に、アクセス先を表したり、アクセス制限を行ったりする対象が、WWNになります。

+

このWWNは、
+- WWNN (World Wide Node Name)
+- WWPN (World Wide Port Name)
+という2種類で構成されています(が、便宜的なものなので、通常、区別する必要はないです)。
+その名の通り、WWNNはノード自身(例えば、HBAごと)に割り当てておき、WWPNはポート(例えば、HBAポートごと)に割り当てておきます。

+

NPIV

+

前述の通り、WWNベースでアクセス制限をすることになるのですが、例えば、1つのHBAポートを複数のマシンで共有している状況で、
+各マシンごとにアクセスできるLUN(LUNはWWNを持っています。)を変えたいと思うと、どうすれば良いのでしょうか。

+

NPIVは、1つのHBAポートに対して、最大255個のWWPNを割り当てる技術です。
+これを使って、各マシンごとにWWPNを割り当てることで、LUNからはきちんと個別のアクセス制御が行えることになります。

+

NPIVを使うには、スイッチ側とHBA側の両方で対応している必要があります。

+

VMware環境で利用する際の制限

+
    +
  1. スイッチ側でNPIVを有効化
  2. +
  3. ホストのHBAがNPIVをサポートしている
  4. +
  5. 利用できる仮想マシンは、RDMディスクを持つもののみ
  6. +
  7. 1台の仮想マシンに対して、最大4つの仮想ポートを割り当てられる(つまり、最大4つのWWPNが割り当てられる)
  8. +
+

通常の仮想マシンが利用するWWNは、ホストの物理HBAのWWNを利用します。

+
+
+
+

+ VMware + VCP + NPIV + Storage +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/30/0548.html b/blog/2014/12/30/0548.html new file mode 100644 index 00000000..b7e29b11 --- /dev/null +++ b/blog/2014/12/30/0548.html @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VCPの学習中のメモ + + + + +
+ + + +
+
+ +

VCPの学習中のメモ

+

+ Posted on Tue 30 December 2014 in blog + +

+
+ + +
+ + +
+

項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。
+特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。

+ +

VMware Data Recovery

+

資料

+ +

概要

+

デプロイ

+

OVF形式で提供されているので、OVF deployします。

+

動作

+

VMware vStorage API for Data Protectionを使って、バックアップを取得します。
+そのためVSSが利用でき、Windows 2003以降であれば、ファイルシステムの整合性を保つレベルでのスナップショットが取得できます。

+

また、データの重複排除(デデュープ)を行うため、そこそこのデータ削減が見込めます。

+

上限

+
    +
  • 保護VMは、100VM/1アプライアンス
  • +
  • 10アプライアンス/1vCenter
  • +
  • デデュープ ストアは、最大1TB
      +
    • CIFSのとき、500GB
    • +
    • VMDK, RDMのとき、1TB
    • +
    +
  • +
+

メモリ

+

資料

+

以下のブログ記事を見ておけば、万事解決です。

+ +

実際のメモリ情報の見方について、参考になります。

+ +

ESXiメモリ使用方法順

+

メモリの不足状況に応じて、以下の順番で各機能が利用されます。
+後のものほど、VMのパフォーマンスへの影響が大きいです。

+
    +
  1. TPS
  2. +
  3. バルーニング
  4. +
  5. メモリ圧縮
  6. +
  7. SSDホストキャッシュ
  8. +
  9. VMkernelスワッピング
  10. +
+

リソース管理/パフォーマンスに関係する機能

+
    +
  1. +

    TPS

    +

    透過的メモリ共有の機能。セキュリティ上の理由により、デフォルトでオフになります。
    +ホストマシンにおいて、仮想マシン間のメモリ内容が同じ時には、共通の物理メモリアドレスを参照させ、変更時にはCoWで行います。
    +これにより、物理メモリを節約することができます。ただ、ラージページが一般的になってきた最近のOSでは、それほど効果はありません。

    +

    TPSの設定は、ホスト単位で設定できますが、全VMで共有する以外にも、VMごとにシードを与えることで、同じシードを持つVMだけでTPSを有効にすることが可能です。

    +
  2. +
  3. +

    バルーニング

    +

    ESXiがVMに割り当てているメモリを回収するための技術です。
    +ESXiはVMにメモリを割り当てることはできますが、回収する方法があまりないため、ホストメモリが不足がちになってきたときにバルーニングを使います。

    +

    バルーニングのために使われるバルーンドライバ(vmmemctlドライバ)は、VMware Toolsに含まれており、ゲストOS内のプロセスとして常駐しています。

    +

    動作としては、ESXiから指示があった時、vmmemctlはゲストOS内でメモリを確保しようとします。
    +そうすると、ゲストOSはメモリをスワップアウトするなどして、vmmemctlへメモリを割り当てるので、割り当てられたメモリをESXiに渡すことができます。

    +
  4. +
  5. +

    メモリ圧縮

    +

    VMメモリ領域の一部を圧縮し、物理メモリの節約をする技術です。

    +

    圧縮前に圧縮率を計算し、50%以上であれば実施します。
    +圧縮したメモリ領域を使用する場合、解凍処理を行う必要があります。

    +
  6. +
  7. +

    SSDホストキャッシュ

    +

    vswapファイルをSSD上に作成して、ESXiのメモリが不足した時にSSD上にスワップアウトする機能です。
    +後述するスワッピング処理を高速にするための技術です。
    +通常は、vswapファイルはVMのディレクトリと同じディレクトリに作られ、高速でないこともありますが、
    +この機能を使うことで、スワップアウトを高速にすることができます。

    +
  8. +
  9. +

    VMkernelスワッピング

    +

    ESXiの物理メモリが不足した時に、各VMのメモリ(の一部または全て)を vswapファイルにスワップする機能です。

    +

    とにかくパフォーマンスが低下するため、パフォーマンストラブル時にもっとも気にする機能です。

    +
  10. +
+
+
+
+

+ VCP + VMware +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2014/12/31/1805.html b/blog/2014/12/31/1805.html new file mode 100644 index 00000000..7dbdceb7 --- /dev/null +++ b/blog/2014/12/31/1805.html @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 2014年のまとめをしておかねば + + + + +
+ + + +
+
+ +

2014年のまとめをしておかねば

+

+ Posted on Wed 31 December 2014 in blog + +

+
+ + +
+ + +
+

今年1年は反省の多い年だったので、きちんと書いて残しておく。

+ +

2014年面白かった技術、触りたかったソフトウェア

+

新たに導入したもの

+
    +
  1. Ansible
  2. +
  3. Ceph
  4. +
  5. Pelican(このブログを生成してるやつ)
  6. +
  7. Flask
  8. +
+

ちょっとしか触れず...

+
    +
  1. VyOS
  2. +
  3. Consul
  4. +
  5. Fluentd
  6. +
  7. Golang
  8. +
  9. Docker
  10. +
  11. CoreOS
  12. +
  13. Hashicorpのツールその他
  14. +
  15. Hadoop
  16. +
+

触りたかったけど、触らず

+
    +
  1. Strom
  2. +
  3. Rust
  4. +
+

2014年のトピックス

+

思い返すと1月のこととかは何年も前に感じるが、今年は割と色々あった。
+自分の中でトピックとして大きい出来事を中心に書いてみる

+
    +
  1. GGJに参加した
  2. +
  3. 配属されたこと
  4. +
  5. 仕事全般
  6. +
+

GGJに参加した

+

研修で滞在していた北海道で、Global Game Jamというイベントに参加した。
+作ったゲームはこれ。 http://www.kawaz.org/projects/weaver/

+

右も左もわからない状況で参加したが、3日間のなかにゲーム開発の流れがつまっていたと感じる。
+私が担当していたのはパーティクルつくるのとレベルデザインの一部だけだけど、レベルデザインは奥が深くて面白かった。
+ユーザーに対して、いかに自然にギミックを伝えるか、というデザインが非常に大事で、目から鱗だった。

+

こういうハッカソンに時々出ると、できないならできないで色々学ぶ事はあるし、できるようになればもっと楽しいと思うので、来年も時間を見つけて出たい。
+GGJについては、2014年は周囲の人の力を借りまくっただけなので、2015年はリベンジしたい。

+

配属とスクラム

+

4月に配属された。
+チームの人数は少ないけど、業務の"種類"が多くて(未だに戸惑うこともあるが)配属当初は戸惑っていた。
+誰が何をやっているかわからなかったし、何よりわからなかったのが、自分が今やっていることをどうやって共有すれば良いのか、がわからなかった。

+

良い機会だったので、チームでスクラムをやろうと思い、導入してみたが、最終的には中途半端になってしまった。

+

よかった点としては、朝会ができたことで、誰が何をやっているのか新鮮な情報がもらえ、割り込みが入った時でも状態がわかりやすくなったこと。
+うまくいかなかった原因としては、スクラムマスターをやっていた自分が、業務にかまけてしまったことで、イテレーションをきちんとまわせなかったことが大きい。
+他には、そもそも他のチームからの割り込みが多すぎて、バックログ消化できないとか、実質的なPMがいないことなどがあった。

+

若干スクラムっぽいのは、まわりのチームでも始まっているので、いろんな人と意見を交換しながら、徐々にチーム活動を改善していく予定。
+とりあえずは、カンバンのような、割り込みが多くても管理しやすい手法を、もう少し実践する。

+

仕事全般

+

自覚はあるが仕事自体が基本的に遅いこともあり、自分の時間を作ることができていなかった。
+プログラミングもインフラも初心者なので、もっと学習やOSSへ時間を確保したい。

+

gitの使い方とかスクラムはチームで広めるために、業務時間中に資料をまとめたので、
+そんな感じで、業務と自分のやりたいことをうまくミックスして、業務時間でも時間を確保しようと思う。

+

仕事納め以降、自分の気持ちが上向きになって、エンジニアリングにも良い影響が出ている。
+やはり去年までと比べても、今年触ったツールや技術は浅くなりがちだし、毎日を17時退社の気持ちで(18時退社になるように)仕事に臨もうと思う。

+

2015年に向けて

+

目標

+
    +
  1. fluentd + Consul(などのオーケストレーションツール) で設計したシステムを真面目に運用する
  2. +
  3. Golangで書いたライブラリを公開する
  4. +
  5. ConsulなどのOSSソフトウェアのソースを読んで、パッチを書く。マージしてもらえるように頑張る
  6. +
  7. 分散システムの論文を5本以上読む
  8. +
+
+
+
+

+ KPT +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/05/1735.html b/blog/2015/01/05/1735.html new file mode 100644 index 00000000..85405d96 --- /dev/null +++ b/blog/2015/01/05/1735.html @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vCloud Airの価格感を調べる + + + + +
+ + + +
+
+ +

vCloud Airの価格感を調べる

+

+ Posted on Mon 05 January 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+ +

vCloud Airとは

+

VMwareが提供している、ハイブリッドクラウドのサービス。

+

特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、
+vSphere Clientのプラグインと統合して操作ができることが挙げられる。

+

日本では、ソフトバンクと提携しているようだ

+

vCloud Air の価格感を調べる

+

大前提として、一般的なクラウドサービスと異なり、従量制ではない、というところは気をつけたい。

+

プラン

+

ざっくり3つのタイプがあるということらしい。
+前者2つがコンピュートリソース、つまり普通にサーバーなどを立てるために使うもの。
+3つ目は普段オンプレにあって、オンプレが災害などで落ちたときに使われるもの。

+
    +
  • Dedicated : 物理的に分離。いわゆる、物理専有タイプ。
  • +
  • Virtual Private : 論理的に分離。いわゆる、リソース専有タイプ
  • +
  • Disaster Recovery : 困った時にだけ起動するタイプ。
  • +
+

以下ではDRタイプのものを調べたい。

+

DRの価格帯系

+

VMware vCloud Air 価格ガイド を参考にすると良い。

+

DRの場合の契約期間は、1, 12, 24, 36ヶ月なので、それほど問題にならないと思う。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
サービス含まれるリソース価格 (月額)単価
プロセッサ、メモリ20GB vRAM, 10GHz CPU¥26,014¥1.78/GB/時
ストレージ&サポート1TB Storage¥30,503¥30.5/GB/月
帯域幅10Mbps¥26,359¥3.61/Mbps/時
グローバルIPアドレスIPアドレス単位 (含む 2 )¥5,756¥2,878 都度
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
オプション サービス
データプロテクション1TB¥49,495¥49.5/GB/月
ダイレクトコネクトポート1Gbps¥8,633¥11.83/Gbps/時
ダイレクトコネクトポート10Gbps¥28,776¥3.94/Gbps/時
オフラインデータ転送11TB One time Data Transfer¥28,776 都度¥28,776 都度
+

さすがに基本プランだと、あまり使えないので、だいたいオプションに申し込むことになるのだと思う。

+

割と安いけども、当然ながら、制約があるっぽい。
+特に、実際にDRとして使う場合には、30日間しか連続起動できない。

+

所感

+
    +
  • 最小構成は安いが、すべてをDRしようとすると、いろいろ高くなりそう。
  • +
  • 取捨選択をして情報資産の棚卸を一緒に行えば、かなり便利。
  • +
  • 特にDRできるか、実際にテストできる機能が便利。
  • +
+
+
+
+

+ VMware + クラウド +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/06/2338.html b/blog/2015/01/06/2338.html new file mode 100644 index 00000000..63ecdfcf --- /dev/null +++ b/blog/2015/01/06/2338.html @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – ESXiをkickstartでインストールする + + + + +
+ + + +
+
+ +

ESXiをkickstartでインストールする

+

+ Posted on Tue 06 January 2015 in blog + +

+
+ + +
+ + +
+

ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。

+ +

利用OS

+
    +
  • ESXi 5.5
  • +
  • Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる)
  • +
+

DHCP, TFTP, HTTPサーバーの準備

+

必要なソフトウェアのインストール

+
apt-get install tftpd-hpa isc-dhcp-server xinetd apache2
+
+

DHCPサーバーの設定

+

BOOTPでインストールするため、あまり自由度がない。

+
+ + +
+

TFTPサーバーの設定

+

適当なディレクトリ以下を公開する。
+ここでは、/srv/tftp とする。

+

kickstartイメージの準備

+

まずESXiのイメージの内容をもらってくる

+
cd /srv/tftp/
+mkdir esxi
+mount -o loop <ESXiのISO>.iso
+rsync -a /mnt/esxi/
+
+

次に、pxe boot用のイメージを準備する。
+必要なのは、pxelinux.o, pxelinux.cfg/

+
wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz
+tar xvf netboot.tar.gz
+
+

PXEブートの設定ファイル

+
    +
  • pxelinux.cfg/default
  • +
+
+ + +
+
    +
  • esxi/boot.cfg
    + * もともとあるファイルの / を除去していく
    + * prefixを代わりに設定
  • +
+
+ + +
+

kickstart file

+

以下のファイルを /var/www/servers/ks.cfg として保存。
+(ここでは、httpでやっているが、tftpでやっても良い。)

+
+ + +
+

以上で、キックスタートの準備が終わる。

+

考えること

+
    +
  • サーバーごとの個別設定の渡し方
    + 事前にMACアドレスがわかっている場合にはできるけど、そうでない場合には、難しい。
  • +
+
+
+
+

+ VMware + ESXi +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/07/1924.html b/blog/2015/01/07/1924.html new file mode 100644 index 00000000..a2aa871d --- /dev/null +++ b/blog/2015/01/07/1924.html @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware VDP, VDPA + + + + +
+ + + +
+
+ +

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + +

+
+ + +
+ + +
+ +

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる)
  2. +
  3. バックアップ データ レプリケーション
  4. +
  5. Microsoft SharePoint 対応エージェント
  6. +
  7. EMC Data Domain システムへのバックアップ (元々は、vmdkにしか保存できない)
  8. +
  9. 自動バックアップ検証機能 (一時的なVMにリストアして、vmware-toolsのハートビートを検証。NICは抜いてある)
  10. +
+

以下の比較図は、vSphere 5.5 の新機能紹介 - VMware Blogsからのもの。
+VDP と VDPAの違いの表

+
+
+
+

+ VMware + VCP + VDP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/07/2029.html b/blog/2015/01/07/2029.html new file mode 100644 index 00000000..4c215c4b --- /dev/null +++ b/blog/2015/01/07/2029.html @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vSphere 5.5環境でMSCSクラスタを組むときの制約 + + + + +
+ + + +
+
+ +

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

クラスタリングのハートビートとして、

+
    +
  • ハートビート ネットワーク
  • +
  • 共有ディスク(クォラムディスク)
  • +
+

が存在するものが多い。
+この2つは構成上重要なので、以下ではここに注目する。

+

サポートされている構成

+

3種類のクラスタリング構成がサポートされている。

+
    +
  1. 1つのホストでの MSCS 仮想マシンのクラスタリング (CIB)
  2. +
  3. 物理ホスト間での MSCS 仮想マシンのクラスタリング (CAB)
  4. +
  5. MSCS 仮想マシンを使用した物理マシンのクラスタリング (N+1)
    + ※ この構成は、スタンバイ用のホスト1台を置いておき、他のホストのものとクラスタリングするもの。
  6. +
+

制約

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
コンポーネント条件
仮想SCSIアダプタWindows 2003 => LSI Logicパラレル, 2008 => LSI Logic SAS
ディスクフォーマットシックプロビジョニング、かつ、eagerzeroedthick
共有ストレージ (CIB)仮想ディスクが推奨。仮想RDMも可
共有ストレージ (CAB)物理RDMが推奨。仮想RDMも可
共有ストレージ (N+1)物理RDMが利用可能
ストレージアダプタざっくりいうと、iSCSI, FCoEはサポートされている
+

その他の制限事項

+
    +
  • NFSディスク上のクラスタリングは不可
  • +
  • NPIV不可
  • +
  • FTとの併用不可
  • +
+

など。

+
+
+
+

+ VMware + VCP + Microsoft + MSCS +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/10/2349.html b/blog/2015/01/10/2349.html new file mode 100644 index 00000000..03fa9616 --- /dev/null +++ b/blog/2015/01/10/2349.html @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vDSのポートバインドタイプ + + + + +
+ + + +
+
+ +

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バインド (Ephemeral Binding)
  6. +
+

静的バインド

+

vNICが作成された段階で、直ちにポートにアサインされ、削除された時に初めて切断される。
+vCenter Server経由の時に利用可能。

+

動的バインド

+

VMがパワーオンされていて、vNICが接続状態の時のみ、ポートにアサインされる。
+パフォーマンスの観点から非推奨。

+

短期バインド

+

VMがパワーオンされていて、vNICが接続されている時に、ポートが作成され、アサインされる。
+VMがパワーオフされるか、vNICが切断された時に、ポートが削除される。

+

短期バインドの場合のみ、vCenterがダウンしている際、VMのネットワーク接続を管理することができる。
+256個までしか作れないとかパフォーマンスの問題から、リカバリ目的にのみ使用することが推奨。

+

ポート数について

+

vSphere 5.1以降、静的ポートバインドの利用時、自動的にポートグループを拡張されるようになっている。
+vSphere 5.0では無効だが、MOBのReconfigureDVPortgroup_Taskを変更して有効にすることもできる。

+
+
+
+

+ VMware + VCP + vDS +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/16/2348.html b/blog/2015/01/16/2348.html new file mode 100644 index 00000000..36a09c23 --- /dev/null +++ b/blog/2015/01/16/2348.html @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VCP5-DCV取得した + + + + +
+ + + +
+
+ +

VCP5-DCV取得した

+

+ Posted on Fri 16 January 2015 in blog + +

+
+ + +
+ + +
+

最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。
+VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。

+ +

VCPトレーニングと試験内容のギャップ

+

トレーニングを受講しても、おそらく言われると思いますが、
+VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたことがないので、わかりません)

+

聞いた内容では、ベンダーの資格試験は、トレーニング内容だけで合格ラインか、合格ライン+αくらいまではいけるのが普通だけど、
+VMwareの試験はトレーニングの内容だけでは5割くらいしか取れなくて、自分で調べないと厳しい、という話でした。

+

とはいえ、実際に自分が受けた試験は、トレーニングの内容をきちんと理解していれば6割はギリギリ行けそうかな、という風に感じました。
+自分は5.5対応の試験を受けたのですが、聞いたのは5.1までの試験のことだったのかもしれません。

+

ただ、トレーニング内容と試験にギャップがあること自体は感じたのは、同じでしたので、
+個人的にトレーニングを受講した後、実際の試験までにどのあたりの項目について気をつけるべきか、書いておきます。
+ただ、もう試験の問題については覚えていないし、具体的に書くのもダメなので、ざっくり所感程度の形で書いておきます。

+

具体的に感じたギャップ

+
    +
  • +

    VMware Data Recovery (VDR)
    + 少し古いからか、自分が受けたトレーニングではほとんど重要視されていないように見えた。
    + でも、試験には出てきた。

    +
  • +
  • +

    VMware Data Protection(VDP), VMware Data Protection Advance
    + 上述のData Recoveryの後継。
    + Data Recoveryからの新機能、Advanceとのライセンス上の違いまで含めて知っておくと良さそう。

    +
  • +
  • +

    VMware Update Manager(VUM)
    + VUMで何が管理できるか、VUMの設定方法は必須のよう。

    +
  • +
  • +

    vSphere ClientとvSphere Web Clientの差
    + 上述のVDRやVDPはWeb Clientをメインにしているが、VUMはvSphere Client からしかできない操作があるためだと思う。
    + 常用している人でも、両方のクライアントを使っている人はあまりいないと思うので、気をつけておくと良い。

    +
  • +
+

VCP-DCVを取得して

+

自分自身があまり資格に興味がないこともあり、あまりキャリアについての有用性はわかりません。
+ただ、VMware環境を運用するのに重要な知見を学ぶ機会は得られたかな、と感じています。
+また、vCenterは、5.1, 5.5でアーキテクチャが大きく変わった部分があり、古い情報からの変更点を知るのにも役立ちました。
+あとは、普段読む気にならないドキュメントをいろいろ読む機会にもなりました。

+

そういう意味では、資格取得は良いきっかけになったと思っています。

+

VCPのトレーニング受講だけでも高いので、会社などで機会をもらえる人は、自分の運用を見直すきっかけとして利用できると思います。

+
+
+
+

+ VMware + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/25/2101.html b/blog/2015/01/25/2101.html new file mode 100644 index 00000000..72ce3070 --- /dev/null +++ b/blog/2015/01/25/2101.html @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vShere Beta Program の注意点 + + + + +
+ + + +
+
+ +

vShere Beta Program の注意点

+

+ Posted on Sun 25 January 2015 in blog + +

+
+ + +
+ + +
+

VMware のBetaプログラムの利用について、基本的なルールがあるので、忘れないようにまとめた。
+ここに書いてあることは、オレオレ要約なので、きちんと自分で確認してください。

+

ざっくり言うと、「ここで知ったことは他で話すなよ」ってことでした。

+ +

資料

+ +

利用方法

+

上記ページから"Join Now!"して、規約に同意すれば良い。
+規約は以下の2つあるので、それぞれ同意することになる。

+ +

vSphere Program Rules の内容

+

MSBTAの方は、一般的な利用規約に近いもののようなので、省略。
+ライセンスは限定的な利用に限るだとか、そういったことが書かれている。

+

vSphere Program Rulesについては、以下のような内容になっている。

+

VMware vSphere Beta Program Ground Rules

+
    +
  • ベータプログラムの情報を受け取ることへの同意
  • +
  • フィードバックや質問は、Beta communityを使うこと。issueなどは、Support Requestを使うが、その解決はSLAなし
  • +
  • フィードバックに対して、VMwareから反応があることもあるし、ないこともある
  • +
  • バージョン番号とか付いているかもしれないけど、リリース版でどうなるかは謎なので、注意
  • +
+

VMware vSphere Beta Program Confidentiality Rules

+

許可されていること

+
    +
  • Beta Program参加者と、このプログラムについて話すこと
  • +
  • 保護されているプライベートなディスカッションフォーラムに投稿すること
  • +
  • VMwareとのNDAの範囲内でサーバーベンダーとこのプログラムについて話すこと
  • +
+

許可されていないこと

+
    +
  • このプログラムについて、公に議論すること
  • +
  • 上記(たぶん許可されていることのリスト)のリスト以外の人と、プライベートに議論すること
  • +
+
+
+
+

+ VMware +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/26/0312.html b/blog/2015/01/26/0312.html new file mode 100644 index 00000000..9d591777 --- /dev/null +++ b/blog/2015/01/26/0312.html @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – DNS サーバーの比較資料集め + + + + +
+ + + +
+
+ +

DNS サーバーの比較資料集め

+

+ Posted on Mon 26 January 2015 in blog + +

+
+ + +
+ + +
+

自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。
+DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。
+以下に、参考ページを列挙する。

+ +

参考になるページ

+

権威サーバ

+ +

キャッシュサーバ

+ +

内容

+

権威サーバ

+

BIND, PowerDNS, NSD, Knot, Yadifaなどの実装がある。
+BINDしか知らない人に対する注意点として、上記のDNSサーバの多くは、権威サーバとしてしか動作しない、ということがある。

+

BINDではしばしば問題にされているのを見るが、権威サーバとキャッシュサーバは分けておくほうがセキュリティ上のリスクは減るので、いっそ異なるサーバを使うようにしたいと思う。

+

特に、NSD, Knot, Yadifaはパフォーマンスが優れている。
+パフォーマンスについては、以下のページを見ると良い。

+ +

キャッシュサーバ

+

BIND, Unboundなどがあるよう。
+Unbound/NSD最新情報(OSC 2013 Tokyo/Spring)を見ると、Unbound(, NSD3, NSD4)の概要がわかる。

+
+
+
+

+ DNS + Debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/29/0754.html b/blog/2015/01/29/0754.html new file mode 100644 index 00000000..e5f46168 --- /dev/null +++ b/blog/2015/01/29/0754.html @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Dockerのプロキシ設定 + + + + +
+ + + +
+
+ +

Dockerのプロキシ設定

+

+ Posted on Thu 29 January 2015 in blog + +

+
+ + +
+ +
+

自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。
+bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、
+あらためて考えると解決できた。

+

結論は、dockerのデーモンが起動するときに、プロキシの設定をしておく必要がある、というだけでした。
+/etc/default/docker に以下を記載します。

+
    export http_proxy="プロキシのIP"
+
+
+
+
+

+ Docker + Debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/30/2209.html b/blog/2015/01/30/2209.html new file mode 100644 index 00000000..82235876 --- /dev/null +++ b/blog/2015/01/30/2209.html @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – CROSS2015の運営をしたので、やったこととわかったことを書いておく + + + + +
+ + + +
+
+ +

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + +

+
+ + +
+ + +
+ +

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋ホールにて、CROSS2015 というイベントの運営をしてきました。
+当日は都心から離れているにも関わらず、たくさんの参加者に来ていただいたのですが、どうにか大きなトラブルはなく、無事に終えることができました。
+1日中立ちっぱなしだったり、細かい備品調整の話があって、大変なのは大変でしたが、半年前くらいから準備をしていたこともあり、なんとかやりきった、という気持ちが強い状況です。

+

やったこと

+

1000人規模のイベントをやるには、おそらくみなさん1年前~9ヶ月前くらいには準備を始めていると思います。
+ただ、今年のCROSSは開始が遅く、半年前からの準備になりました。
+時系列順に私がやっていたこと・やるべきだったことをまとめておきます。

+

全体的な役割

+
    +
  1. 会場の手配
  2. +
  3. 会場に用意する備品・機材の手配
  4. +
  5. 他の係が使用するリソースの調整
  6. +
  7. 当日のネットワークをつくっていただくCONBUとのやりとり
  8. +
  9. 当日は雑用。備品調整, ケータリングの搬入, ゴミ捨て, etc...
  10. +
+

スタート時期 : 半年前~5ヶ月前

+

とにかく会場を探す。
+CROSSの場合は、イベンターさんにお願いしつつ、自分達でも探してみていた。
+この時期には、基本的に会場が埋まっているため、会場スペックの優先度をつけ、評価基準を決める。
+評価パラメータとしては、

+
    +
  • 広さ, 天井の高さ
  • +
  • 交通アクセス
  • +
  • 料金 (会場のみパターン, 設営業者を含めたパターン)
  • +
  • 最大利用時間
  • +
  • 搬入のしやすさ(駐車場から会場までの通路の広さなど)
  • +
  • 受付(を設営するであろう)場所の広さ ← 参加者が受付に並ぶことになるので。
  • +
  • スピーカー、電源などの位置と数 (工事費に関わる。この段階では工事の見積もりはもらえないことが多いので、参考に知っておく)
  • +
  • 回線があるか。自分で引けるかも確認。
  • +
  • ...
  • +
+

などがあります。
+全部を満点にする会場はないので、重視する項目を考えておく必要があります。
+ただ金額が大きくなるため、料金をどれだけ優先するかなど、
+概して会場担当に決定権はないので、事前に意思決定者に確認しておきましょう。

+

会場決め(遅い) : 5ヶ月前~4ヶ月前

+

会場を絞り、現地に観に行くなどして、会場を決めます。
+それと同時に、当日のレイアウトの概要を仮決めします。

+

おそらく、企画系の係については、まだ具体的なことが決まっていないため、意見を聞いても無駄です。
+聞かれた方も困るので、とにかく先に会場レイアウト案を作って、不満点を聞くのが良いようです。

+

このあたりから、実際の金額の見積もりをして、いくらに収めれば良いのか、もう一度確認をしておきましょう。
+会場やイベンターさんから(ざっくりでも良いので)見積もりをもらえるようにしておきましょう。
+会場費はハコの値段であって、下がらないのが普通のようです。
+その他の部分として、業者を会場指定の業者にしたら下がらないか、とか、細かいことは聞いてみた方が良いです。
+(大さん橋ホールは設営・工事について、特に指定はありませんでした。)

+

折衝の時期 : 3ヶ月前~2ヶ月前

+

この時期になると、会場のことはほとんど見えてきているはずです。

+

他の係や業者との折衝が主な役目になってきます。
+特に企画系のものが具体的になり始めるため、こういうことをやりたいのでスペース欲しいです、などの話が来ます。
+最低限、以下の項目は確認しましょう。

+
    +
  • 広さ
  • +
  • 時間
  • +
  • 必要な備品
  • +
  • たくさん人が来そうか
  • +
  • セッション会場の近くに置いて良いか
  • +
+

特に騒がしいものは、実際にやってみないと影響は読みづらいので、できるだけ離しましょう。
+ただ、相手の方もやるなら良い場所を、という風に思っているようなので、交渉になると思います。

+

自分の場合、どうしても外に出てやってほしい企画があったのですが、話し合いの末折れてしまいました。
+結果論ですが、話し合いの最想定していた以上に騒がしくなってしまい、周囲の参加者に不便をかけてしまったのは、無責任だったと反省する点です。

+

2ヶ月前~1ヶ月前

+

自分はこの時期、ほとんど参加できませんでした。
+なので、見ていた限りの話になります。

+

1ヶ月前になってしまうと、備品・工事など、いろいろな調整ができなくなってくるので、
+FIXするための駆け込みの確認・変更が増えます。

+

もしかすると、Q&A票を用意して、3,4日に一回そのまま会場などに聞ける体制を用意した方が良いかもしれません。
+今回は、質問を会場係が受け取り咀嚼して、改めて会場などに電話・メールで聞く、というフローになっており、ボトルネックが会場係になりかねない状況でした。
+できるなら、初めからQ&A票でやりとりしておき、その票で直接答えてもらうようにしておくと、負担は減ると思います。

+

直前

+

当日のフローの確認がメインです。
+だいたい何を言われても、調整できることは限られているので、できる範囲でやりましょう。

+

前日・当日

+

やるだけ。
+自分が意識してやったことは、以下の通り。
+だいたいトラブルが起きた時のフローは、自分の中で確認しておく。
+連携のために、各担当者のうち少なくとも2人ずつくらいは名前を覚えておく。
+明らかに作業担当が1人になっている作業は、手伝って、SPoFを減らす。

+

つらいこと

+
    +
  • +

    昨年ベースのことが多すぎて、わからない
    + 自分は昨年参加していないのだけど、 昨年の資料から読み取れることが少ない。
    + そのため、一切相談なく、「こうやるもんでしょ」みたいな言い方をされることがある。
    + だいたい別に確認したら、昨年がそうだった、という話。
    + そういうこともあるんだな、くらいに受け止めるようにする。

    +
  • +
  • +

    事前に意思決定者に相談していても、なかったことになっている
    + 人数が多い会議あるあるなので、特にいうことはない。
    + つらいことではあるけど、そういう場合は証跡を残していない自分のせいもある。

    +
  • +
+

感想

+

書いているうちに取り留めのない感じになってしまいました。
+とりあえず、半年間準備して、無事終わることができて、
+CROSSに来ていただいた人、一緒に活動したスタッフ、関係してくださった全ての人にお礼が言いたいということで。
+ありがとうございました。

+
+
+
+

+ CROSS + 勉強会 + 運営 +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/01/31/0320.html b/blog/2015/01/31/0320.html new file mode 100644 index 00000000..0fcb39a6 --- /dev/null +++ b/blog/2015/01/31/0320.html @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – CROSS 2015のアンカンファレンスで話しました + + + + +
+ + + +
+
+ +

CROSS 2015のアンカンファレンスで話しました

+

+ Posted on Sat 31 January 2015 in blog + +

+
+ + +
+ +
+

CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。
+スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。
+たぶんプレゼン作成時間30分くらい。

+ + +

書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。
+自分自身は何か情報系の教育を受けてきたわけでもなく、我流で対応しているのですが、未だに目安として定量的に判断する方法を持っていない。(ただしCVSSスコアを除く)。

+

会社としては、どんだけバズった脆弱性でも対応しないとなったら、説明責任があるので、そういうときに説明できるような基準を自分で持たないといけないな、と最近は思っているわけです。(話題になってないけど、対応した、みたいなのも、本当は理由をもっておくべきだけど、優先度は低いはず...。)
+何か良い方針があれば、教えてください。

+

あと、最後のページに書いてある本を輪読会したいので、興味がある方がいれば、@_hitsumabushi_まで。
+やるとしたら、平日は新宿・渋谷とかの辺が良いです。

+
+
+
+

+ 勉強会 + 脆弱性 +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/02/01/0033.html b/blog/2015/02/01/0033.html new file mode 100644 index 00000000..1b652474 --- /dev/null +++ b/blog/2015/02/01/0033.html @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Consistent Algorithm + + + + +
+ + + +
+
+ +

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + +

+
+ + +
+ +
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノードを削除するとき、ノード側でリバランスする必要があるが、その場合には別途方法を考える必要があるように思う。(IDの再計算はそんなに難しくはなさそうに思う)
  4. +
+
+
+
+

+ Algorithm + papers + 論文 +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/02/07/2144.html b/blog/2015/02/07/2144.html new file mode 100644 index 00000000..a44333e8 --- /dev/null +++ b/blog/2015/02/07/2144.html @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Easter Egg Collections + + + + +
+ + + +
+
+ +

Easter Egg Collections

+

+ Posted on Sat 07 February 2015 in blog + +

+
+ + +
+ + +
+

イースターエッグは、見つかるとよく話題に上がっているけど、
+実際にどんなものがあるのか、よく知らないなー、と思ったので集めようと思う。
+ただ、調べてみると、昔あったものがなくなってたりして、このリストも最新状態に保つ必要があるので、なくなってたら教えてほしいです。

+

とりあえずは、いろいろ見つけるたびに徐々に更新していきたいと思います。

+ +

イースターエッグたち

+

Vim

+

最初にこれを書くきっかけになったものを挙げておこう。

+ +

Emacs

+

こいつは何がイースターエッグなのかわからない。
+ゲームができるのは、普通だし、何を挙げれば良いんだろうか。

+ +

apt, aptitude

+

Debian/Ubuntuなどでよく見る、This aptitude does not have Super Cow Powers., スーパー牛さんパワーなどはありません。という文章、この周辺のイースターエッグがある。
+最近のAPTには、よく使われるコマンドがapt-get, aptitude, apt と3種類あるので、それぞれ調べよう。

+
    +
  • apt-get moo, aptitude moo, apt moo
  • +
  • aptitude upgrate
  • +
  • apt-get | tail -1
  • +
  • aptitude -v moo
  • +
  • aptitude -vv moo
  • +
  • aptitude -vvv moo
  • +
  • aptitude -vvvvv moo
  • +
  • aptitude -vvvvvv moo
  • +
+

(apt コマンドだけ少ないなー、と思って、ちょっとずるをしてしまって、aptコマンドのmoo周りのソースを読んでしまった。
+実際に自分が実行してその文が表示されるまで、ここには書かないで楽しみとして取っておきたいと思います。)

+

Google

+
    +
  1. 検索結果系 +
  2. +
  3. ゲーム +
  4. +
  5. google map +
  6. +
  7. 電卓系: 検索すると電卓の結果がでる +
  8. +
  9. 表示言語の設定におかしいものがいくつかある。 +
  10. +
  11. イースターエッグを調べていてたまたま見つけた、昔のグーグルっぽいページ
  12. +
+

おまけ) 過去のDoodle

+

Python

+
    +
  • pythonのインタプリタとかでimport thisとやる
  • +
+

Chrome

+
    +
  • ネット接続していないとき(Developer tooolsでも可)に、ページを検索してエラーページを出す。スペースキーを押せば、ゲームができる。
  • +
+

nmap

+
    +
  • nmap -oS - example.com : Hacker語での表示
  • +
+

telnet? というか何というか

+
    +
  • telnet towel.blinkenlights.nl
  • +
+

rails

+
    +
  • forty_two : (1..42).to_a.forty_two # => 42
  • +
+

資料集

+
    +
  1. http://nanapi.jp/30883
  2. +
  3. http://allabout.co.jp/gm/gc/296865/
  4. +
  5. http://toomva.blog60.fc2.com/blog-entry-278.html
  6. +
  7. http://www.techgyd.com/google-easter-eggs-tricks/12438/
  8. +
  9. http://emacsredux.com/blog/2013/04/03/easter-eggs/
  10. +
  11. http://d.hatena.ne.jp/mickey24/20080808/1218161057
  12. +
  13. https://www.digitalocean.com/community/tutorials/top-10-linux-easter-eggs
  14. +
+
+
+
+

+ 遊び +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/02/09/2227.html b/blog/2015/02/09/2227.html new file mode 100644 index 00000000..306b164b --- /dev/null +++ b/blog/2015/02/09/2227.html @@ -0,0 +1,392 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – fioを使ったベンチマーク + + + + +
+ + + +
+
+ +

fioを使ったベンチマーク

+

+ Posted on Mon 09 February 2015 in blog + +

+
+ + +
+ + +
+ +

Intro

+

ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。
+今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。
+ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。

+

オプション

+

オプションの与え方

+

以下の2つが使える。

+
    +
  • コマンドラインオプションで与える
  • +
  • オプションを記述したファイルを引数にする
    [global]
    +rw=randread
    +size=256m
    +directory=/tmp/fio-test
    +ioengine=libaio
    +iodepth=4
    +invalidate=1
    +direct=1
    +
    +[random-read]
    +rw=randread
    +size=128m
    +directory=/tmp/fio-test
    +
    +[random-write]
    +rw=randwrite
    +size=128m
    +directory=/tmp/fio-test
    +
    +
  • +
+

主なオプション

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
optionvalue意味
rwread, write, randread, randwrite, randrwベンチマークの内容を決める。randrwはMixさせるもの。rwmixread=40でread 40%。
bs<int>[, <int>] (default: 4k)ブロックサイズ。2つ与えられていると、read, writeになる。
size<int>, 64{k,M, G, T, P}, 10% などJob全体のIOサイズ。単位はb。
numjobs<int> (default: 1)同じワークロードを実行するスレッドをいくつ生成するか。
directory<str>fioで使うファイルのプレフィックス。
name<str>ジョブ名を上書きする
ioenginesync, psync, vsync, libaio, ...Job IOをどのように行うかを決める。
iodepth<int> (default: 1)ファイルに対するIO書き込みのユニット数。IO waitを作り出すのに使ったり、複数のヘッドがあるときに使われる?
direct0 or 1 (default: 0)1、つまりtrueの時、 non-buffered IOを使う。(たいていは O_DIRECT)
invalidate0 or 1 (default: 1)IO計測の前に、キャッシュを使わないようにしておく
runtime<int>実行最大時間
thinktime<int>IO発行の間で、Jobを止める。単位は microsecond(μs)
fsync<int> (default: 0)IOが<int>与えられるたびに、fsyncを呼ぶ。 0の時は呼ばない。
write_iolog<str>IOパターンの書き出し。各Jobで異なるファイルを指定する必要がある。
read_iolog<str>IOパターンの読み出し
+

アウトプットの見方

+

実行例

+
+# fio -filename=/mnt/test2g -direct=1 -rw=randwrite -bs=4k -size=2G -numjobs=64 -runtime=10 -group\_reporting -name=file1
+file1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
+...
+file1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
+fio-2.1.3
+Starting 64 processes
+Jobs: 64 (f=29): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww] [100.0% done] [0KB/315KB/0KB /s] [0/78/0 iops] [eta 00m:00s]
+file1: (groupid=0, jobs=64): err= 0: pid=3845: Mon Feb  9 20:10:11 2015
+  write: io=3256.0KB, bw=307748B/s, iops=75, runt= 10834msec
+    clat (msec): min=7, max=10192, avg=205.55, stdev=1093.89
+     lat (msec): min=7, max=10192, avg=205.55, stdev=1093.89
+    clat percentiles (msec):
+     |  1.00th=[    8],  5.00th=[    9], 10.00th=[   10], 20.00th=[   11],
+     | 30.00th=[   12], 40.00th=[   13], 50.00th=[   13], 60.00th=[   14],
+     | 70.00th=[   15], 80.00th=[   16], 90.00th=[   20], 95.00th=[  586],
+     | 99.00th=[ 6849], 99.50th=[ 9110], 99.90th=[10159], 99.95th=[10159],
+     | 99.99th=[10159]
+    bw (KB  /s): min=    0, max=  332, per=18.29%, avg=54.86, stdev=114.66
+    lat (msec) : 10=11.30%, 20=78.99%, 50=3.07%, 100=0.12%, 250=0.12%
+    lat (msec) : 750=2.95%, 1000=0.37%, 2000=0.25%, >=2000=2.83%
+  cpu          : usr=0.00%, sys=0.00%, ctx=1726, majf=0, minf=1909
+  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
+     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
+     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
+     issued    : total=r=0/w=814/d=0, short=r=0/w=0/d=0
+
+Run status group 0 (all jobs):
+  WRITE: io=3256KB, aggrb=300KB/s, minb=300KB/s, maxb=300KB/s, mint=10834msec, maxt=10834msec
+
+Disk stats (read/write):
+  sdc: ios=0/801, merge=0/2, ticks=0/10620, in\_queue=10624, util=98.48%
+
+

実行結果の意味

+ + + + + + + + + + + + + + + + + + + + + + + + + +
keyvalue
bwバンド幅
clatcompleteion latency。リクエスト送信から終了までの遅延時間
IO depths実行時のリクエスト待機状態。submit 以下の行は、IOリクエストまでに要したレイテンシ情報。この例では、0ms~4msですべて処理されている。
WRITEここのスレッドにおける、帯域幅の平均など
+

資料

+ +
+
+
+

+ fio + benchmark +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/02/09/2245.html b/blog/2015/02/09/2245.html new file mode 100644 index 00000000..1b217475 --- /dev/null +++ b/blog/2015/02/09/2245.html @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Hatena Engineer Seminar #4に行ってきました + + + + +
+ + + +
+
+ +

Hatena Engineer Seminar #4に行ってきました

+

+ Posted on Mon 09 February 2015 in blog + +

+
+ + +
+ + +
+ +

Intro

+

タイトルどおり、行ってきました。
+目当ては、mackerelの話だったんですが、思ったより他の話も面白かったです。
+今回は抽選だったし、参加できなかった人のためにも、メモと感想を書いておきます。
+序盤の話はTwitterでつぶやいているので、参考までに。(後半はPCの電源が死んだのでないです)

+

資料は見つけたら追加します。

+

開会の挨拶

+

はてなの東京オフィスが増床するらしい。
+今回の会場は、その増床先のオフィスで、まだ机など入れる前にやってみよう、という感じでした。
+普通のオフィスとして使った時はどんな風になるのかわからないですが、今までのオフィス(今回の会場の1階下にあたる)も使うらしいので、ゆったりできそうです。

+

Goで書かれたmackerel-agentのOSS化や自動化にまつわるあれこれ(@Songmuさん)

+

資料はこれ

+

自分もためにmackerel-agentのソースを見たりしているので、この話を一番楽しみにしていた。
+タイトルの通り、mackerel-agentをOSS化するにあたって、どういうことを考えているか、というお話でした。

+

mackerel-agent-pluginsとの対比もあって、微妙な違いがあり面白かったです。
+個人的に一番興味を持って聞いていたのは、Travis CIを使ったリリースの自動化でした。

+

それぞれのリポジトリの.travis.ymlファイルを見ているとわかりますが、タグを打たれたときに、自動でテストしてデプロイしているみたいです。
+それ自体はわりと珍しくもないと思いますが、OSSだからこそ大事だという話をされていて、なるほど、となりました。品質のためももちろんあると思うのですが、テストとかそういうものを整備して客観的な基準を作ることで、レビュー時のコミュニケーションロスを減らす目的のようです。

+

あと、なかなか真似できないですが、ユーザーがhackする余地を残す、というのもとても共感できました。
+ちょっと頑張ればhackできそう、という雰囲気を出すのが、難しいと思うんですが、mackerelはとっても良く出来ていてすごいです。

+

あと、WindowsようにAppVeyorを使っている、と言っていたんですが、このサービスを初めて知りました。

+

はてなのサービスの開発環境(@astjさん)

+

まず、2013年11月の段階のこのスライドを最初に読んだほうが良いです。
+Vagrant と Chef でつくるはてなブックマークの開発環境

+
+ +
+

半分は、この話からのアップデート+詳細という形式の話でした。
+上記のスライドは、どちらかというとツールのインストールまわりで困ります、という話だったんですが、今回は一歩進んで実際のミドルウェア設定まで考えた時に、本番との差異をどう吸収するのか、という話が聞けました。

+

ただ、個人的に悩みどころの、開発用DBのメンテの話とかはなかったので、あんまりちゃんと覚えられてないので、割愛します。(間違ったことを書きそうなので。)

+

個人的に気になったのは、chefでプロビジョニングすると古いものの依存関係を解決するのが大変、みたいな話があったんですが、packerとかでイメージ作っても良いのかな、と思いました。
+ただ、hatenaでは、本番に使う用の古いライブラリrpmがあるみたいなので、どっちでもコストは大して変わらんのだろうな、という印象。

+

はてなブックマークの新機能における自然言語処理の活用(@skozawaさん)

+

この話は最近はてなブログに追加されたトピックという機能の実装の話です。
+この話は自分自身が咀嚼できていないことが多いのですが、ざっくり流れをまとめてみます。

+

大きくわけて、トピック生成の話と、トピックタイトル生成の話でした。

+

トピック生成の裏側は、Elastic Searchで、significant_termsを2層にして使っているようです。
+significant_termsを使うと、重要語みたいなの(これをトピックとする)がわかるので、それを2層にすることで、特徴語を見つけることができることになります。
+トピックに属するエントリの判定は、この特徴語を用いて決めることができて、特徴語のスコアが80を超えたら、などの基準で、分類を行います。

+

ここまででトピック生成と、トピック内のエントリを分類できました。

+

次にトピックタイトルの生成です。
+実際にページを見ればわかりますが、トピックは単語ではなく、文章です。

+

記事タイトルを持ってくるのが楽そうなのですが、例えば新聞名が入っていたりとかするので、うまく処理しないといけません。
+処理の流れは、以下です。

+
    +
  1. 重要語抽出: ESの機能のほか、TopicSumという考え方も利用
  2. +
  3. 重要文抽出: タイトルのスコアを計測、スコアが高いものを利用
  4. +
  5. 文圧縮: 係受け解析をする(Cabocha & ipadic) : 媒体名を除くなどのため。
  6. +
+

実際に文圧縮するには、係り受け解析をしたりして、重要な部分だけを切り取っているそうです。
+このあたりは試行錯誤の塊っぽいので、細かいことはフォロー出来ませんでした。

+

このお話は、試行錯誤の結果が見え隠れしていて、エキサイティングでした。
+こういう仕事ができるエンジニアになりたいですね。

+

はてなのiOSアプリとSwift(@yashiganiさん)

+

資料というか本人のエントリ

+
+ +
+

正直、Swiftとかアプリとかあんまり興味ないな、とか思っていたんですが、発表者の話が面白すぎて、今はちょっとSwift書こうかと思っています。

+

Swiftの良いところ、悪いところ、実際に使うと困るところまで、コードベースで話していて、これは今からObjective-Cは書かないな、むしろSwiftって良い言語じゃね、くらいまで思わせられました。

+

詳しくは本人のエントリを読むのが良いです。

+

TypeScriptで実現するMVPアーキテクチャパターン(@nanto_viさん)

+

この話は、たしかこれの実装話だった気がする。
+(あまりちゃんとサイトまで見てなかったので、間違っていたらすみません...。)

+

MVPモデルで実装することにした理由、またその中でTypeScriptを選択した理由、というお話を聞いていました。
+自分はあまりフロントの話はわからないのですが、MVP自体は知識として知っているものの、どういう背景で出てきたモデルなのかよく知らなかったです。(というか自分がフロントの勉強し始めた時には、すでにMVVMがあるような時代だった。)
+今回の話では、フレームワークは最小限でやっていたので、そのあたりの細かい話から聞けました。(ロジックとビューの分離をしてテスト可能にしたい。表示位置などのプレゼンテーションロジックもテストしたい、など。)

+

TypeScriptの話もaltJSとしては、とても使いやすそうに聞こえていて、今後自分がJSを書くとすれば生JSではなくて、TypeScriptにしようかな、と思います。(少なくとも型のある言語にしたいです。)

+

まとめ

+

今回はHatena Engineer Seminar #4は、はっきり言って全部の話が面白かったです。
+Hatenaはやっぱり良い会社だと思うし、そういう会社で働いている人と切磋琢磨できるように、自分も面白いことをやっていかねば、と思わずにはいられない感じでした。
+コーディング欲が増したので、懇親会には参加しませんでしたが、きっと懇親会も楽しい感じだったんだと思います。
+またあったら参加したいですね。

+
+
+
+

+ 勉強会 +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/04/05/0138.html b/blog/2015/04/05/0138.html new file mode 100644 index 00000000..41affc73 --- /dev/null +++ b/blog/2015/04/05/0138.html @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Xmonadの設定 + + + + +
+ + + +
+
+ +

Xmonadの設定

+

+ Posted on Sun 05 April 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+
    +
  1. http://xmonad.org/documentation.html
  2. +
  3. Archlinux Wiki - Xmonad
  4. +
  5. Xmonad/Config archive/John Goerzen's Configuration
  6. +
  7. Xmonadの設定 1/3 「基本」編 - ナレッジエース
  8. +
+

環境

+

Debian Sid & Xfce4

+

Install and Initial Configure

+

Package install

+
# basic packages
+sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev
+# for adding launcher
+sudo apt-get install dmenu
+# for status bar
+sudo apt-get install xmobar
+# tools
+sudo apt-get install suckless-tools scrot tilda trayer
+
+

Xsession

+
    +
  1. +

    add /usr/share/xsessions/custom.desktop

    +
    [Desktop Entry]
    +Name=Xsession
    +Exec=/etc/X11/Xsession
    +
    +
  2. +
  3. +

    ${HOME}/.xsession

    +
    xmodmap ~/.Xmodmap
    +exec xmonad
    +
    +
  4. +
+

Edit config

+
import XMonad
+
+main = do
+xmonad $ defaultConfig
+
+

Set xmonad as the default window manager

+
$ sudo update-alternatives --config x-window-manager
+
+

デフォルトのキーボードショートカットは、man xmonadで見ることができる。
+とりあえず、Alt + Shift + pを覚えておけば、ターミナルは起動できるので、困らないはず。

+

Xmonad Setting w/ Xmonad

+

設定のためのTIPS

+
    +
  1. xmonadの設定ファイルを書き換えたので反映させたい
      +
    • mod-q で反映される(restart)
    • +
    • xmonad --recompileで構文チェックできる
    • +
    +
  2. +
  3. +

    ショートカットを設定するときのクラス名を知りたい

    +
      +
    • +

      xprop というコマンドが役立つ

      +

      xprop | grep WM_CLASS

      +
    • +
    +
  4. +
  5. +

    vmware環境でウインドウサイズの変更に追従してくれない

    +
    vmware-user-suid-wrapper
    +
    +
  6. +
+
+
+
+

+ debian + xmonad +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/05/09/1822.html b/blog/2015/05/09/1822.html new file mode 100644 index 00000000..9dc164a1 --- /dev/null +++ b/blog/2015/05/09/1822.html @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Ravelloが便利 + + + + +
+ + + +
+
+ +

Ravelloが便利

+

+ Posted on Sat 09 May 2015 in blog + +

+
+ + +
+ + +
+ +

VMware環境のテストをしたい

+

会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。
+今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。
+あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、というのもあって、
+探していたらRavelloというサービスが面白そうだったので、紹介がてら書いておく。

+

Ravello とは

+

Ravello は、テスト環境を作成するためのクラウドサービス。
+Ravelloロゴ

+

裏では、AWSとGCEを使っているのですが、どちらにデプロイされるかは意識せずに使える。
+というのも、きちんとオーバーレイネットワークだったり、ストレージオーバーレイが行われているため。
+それで、AWSなどでESXiをデプロイする際の最大の問題になるCPUの仮想化支援ですが、Ravelloを使うと良きにはからってエミュレーションして、バイナリ変換してくれるらしい。
+要は、Ravelloを利用すると、Public Cloud上にNested ESXiを構築できるようになるということ。

+

Ravelloを利用する

+

Sign Up

+

まだ、ESXiをデプロイする機能はベータ版っぽいので、以下のページからSign Upする。

+

http://www.ravellosystems.com/solutions/esxi-cloud/esxi-on-aws

+

制限事項

+

デプロイできるバージョンとしては、5.x, 6.0となっているみたい。
+ただ、以下の通り、6.0ではWindows版のvCenterしか使えない。
+たぶんvCSAのデプロイ方法が変わったせいだと思う。
+6.0をテストしたいときには、Windows Serverが別途必要になるので、気をつけましょう。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
versionis supported
ESXi 5.xyes
ESXi 6.0yes
vCSA 5.xyes
vCenter Server 5.xyes
vcSA 6.0yes
vCenter Server 6.0no
+

実際の手順

+

手順は、公式の資料を読もう。
+1. http://www.ravellosystems.com/blog/create-esxi-5-5-iso-image/
+2. http://www.ravellosystems.com/blog/install-vcenter-server-on-cloud/
+3. http://www.ravellosystems.com/blog/vsphere-lab-environment-cloud/

+

Price

+

Price Listを見る。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
elementprice
VM(Cost)$0.14/h ~
VM(Performance)not fixed
Storage$0.12/GB/month
Library$0.12/GB/month
IP$0.01/VM/hour
Network転送量$0.15/GB
+

以上のような表になっている。

+

試算

+ + + + + + + + + + + + + + + + + + + + + + + + + +
VMNUMspec
vCenter12vCPU/8GB mem, 125GB storage
ESXi34vCPU/8GB mem, 100GB storage
NFS12vCPU/4GB mem, 200GB storage
+

という構成で作ると、

+ + + + + + + + + + + + + + + + + + + + + +
elementprice
VM(Cost)$1.25/h
Storage$0.2158/h
IP$0.05
+

となって、$1.5/hくらいになる。(ただし、Library, Network転送量は除く)
+安いコーヒー1杯分くらいで、自宅よりは快適な検証環境が作れそうだ。
+この価格も、そもそもESXiに100GBのストレージとかいらないし、もう少し安くできそうではある。

+

まとめ的なの

+

もうちょっとRavelloを使い倒していきたい。

+
+
+
+

+ ravello + VMware +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/05/28/0607.html b/blog/2015/05/28/0607.html new file mode 100644 index 00000000..bd2efe0f --- /dev/null +++ b/blog/2015/05/28/0607.html @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – WindowsをAnsibleで設定する + + + + +
+ + + +
+
+ +

WindowsをAnsibleで設定する

+

+ Posted on Thu 28 May 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+

Windows Support — Ansible Documentation

+

マシンの準備

+

ansibleコマンドを実行するマシン

+

ansibleがすでに実行できる状況であれば、

+
pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm
+pip install kerberos # AD accountを使う場合
+
+

とすればOK。

+

Windowsマシン

+

要件

+
    +
  1. WinRM がインストール済み
  2. +
  3. PowerShell version > 3.0
  4. +
  5. 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる
  6. +
  7. Windows Server 2012ははじめからPowershell 4.0がインストールされている
  8. +
+

セットアップ方法

+
    +
  1. Powershell 3.0にアップデートが必要な場合
  2. +
  3. WinRMのインストール
  4. +
  5. Configure-SMRemoting.exe -get で有効になっていることを確認
  6. +
  7. WinRM get WinRM/config でWinRMのポートを確認
  8. +
+

ansibleの実行方法

+

Inventory

+

最小構成は以下の通り。 以降は、hostsという名前で呼ぶ。

+
[windows]
+hostname
+
+[windows:vars]
+ansible_ssh_user=administrator
+ansible_ssh_pass=_password_
+ansible_ssh_port=5986
+ansible_connection=winrm
+
+

利用可能なモジュール

+
    +
  1. raw, script, slurpなど
  2. +
  3. Windows用のモジュール
    +この辺にあるやつはできそう
  4. +
+

windows machineの facts

+

ansible -i hosts _hostname_ -m setup を実行する。

+
    "ansible_facts": {
+        "ansible_distribution": "Microsoft Windows NT 6.3.9600.0",
+        "ansible_distribution_version": "6.3.9600.0",
+        "ansible_fqdn": "_FQDN_",
+        "ansible_hostname": "_hostname_",
+        "ansible_interfaces": [
+            {
+                "default_gateway": null,
+                "dns_domain": null,
+                "interface_index": 13,
+                "interface_name": "vmxnet3 Ethernet Adapter #2"
+            },
+            {
+                "default_gateway": "_GATEWAY_",
+                "dns_domain": null,
+                "interface_index": 14,
+                "interface_name": "vmxnet3 Ethernet Adapter #3"
+            }
+        ],
+        "ansible_ip_addresses": [
+            "_local_ipv4_",
+            "_local_ipv6_",
+            "_global_ipv4_",
+            "_global_ipv6_"
+        ],
+        "ansible_os_family": "Windows",
+        "ansible_powershell_version": 4,
+        "ansible_system": "Win32NT",
+        "ansible_totalmem": 2147483648
+    }
+
+
+
+
+

+ Windows + ansible +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/06/07/0331.html b/blog/2015/06/07/0331.html new file mode 100644 index 00000000..4a12a88c --- /dev/null +++ b/blog/2015/06/07/0331.html @@ -0,0 +1,510 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VDI, DaaS市場を調べてみた + + + + +
+ + + +
+
+ +

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + +

+
+ + +
+ + +
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+ +

利用シーン

+

世の中の利用シーン

+
    +
  1. オフィス内からの利用 +
  2. +
  3. 出先での利用
      +
    • オフィス?
    • +
    • 映像系の人は?
    • +
    +
  4. +
+

VDIまわりとは一体何か?

+
    +
  • オフラインVDI: ユーザーデータのみロードパターンもある
  • +
  • VDI: VDI, DaaS
  • +
  • アプリケーション仮想化: アプリケーションごとの配信。thinappとか
  • +
+

VDIの特徴

+
    +
  1. ユーザーごとにデスクトップを割り当て
  2. +
  3. クライアント集中管理
  4. +
  5. 可用性向上
  6. +
+

検討ポイント

+
    +
  1. 動画/Flash利用ユーザーへの配慮
  2. +
  3. 回線の悪い状況(帯域が狭い場合 / レイテンシが悪い)のユーザー
  4. +
  5. GPUの利用は?
  6. +
  7. マルチデバイスで利用可能か?
      +
    • Zero Client みたいなものもある
    • +
    • Chrome book
    • +
    +
  8. +
+

なぜ使うのか、何が課題か

+

よく書かれているのは、以下の通り。

+
    +
  1. 運用コスト
      +
    • パッチ当て
    • +
    +
  2. +
  3. セキュリティ
      +
    • 端末紛失
        +
      • ユーザーのデータを端末に残さない
      • +
      +
    • +
    +
  4. +
  5. 災害対策・BCP
      +
    • 安全なDCを使う
    • +
    +
  6. +
  7. ワークスタイル変革
  8. +
+

オンプレでやるとすると

+

キャパシティプランニング

+

ブートに必要な領域。さらにメールデータも注意。
+個別のプロファイルを持たせている場合は、そのデータストア、フォルダリダイレクトを行う場合、ファイルサーバーに負担がかかる。

+
    +
  1. ストレージ
      +
    • IOPS
        +
      • 1ユーザーあたりの性能データ取得
          +
        • ユーザー分布を調査
        • +
        +
      • +
      • 同時接続数の測定
      • +
      +
    • +
    • バースト時IOPS
        +
      • 最大ユーザー数
      • +
      • フラッシュストレージの検討
      • +
      +
    • +
    • 容量
    • +
    +
  2. +
  3. ネットワーク
      +
    • CIFSのパケットのやりとりが非常に多い
    • +
    +
  4. +
  5. ファイルサーバー
      +
    • CIFSで死ぬ
    • +
    +
  6. +
+

性能検証

+
    +
  1. ストレージ
      +
    • ストレージシステムコントローラ性能
        +
      • SPECやSPCのベンチマーク結果
      • +
      • 縮退時のこともあるので、結局N-1~N-2程度での性能
      • +
      +
    • +
    • ディスクIO性能
    • +
    +
  2. +
+

現状のサービス

+

Amazon

+
    +
  • +

    Amazon Workspace

    +
      +
    • vCPU, mem, storage, office, ...を選択可
    • +
    • $35/month~
    • +
    • 1ユーザー1台
    • +
    • Windows Server 2008R2のみ
    • +
    • ユーザー領域はS3
        +
      • 12hourごとのバックアップ
      • +
      +
    • +
    • VDIの動的割り当てみたいなものはない
    • +
    • いつも通りβ版っぽい
        +
      • 毎週日曜日 0:00-4:00までは利用不可
      • +
      +
    • +
    +
  • +
  • +

    Amazon Workspace Application Manager(Amazon WAM)

    +
      +
    • アプリケーション仮想化
    • +
    • 普通のやつ
    • +
    • ライセンス管理とかできる??
        +
      • 使用頻度が取れる
      • +
      +
    • +
    • 割とお高い。$5/user
    • +
    +
  • +
  • +

    Amazon WorkDocs Sync

    +
      +
    • ドキュメントストアみたいなやつ
    • +
    +
  • +
+

VMware

+
    +
  • Horizon Air
      +
    • http://www.atmarkit.co.jp/ait/articles/1505/21/news054.html
    • +
    • 4300円/month~ , 50台以上
    • +
    • Desktop DRという安価サービスもある。ただ、復帰が24hour以内はつらい...
        +
      • とはいえ、事前にセットアップしておける、というのは便利なのかも?
      • +
      • 700円/month + (起動してる間)300円/日
      • +
      • 起動は最低7日なので、起動するには、2100円/月以上
      • +
      +
    • +
    +
  • +
+

Azure

+

富士通

+
    +
  • V-DaaS
      +
    • http://fenics.fujitsu.com/outsourcingservice/lcm/workplacelcm/virtualdesktop.html
    • +
    • VMware Horizon DaaSベース
    • +
    • 価格は顧客ID数/構成によって異なるが、参考価格はある
        +
      • 小規模だと1名あたり5000円/month前後~。大規模だと3000円/month強くらいまでいける。
      • +
      • 同時接続数での課金ではなさそう?
      • +
      +
    • +
    • デフォルトだと1台、420MHz/2GB Mem/40GB disk
    • +
    • 3ヶ月/20ID以上~
    • +
    • いろんなオプションはありそうだし、さすがに富士通って感がある
        +
      • SIベースなのかな?
      • +
      +
    • +
    +
  • +
+

新日鉄ソリューションズ

+
    +
  • \(M^3\) DaaS@absonne
      +
    • http://www.absonne.jp/service/m3daas/menu3.php
    • +
    • 画面転送、仮想デスクトップ型の2タイプ
    • +
    • XenApp, XenDesktopベース
    • +
    • 標準メニューではスペックが低め
        +
      • オプションで増やせそうだけど、価格不明
      • +
      +
    • +
    • オプションはたくさん(書いてある): すべて価格不明
        +
      • スナップショット、定期バックアップ
      • +
      • ウイルススキャン
      • +
      • 2要素認証とか、インターネットGW
      • +
      • MDM
      • +
      • ストレージサービス
      • +
      • ADサービス
      • +
      +
    • +
    • 新日鉄という名前が私に、このサービスはSI前提だと囁いている
        +
      • 本当のところ、どんなサービスなんだろうか
      • +
      • DaaSの国内シェアNo.1らしいし、利用者の話を聞いてみたい
      • +
      +
    • +
    +
  • +
+

まとめ

+

とりとめもなく、ggったことを書いてみたけど、やはりWindows連携が大事にされているっぽい。
+Windowsのことはよくわからないけど、少しオンプレVDIのネットワーク特性については、興味が湧いてきた。
+特性として、概ねブートストームと、CIFSの特性の2つで決まりそうだけど、機会があれば実験したい。(機会はたぶんない。)

+ +
+
+
+

+ VDI + DaaS + AWS + Azure + VMware +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/06/15/0004.html b/blog/2015/06/15/0004.html new file mode 100644 index 00000000..4cf5c68a --- /dev/null +++ b/blog/2015/06/15/0004.html @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Windowsの勉強を始めた + + + + +
+ + + +
+
+ +

Windowsの勉強を始めた

+

+ Posted on Mon 15 June 2015 in blog + +

+
+ + +
+ +
+

人生で初めて、Windowsの勉強を始めた。
+進捗は以下のgithub pagesから確認できる。
+とりあえず、章立てを書いて、内容を徐々に埋めているところ。

+ +

内容の誤りやコメントなどあれば、githubのissueで欲しい。

+
+
+
+

+ Windows +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/06/23/2047.html b/blog/2015/06/23/2047.html new file mode 100644 index 00000000..a13eb576 --- /dev/null +++ b/blog/2015/06/23/2047.html @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – runCをDebianで実行する + + + + +
+ + + +
+
+ +

runCをDebianで実行する

+

+ Posted on Tue 23 June 2015 in blog + +

+
+ + +
+ + +
+

opencontainers/runc を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。

+ +

runCのインストール

+

golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。

+
git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc
+cd $GOPATH/src/github.com/opencontainers/runc/
+make
+sudo make install
+
+

状況

+

ディレクトリ構成

+
.
+├── container.json (とりあえず、runc spec で生成されるものでOK)
+└── rootfs (docker exportしてtarを展開したものを置いたディレクトリ)
+
+

利用中のカーネル

+
% uname -a
+Linux debian 4.0.0-2-amd64 #1 SMP Debian 4.0.5-1 (2015-06-16) x86_64 GNU/Linux
+
+

問題

+

ここまで準備できるとruncが実行できるはずなのだけど、やってみるとエラーが出る。

+
% sudo runc --debug
+WARN[0000] signal: killed
+Timestamp: 2015-06-23 20:50:18.148962383 +0900 JST
+Code: System error
+
+Message: open /sys/fs/cgroup/cpu/user.slice/tmp/cpu.cfs_quota_us: permission denied
+
+Frames:
+---
+0: start
+Package: github.com/opencontainers/runc/libcontainer.(*initProcess)
+File: process_linux.go@197
+---
+1: Start
+Package: github.com/opencontainers/runc/libcontainer.(*linuxContainer)
+File: container_linux.go@107
+---
+2: execContainer
+Package: main
+File: run.go@41
+---
+3: func·006
+Package: main
+File: main.go@88
+---
+4: Run
+Package: github.com/codegangsta/cli.(*App)
+File: app.go@159
+---
+5: main
+Package: main
+File: main.go@96
+---
+6: main
+Package: runtime
+File: proc.go@63
+---
+7: goexit
+Package: runtime
+File: asm_amd64.s@2232
+
+

対処

+

カーネルの再コンパイル

+

cfs_quota_us というのは、CFS Bandwidth Control というカーネルの機能らしく、cgroupなどと一緒に入ったものっぽい。

+ +

とりあえず、カーネルコンパイルする必要がありそうなので、以下を参考に実施する。

+ +
sudo apt-get install build-essential kernel-package libncurses5-dev bc
+sudo apt-get install linux-source
+sudo -s
+cd /usr/src
+tar xvf linux-source-4.0.tar.xz
+cd linux-source-4.0
+cp /boot/config-4.0.0-2-amd64 .config
+make oldconfig
+make menuconfig
+
+

ここで、 '/' を押し、"CFS" などを検索すると CFS Bandwidthの項目が見つかるので、チェックを入れる。

+
make-kpkg clean
+make-kpkg --revision 1.0 --initrd kernel-image 
+sudo dpkg -i (できた debパッケージ)
+
+

ブート時のカーネルパラメータ

+

上記だけでは動かなかったので、さらに、GRUBでカーネルパラメータを追加した。

+

/etc/default/grub を開いて、

+
# GRUB_CMDLINE_LINUX="" <-コメントアウト
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

編集した後、 sudo update-grub をして、reboot。
+これで、sudo runc で実行できるようになっている。

+

open container 自体は、まだspecも公開されていないし、特に遊べることはなさそうだ。

+

その他の参考資料

+

他にもカーネルコンフィグをいじった方が良いかもしれない。

+ +
+
+
+

+ runc + debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/06/26/1250.html b/blog/2015/06/26/1250.html new file mode 100644 index 00000000..661167a1 --- /dev/null +++ b/blog/2015/06/26/1250.html @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Twitterからメールアドレス拾えるんじゃね?的な攻撃について + + + + +
+ + + +
+
+ +

Twitterからメールアドレス拾えるんじゃね?的な攻撃について

+

+ Posted on Fri 26 June 2015 in blog + +

+
+ + +
+ + +
+

任意のTwitterアカウントの登録メールアドレス(伏せ字含)を表示させる攻撃が急増中(対策設定有り) というエントリが盛り上がっていたらしい。(とてもシェアされている)
+ただ、自分には有用な攻撃シナリオには見えなかったので、考えを整理するために書いておきます。
+自分はセキュリティ素人なので、間違った考察かもしれません。

+ +

リンク先ブログの主張

+
    +
  1. Twitterの機能から、(アカウント名, メールアドレスの一部) を取得できる
      +
    • メールアドレスは、最初の2文字と、ドメイン名部分はgmailのみ表示されるが、他は最初の1文字のみ。
    • +
    +
  2. +
  3. (アカウント名, メールアドレスアドレスの一部)のリストから、(アカウント名, アカウント名+ランダム列@gmail.com)のリストを生成する
      +
    • メールアドレスアドレスの最初の2文字と、アカウント名が一致しているものだけを利用する
    • +
    • メールアドレスについては、ドメイン部分がgmailしかわからないので、gmail以外には有用でないため
    • +
    +
  4. +
  5. 得られた(アカウント名, アカウント名+ランダム列@gmail.com)の情報を利用して、フィッシングメールを送信
  6. +
  7. フィッシングメールから偽Twitterページに飛ばして、ログイン情報を盗む
  8. +
+

攻撃としての問題点

+

いずれにせよ、(アカウント名, アカウント名@gmail.com) のリストしか取得できないので、

+
    +
  1. Twitterからアカウント名のリストを取得
  2. +
  3. (アカウント名, アカウント名+ランダム列@gmail.com)を機械的に作成
  4. +
  5. 得られた(アカウント名, アカウント名+ランダム列@gmail.com)の情報を利用して、フィッシングメールを送信
  6. +
  7. フィッシングメールから偽Twitterページに飛ばして、ログイン情報を盗む
  8. +
+

としたほうが手間も少ないし、攻撃できる対象は変わらない。
+また、ランダムな文字列を付加せずに、アカウント名@gmail.com固定で送ったほうが効率が良いと思う。
+もっと多くのメールを送ることができるなら、@gmail以外にyahooなどにも送っても良いかもしれない。

+

評価

+

リンク先ブログの手順をA, このブログで説明した手順をBと書くことにします。

+
    +
  1. 攻撃の容易さ
      +
    1. リスト作成
        +
      • A では、Twitterのサイトから有用なメールアドレスを得る必要があるが、条件として以下の2つがある上、Twitterにスパムと思われる可能性がある
          +
        • メールアドレスが、アカウント名から始まっていること
        • +
        • gmailであること
        • +
        +
      • +
      • B では、Twitterのアカウントだけあれば、リストが作成できる
      • +
      +
    2. +
    3. メール送信
        +
      • A のほうがBよりは不要なメールは少ない
      • +
      • A, Bともある程度の期間で攻撃を達成しようと思えば、大量のメールを送る必要がある
      • +
      • A, Bともスパム扱いされない工夫が必要
      • +
      +
    4. +
    +
  2. +
  3. 攻撃可能なユーザー
      +
    1. A, Bとも同じ
    2. +
    +
  4. +
  5. 攻撃成功時に得られる情報
      +
    1. A, Bとも同じ
    2. +
    +
  6. +
+

自分的な結論

+

自分がこの攻撃を行うなら、Bを採用したいと考えます。
+理由としては、

+
    +
  1. Aの攻撃を達成するには、Twitterのスパム判定回避と、gmailのスパム判定回避の2つを実行する必要がありますが、Bであればgmailのスパム判定回避だけで良いこと。
  2. +
  3. Aの攻撃とBの攻撃で、攻撃可能対象は変わらない
  4. +
  5. Aの攻撃とBの攻撃で、攻撃成功時に得られる情報は変わらない
  6. +
+

という理由からです。

+

セキュリティ詳しい人だと異なる結論なのでしょうか...?

+

まとめ

+
    +
  1. 盛り上がっている内容の割に、特にセキュリティ的なリスクは変わらない
  2. +
  3. Twitterの設定を変えても意味がない。予測可能なメールアドレスを登録している限り、同じ攻撃ができる
  4. +
  5. フィッシングメールには、気をつけよう。パスワード入力する場合は、httpsであることや証明書を確認しよう
  6. +
+
+
+
+

+ security +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/07/26/2030.html b/blog/2015/07/26/2030.html new file mode 100644 index 00000000..1397c7d9 --- /dev/null +++ b/blog/2015/07/26/2030.html @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VM Resource Allocation + + + + +
+ + + +
+
+ +

VM Resource Allocation

+

+ Posted on Sun 26 July 2015 in blog + +

+
+ + +
+ + +
+
+

+ math + papers + 論文 +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/09/15/0421.html b/blog/2015/09/15/0421.html new file mode 100644 index 00000000..80a7bcf2 --- /dev/null +++ b/blog/2015/09/15/0421.html @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Dockerの細々としたメモ + + + + +
+ + + +
+
+ +

Dockerの細々としたメモ

+

+ Posted on Tue 15 September 2015 in blog + +

+
+ + +
+ + +
+

Debian で利用する際のメモを書いておく。

+ +

grub でのカーネルパラメータ

+
    +
  1. systemd を利用する設定
  2. +
  3. cgroups で、メモリに制限をかけるための設定
  4. +
+
# quiet はあってもなくても良い
+GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

cgroups まわり

+

cgroups のディレクトリ配下に設定がある

+
/sys/fs/cgroup/cpu,cpuacct/docker/
+
+

network

+

参考: Dockerのネットワーク管理とnetnsの関係

+

docker コンテナを1つ立ち上げるごとに、vethデバイスができる

+
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
+    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
+    link/ether 00:0c:29:e1:2c:42 brd ff:ff:ff:ff:ff:ff
+3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
+    link/ether 00:0c:29:e1:2c:4c brd ff:ff:ff:ff:ff:ff
+4: docker0@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
+    link/ether ba:fe:c4:10:27:19 brd ff:ff:ff:ff:ff:ff
+8: veth279cc5b@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master docker0 state UP mode DEFAULT group default qlen 1000
+    link/ether ba:fe:c4:10:27:19 brd ff:ff:ff:ff:ff:ff link-netnsid 0
+
+

netns : network namespace

+
$ ls -l /proc/{{.State.Pid}}/ns/
+合計 0
+lrwxrwxrwx 1 root root 0  9月 15 04:38 ipc -> ipc:[4026532695]
+lrwxrwxrwx 1 root root 0  9月 15 04:38 mnt -> mnt:[4026532693]
+lrwxrwxrwx 1 root root 0  9月 15 04:38 net -> net:[4026532599]
+lrwxrwxrwx 1 root root 0  9月 15 04:38 pid -> pid:[4026532696]
+lrwxrwxrwx 1 root root 0  9月 15 04:38 user -> user:[4026531837]
+lrwxrwxrwx 1 root root 0  9月 15 04:38 uts -> uts:[4026532694]
+
+

iptables

+
$ sudo iptables-save | grep -v "^#"
+*nat
+:PREROUTING ACCEPT [28:2281]
+:INPUT ACCEPT [27:2197]
+:OUTPUT ACCEPT [68:6733]
+:POSTROUTING ACCEPT [68:6733]
+:DOCKER - [0:0]
+-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
+-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
+-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
+COMMIT
+*filter
+:INPUT ACCEPT [16482:42893307]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [12048:507911]
+:DOCKER - [0:0]
+-A FORWARD -o docker0 -j DOCKER
+-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
+-A FORWARD -i docker0 -o docker0 -j ACCEPT
+COMMIT
+
+

設定の意味

+

storage

+ +
+
+
+

+ docker + debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/10/31/1350.html b/blog/2015/10/31/1350.html new file mode 100644 index 00000000..47de6c7f --- /dev/null +++ b/blog/2015/10/31/1350.html @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 最近の仕事の振り返り + + + + +
+ + + +
+
+ +

最近の仕事の振り返り

+

+ Posted on Sat 31 October 2015 in blog + +

+
+ + +
+ + +
+

最近、仕事のやり方について考えている(悩んでいるに近いかも)ことが多いので、
+頭の中を整理するために、文章にしてみようと思う。

+

なので、技術的な内容は一切ない。

+ +

目次

+
    +
  1. スケジュール調整と突発案件
  2. +
  3. エンジニアの成長パス
  4. +
  5. 愚痴とポエム
  6. +
+

スケジュール調整と突発案件

+

前置き

+

どんな仕事にも突発的な仕事は大なり小なりあると思う。
+自分としては精神的に負担が大きいし、元々やっている仕事との切り替えの負荷が高く集中力が削られるので、減らしたいと思っているのだけど、それ自体は無くせないし、仕方ないと思う。

+

一方で、(これはどこの会社も同じかわからないけど、)基本的にサービスの目標リリース日は、開発とか検証をする前に決まっていて、マイルストーンが後になればなるほど、リリース遅延が発生した場合の調整の難度が上がる。
+特に、営業が社外でプレセールスして良いという段階をすぎると、顧客からの信頼にも関わることなので、営業の人は絶対に避けたいだろうし、僕も避けたい。
+そうなると、できる限りリスクを把握して、リリース遅延が発生しうるなら、すぐに周知してマイルストーンを変更する必要があるのだと思う。
+(全部完成してから、というのがもっともリスクが少ない方法だけど、実施されていない理由として、スピード感が失われるし、投資回収が遅くなって良くないのだと思う)

+

実際に困った状況

+

実際に最近困ったシチュエーションは以下のようなものだった。
+体制的には、だいたいマーケティングする人と、開発リーダーと僕を含む開発エンジニアでサービスを作りつつ、プレセールス中は営業の人がフィードバックしてくれる、という体制だと思って読んでほしい。

+
    +
  1. 複数のプロジェクトに参加。
      +
    • 優先度最高とされた進行中のプロジェクトは2つ
    • +
    • プロジェクトAは2人で分業, Bは1人で開発
    • +
    • 同じ開発リーダー
    • +
    +
  2. +
  3. プロジェクトAで開発以前の遅延があり、大きくずれ込む
      +
    • Aのリリース日を延期
    • +
    +
  4. +
  5. 問題があり、プロジェクトAのリリース日をさらに延期
      +
    • Aのリリースがずれ込んだ結果、AとBのリリース日がほとんど近接
    • +
    • おそらくこの辺りで、プロジェクトBのリリース時期が営業に伝えられていた
    • +
    +
  6. +
  7. 突発でプロジェクトCが舞い込んでくる
      +
    • マネージャー権限でプロジェクトA, Bよりも優先して実施することが明言される
    • +
    • プロジェクトCの全体スケジュールはまだない状況
    • +
    +
  8. +
  9. プロジェクトBのリリース日が変わる様子がなかったので、「やだやだ、開発間に合わないし、絶対無理ですぅ」とリーダーに泣きついて、延期調整をしてもらう
      +
    • プレセールスを実施している営業の方から、当然どうにかならないか相談を受ける...悲しい
    • +
    +
  10. +
  11. プロジェクトAはリリース日を変えられないと言われて、「やだやだ、たぶん開発間に合わないし、絶対無理ですぅ」ともう一度泣きついて、別の人をアサインしてもらう
      +
    • "たぶん"がついているのはプロジェクトCのスケジュールが来ていなかったから
    • +
    +
  12. +
+

悩んでいること

+

どうすれば良かったのかが謎。

+

自分としてできることは、次はもっと早い時期に、「リリース日遅らせてくれ」って言って行くしかない。
+でも、それでも限界があるし、余裕を持ちすぎたスケジュールを作ってしまって、スピード感がなくなっても困る。
+開発し始めて、「リリースは来年な」とか言えないし、どうやって複数プロジェクトを並行して開発しつつ、各プロジェクトの遅延とか、突発的なプロジェクトによる差を吸収するのか、本当に難しい。
+自分が他部調整を直接やって、プレセールスする時期を遅らせると、もう少しマシなのかもしれないけど、開発に割ける時間が減って、開発期間長くなるしで、悪循環しかない。

+

追記: 2015/11/01

+

プロジェクト管理の手法としての、リスク管理を学べばヒントがわかるかも、と気づいたので、以下を読んでみようと思う。

+ +

エンジニアの成長パス

+

前置き

+

http://r-kurain.hatenablog.com/entry/2015/10/28/090554 という記事が話題になっていたのもあるけど、最近自分のスキルセットについて考えることが多かった。
+この記事では、プライベートを大切にしつつ、仕事中に成長できるようにしよう、と言っていると思う。
+自分もそういう派というか、「自分がプライベート中に勉強するのは良いけど、他の人には強要できないよね。だから仕事中にできるようになろうね」派なので、共感できる。

+

悩んでいること

+

そういう立場だと、仕事中に触れるものは、どういうものなんだろう、と考えることになる。
+自分の会社は、割とインフラをサービスにしていて、かつ、特化型に近いのだけどその中で広くやっている。
+そのため、人によるのだけど、自分の場合は1つのことをやっている期間が短くて、広く浅くやる感じになる。
+その中でエンジニアとしてどういう成長ができるんだろうか。

+

そして、特化してやっている人もいるのだけど、そういう人に対する成長はどうやったら仕事中に実現できるんだろうか。
+特化していると言っても、今やっている仕事に最適化されているだけ、という状況が生まれやすいので、それをどうやって回避して良いエンジニアの成長に繋げられるんだろうか。
+(ジョブローテは僕では実施できる権限がないので...。)

+

最近やっていること

+

最近、部内勉強会をやっていて、いろんな理由にかこつけて、普段と違うことをやってもらえる準備をしている。
+今のところは、徒弟制度でやっていて、1ヶ月以上は準備期間が用意できるようにしている。

+

ざっくり言うと、詳しい人を選定してマスターになってもらい、その人と違うチームの人を選んでパダワンになってもらうスターウォーズ制度にしている。
+勉強会も仕事中にやってもらってるし、準備もできる限り仕事中にしてもらえるようにお願いしている。
+準備には知識の伝達と習得の時間がかかるので、1ヶ月以上前からお願いするように心がけている。

+

現状は、まだ試験実施の段階だけど、上司の理解があるおかげで継続はできているし、もう少し形になってきたら、詳しく書こうと思う。

+

愚痴とポエム

+

配属されて結構経って、少しずつ仕事の領域が広がってきたからか、仕事をしていると仕事のやり方について、一緒に仕事をしている人の「悪いやり方」みたいなのが目につくようになってきた。
+属人化して自分の仕事を守っているエンジニアとか、それを今まで放置してしまっているマネージャとか、社外とやり取りしている人からの要求に対して文句を言い続けるエンジニアとか、それを一緒になって言ってるエンジニアとか、問題を隠そうとするエンジニアとか。
+(もちろん、そんな例は少数だから最近まで気づかなかったんだけど。)
+たぶんどんな会社にでもいると思うんだけど、自分は「もっとサービスを良くして、世界で勝てるサービスにしたい」と思っちゃってる人なので、邪魔だな、と思うし、仕事中だけは最低限をこなそうぜ、と思う。それで、それができない人がいるんだったら給料を下げるなり解雇してよ、ってマネージャーに対して思う。人が足りないから穏便に、って思うならメンタリングするなりしよう。

+

悪い雰囲気が一回広がっちゃうと立て直すのは難しいと思うし、どうにかしたいなー。

+
+

最近は仕事で悩みが多いので、地元に帰ってゆっくりと仕事したい。

+
+
+
+

+

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2015/12/08/0551.html b/blog/2015/12/08/0551.html new file mode 100644 index 00000000..dfda0c6b --- /dev/null +++ b/blog/2015/12/08/0551.html @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vSphere 6.0 でのHA機能のエンハンスの要点 + + + + +
+ + + +
+
+ +

vSphere 6.0 でのHA機能のエンハンスの要点

+

+ Posted on Tue 08 December 2015 in blog + +

+
+ + +
+ + +
+ +

まとめ

+
    +
  1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。
  2. +
  3. vCenterは watchdogs によりプロセス落下時には再起動される
  4. +
  5. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある
  6. +
+

資料

+
    +
  1. VMware vSphere 6 のドキュメント
    +
  2. +
  3. http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf
  4. +
  5. vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)
  6. +
+

vSphere 5.5 までの障害あるある(Part 1)

+

物理ホストのHBAが死んだり経路上の問題で、特定のホスト群のみストレージへのパスが切れた。
+vSphere 5.5 までは、ストレージへのパスが死んだ場合、HAによる保護ができない障害パターンで、IOが止まっているが、管理者が別のホストに移してから再起動するまでアプリケーションは死んでいた。

+

vSphere 6になると...

+

VMCP(Virtual Machine Component Protection) の機能として、ストレージへのパスが切れた時に検知し、挙動を制御できる。
+VMware のドキュメントとしては、APLPDL という2つの用語に分かれていて、設定上も異なる設定が可能。

+
    +
  • APL
      +
    • All path down
    • +
    • 全パスが切れた場合
    • +
    +
  • +
  • PDL
      +
    • Permanent device loss
    • +
    • LUNがぶっ壊れて認識できなくなった場合など
    • +
    • どういう状態かはKB 208108に例がある
    • +
    +
  • +
+

vSphere 5.5 までの障害あるある(Part 2)

+

vCenterのプロセスが落ちる。
+仕方ないので、再起動させるスクリプトを書く。

+

vSphere 6になると...

+

WatchdogがvCenterに組み込まれている。
+PID WatchdogAPI Watchdogがあって、それぞれプロセス自身を監視するのか、API経由で監視するのかの違いがある。 API Watchdog はデフォルトで起動する。
+Watchdog は、vCenterプロセスの再起動してくれる。2回プロセス再起動してもプロセスが上がらない場合には、リブートする。

+

vSphere 6以降の設計ポイント

+

(今までもやっていたと思うけど、 )VMCPのおかげで、1クラスタの中でストレージの障害範囲を分けておけば、 HAしてくれるようになった。
+そのため、クラスタ内でストレージ機器への接続で、同一のスイッチを使わないようにするなど、検討する必要がある。

+

ところで、今回はvSphere 6で設計上の大きなポイントになる(と思っている)PSCについて一切触れていない。
+PSCの構成については、List of recommended topologies for VMware vSphere 6.0.x (2108548) に詳しく記載されている。
+とはいえ、日本語版はアップデートされていないようだし、気が向いたら書こうとは思う。

+
+
+
+

+ VMware + vSphere +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/01/02/1513.html b/blog/2016/01/02/1513.html new file mode 100644 index 00000000..89f2fe11 --- /dev/null +++ b/blog/2016/01/02/1513.html @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Travis コマンドでのエラー + + + + +
+ + + +
+
+ +

Travis コマンドでのエラー

+

+ Posted on Sat 02 January 2016 in blog + +

+
+ + +
+ + +
+ +

Travis CIでCIする素振りをしていたら、最新版のtravisコマンドでエラーが出るようになった。

+

発生した問題

+
$ travis setup releases
+Invalid scheme format: git@github.com
+for a full error report, run travis report
+
+

問題の解析

+

こういう時には、

+
$ travis report
+
+

をして、スタックトレースを見るものらしい。

+
$ travis report
+System
+Ruby:                     Ruby 2.3.0-p0
+Operating System:         Mac OS X 10.11.2
+RubyGems:                 RubyGems 2.5.1
+
+CLI
+Version:                  1.8.0
+Plugins:                  none
+Auto-Completion:          yes
+Last Version Check:       2016-01-02 14:54:05 +0900
+
+Session
+API Endpoint:             https://api.travis-ci.org/
+Logged In:                as "<username>"
+Verify SSL:               yes
+Enterprise:               no
+
+Endpoints
+org:                      https://api.travis-ci.org/ (access token, current)
+
+Last Exception
+An error occurred running `travis setup`:
+    Addressable::URI::InvalidURIError: Invalid scheme format: git@github.com
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:867:in `scheme='
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:795:in `block in initialize'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:2302:in `defer_validation'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:792:in `initialize'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:135:in `new'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:135:in `parse'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/repo_command.rb:71:in `detect_slug'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/repo_command.rb:60:in `find_slug'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/repo_command.rb:21:in `setup'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/command.rb:197:in `execute'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli.rb:64:in `run'
+        from /Users/<username>/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/bin/travis:18:in `<top (required)>'
+        from /Users/<username>/.rbenv/versions/2.3.0/bin/travis:23:in `load'
+        from /Users/<username>/.rbenv/versions/2.3.0/bin/travis:23:in `<main>'
+
+
+For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues.
+For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email support@travis-ci.com.
+
+

見た感じ、addressable というモジュールでパースに失敗しているらしい。

+

travis.gemspec を見ると、確かに、 addressable というモジュールがあるけど、

+
s.add_dependency "addressable",           "~> 2.3"
+
+

という指定になっている。一方で、上記のスタックトレースでは、addressable-2.4.0 を使っているので、当たりをつけて以下を実行する。

+
$ gem uninstall  addressable
+$ gem install -v2.3.8 addressable
+
+

これで、travis コマンドが正常に実行できるようになる。

+

ISSUE上での話

+

というところまで来て、改めて、issueを見てみたところ、https://github.com/travis-ci/travis.rb/issues/342 で議論されている。
+結論としては、以下の通りで、現状はまだ未修正だった。
+"addressableモジュールでは、URIをparseするためのライブラリだけど、SCP styleのURIというのは、RFCにもなってないので、addressableモジュールでサポートするものではないよ。なので、 travisコマンド側でハンドルしよう。"

+
+
+
+

+ travis +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/03/25/0306.html b/blog/2016/03/25/0306.html new file mode 100644 index 00000000..9055c313 --- /dev/null +++ b/blog/2016/03/25/0306.html @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 久しぶりにGitHub Pagesのjekyll触ったので、メモ + + + + +
+ + + +
+
+ +

久しぶりにGitHub Pagesのjekyll触ったので、メモ

+

+ Posted on Fri 25 March 2016 in blog + +

+
+ + +
+ + +
+ +

このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、
+昔とだいぶ状況も変わっていそうだったので、メモをしておく。

+

gem

+

とりあえず、Gemfileを用意して、以下の2行を書く

+
source 'https://rubygems.org'
+gem 'github-pages'
+
+

全体的なconfig

+

GFMを使う

+

ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、_config.ymlに以下を追加しておいた方が良さそう。

+
markdown: kramdown
+kramdown:
+  input: GFM
+
+

related postを表示する

+
lsi: true
+
+
+
+
+

+ jekyll + github +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/05/03/0624.html b/blog/2016/05/03/0624.html new file mode 100644 index 00000000..e639c305 --- /dev/null +++ b/blog/2016/05/03/0624.html @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する + + + + +
+ + + +
+
+ +

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + +

+
+ + +
+ + +
+ +

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更の必要がないようにしようと思う。

+

ネットボランチDNSとは

+

ネットボランチDNSは、YAMAHAが提供しているダイナミックDNSサービスのこと
+YAMAHAのルーターで利用可能。
+別にネットボランチDNSじゃなくとも、世の中のDDNSサービスを使えば良いとは思うけど、
+YAMAHAのルーターを使っている場合には、こちらの方が設定が簡単なので、今回はネットボランチDNSを利用する。

+

接続までの手順

+

以下は、YAMAHA RTX1200 (Rev.10.01.65) で実施している。
+回線はフレッツ光ネクストで、IPv4側の接続はPPPoEになっている。
+(今回は関係ないけど、IPv6側はIPoE。)

+

ネットボランチDNSの登録

+
    +
  1. 登録状況の確認
    +今回はまだ何も登録されていないことを確認している。
  2. +
+
# netvolante-dns get hostname list all
+
+(Netvolante DNS server 1)
+
+
    +
  1. PPPoEで利用しているIPの登録
    +ホスト名をexample-yamahaとすると以下のようにして登録を行う。
  2. +
+
# pp select 1
+pp1# netvolante-dns hostname host pp example-yamaha
+pp1# netvolante-dns go pp 1
+
+(Netvolante DNS server 1)
+[example-rtx.aa0.netvolante.jp] を登録しました
+新しい設定を保存しますか? (Y/N)Yセーブ中... usb1:/config.txt 終了
+
+
    +
  1. 登録の確認
    +登録状況の確認としては、ネットボランチ用のコマンドで確認することに加え、名前解決しておく。
  2. +
+
pp1# netvolante-dns get hostname list all
+
+(Netvolante DNS server 1)
+PP01    example-rtx.aa0.netvolante.jp
+# pp1# netvolante-dns go pp 1
+
+(Netvolante DNS server 1)
+
+
pp1# show status netvolante-dns pp
+
+(Netvolante DNS server 1)
+ネットボランチDNSサービス:     AUTO
+インタフェース:                PP[01]
+ホストアドレス:                example-rtx.aa0.netvolante.jp
+IPアドレス:                    <グローバルIPアドレス>
+最終更新日時:                  2016/05/03 07:23:13
+タイムアウト:                  90 秒
+
+(Netvolante DNS server 2)
+ネットボランチDNSサービス:     AUTO
+インタフェース:                PP[01]
+ホストアドレス:
+IPアドレス:
+最終更新日時:
+タイムアウト:                  90 秒
+
+
pp1# nslookup example-rtx.aa0.netvolante.jp
+<グローバルIPアドレス>
+
+

ニフティクラウドでVPNゲートウェイを作成する

+

細かな作成手順などは、YAMAHAさんのサイト にキャプチャつきで記載されているのえ、要点だけかいつまんで記載する。

+

カスタマーゲートウェイについては、以下のキャプチャの通りに作成した。
+

+

また、VPNコネクションについては、以下のキャプチャを参考にしてほしい。
+

+

すこしわかりにくいけど、VPNゲートウェイとカスタマーゲートウェイを結ぶ線をクリックすると、
+

+

以下のような設定テンプレートをコピーできる
+

+

このテンプレートを元に、YAMAHA RTX1200を設定すれば良い。
+基本的には、テンプレートの内容をそのまま書くか、PPPoE用に書けば、だいたい大丈夫。
+テンプレートに含まれていないこととして、フィルタを空けるというのがある。以下のような感じでやれば良い。

+
ip pp secure filter in ...(既存のフィルタ) 200080 200081 200082
+ip filter 200080 pass * 192.168.100.1 udp * 500
+ip filter 200081 pass * 192.168.100.1 esp * *
+ip filter 200082 pass * 192.168.100.1 udp * 4500
+
+

疎通確認

+

YAMAHA RTX側で以下を実行すると良い

+
# show ipsec sa
+Total: isakmp:2 send:1 recv:1
+
+sa   sgw isakmp connection   dir  life[s] remote-id
+-----------------------------------------------------------------------------
+1     1    -    isakmp       -    27132   <VPNゲートウェイのIP>
+2     1    -    isakmp       -    27144   <VPNゲートウェイのIP>
+3     1    2    tun[001]esp  send 1944    <VPNゲートウェイのIP>
+4     1    2    tun[001]esp  recv 1944    <VPNゲートウェイのIP>
+
+

さらに、クラウド側のローカルIPに向かって、pingを打って疎通確認をしておけば完璧。

+

まとめ

+

ネットボランチDNSを使って、ニフティクラウドとIPSecで接続できるようにした。
+IPを変更したり...というテストはそれほどちゃんとやっていないが、まあ通常のVPNの接続断と大差ないので、大丈夫だろうと楽観視している。
+とりあえず、これで自宅環境で検証できることが増えるぞ。

+
+
+
+

+ vyos + YAMAHA + NIFTY +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/06/16/0602.html b/blog/2016/06/16/0602.html new file mode 100644 index 00000000..40fa4ff6 --- /dev/null +++ b/blog/2016/06/16/0602.html @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Anisble for Windows + + + + +
+ + + +
+
+ +

Anisble for Windows

+

+ Posted on Thu 16 June 2016 in blog + +

+
+ + +
+ + +
+ +

久しぶりに ansible で windows を操作するので、メモ。
+実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。
+ansibleは2.1.0を使っている。

+

やること

+

以下を anisble で実行する。

+
    +
  1. Windows Update
  2. +
  3. Windows Server 2012 R2 に AD をインストール
  4. +
  5. ADに適当なダミーエントリを突っ込む
  6. +
+

初期設定

+

ansible 実行サーバーの準備

+

winrm経由で実行することになるので、 pywinrm が必要。

+
# pip install ansible pywinrm
+
+

Inventory

+
[windows_server]
+ad-seed-001 ansible_host=164.70.5.244
+
+[windows_server:vars]
+ansible_user=adminuser
+ansible_port=5986
+ansible_password=<password>
+ansible_connection=winrm
+ansible_winrm_server_cert_validation=ignore
+
+

接続確認

+
# ホスト側のwinrmの初期設定を行っていないと、おそらく失敗する
+ansible -i inventory_file all -m win_ping
+
+

ホスト側の初期設定

+

以下のスクリプトを実行すれば、ひとまずは、上記のpingが通る。
+FWがパブリック/プライベートの両方空いたりするので、必要に応じてスクリプトを変更する。

+

https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1

+

再度、接続確認を行えば、おそらく成功する。

+
ansible -i inventory_file all -m setup
+
+

などとして、factを確認しておくと便利。

+

ansible playbook

+

ある程度できたら書きます。

+

資料

+ +
+
+
+

+ ansible + windows +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/06/16/1445.html b/blog/2016/06/16/1445.html new file mode 100644 index 00000000..369474b3 --- /dev/null +++ b/blog/2016/06/16/1445.html @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 会社にslack入ったので、色々やってた + + + + +
+ + + +
+
+ +

会社にslack入ったので、色々やってた

+

+ Posted on Thu 16 June 2016 in blog + +

+
+ + +
+ + +
+ +

勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。

+

現在のチャンネル構成

+
    +
  • 定常系
      +
    • 分報用のチャンネル。個々人が作る
    • +
    • 部署用
    • +
    • チーム用
    • +
    • プロジェクト用
    • +
    +
  • +
  • 雑多な情報共有用
      +
    • ニュース用
    • +
    +
  • +
  • トラブル用
  • +
  • その他
      +
    • 臨時に必要になるとか
    • +
    • テストとか
    • +
    +
  • +
+

やったことメモ

+

RSS を Slack に移行

+

live dwango reader をずっと使っていたのだけど、更新頻度がそこそこで、重要度の高いRSSを Slack で追いかけることにした。

+

やり方

+

追加自体は簡単で、通知をしてほしいチャンネルで、以下のようなコマンドを打つ。

+
# 通知したいチャンネルで入力
+/feed <feed url>
+
+

こうしておくと、更新された時に、チャンネルに通知が来る。

+

コメント

+

通知先のチャンネルについては、内容に応じて分けておいた方が良いと思う。
+今まで自分はRSSを読んで、チームで共有するものは個別に共有していたけど、そういう情報源はチームのチャンネルに入れてしまった。
+もしかしたら、別途チームのニュースチャンネルを作った方が良いかもしれない。
+以下のような場合分けにした。

+
    +
  • 更新頻度が高すぎる
      +
    • RSS のまま
    • +
    • そのうち、botでサマライズするように変える予定
    • +
    • 後述する通り、「RSSを読もう」という remind をしている
    • +
    +
  • +
  • 更新頻度がそこそこ
      +
    • 共有したい
        +
      • チーム・プロジェクト用のチャンネルへ通知
      • +
      +
    • +
    • 自分だけで良い
        +
      • 分報用チャンネルへ通知
      • +
      • 分報用チャンネルはオープンなので、近くのチームの人は入っているので、興味があれば見る人もいるので、RSSよりは良い
      • +
      +
    • +
    +
  • +
+

予定を remind する

+

例えば、新人の日報を見る、とか、毎日RSSを見るとかの予定を Slack で通知させることにした。
+他に、そのうちやろうと思っている短い個人作業(5分以内とかのレベル)のタスクも、面倒なので、言われたその場で、 remindに入れてしまっている。

+

やり方

+
# 自分用 : 平日は毎日19:00 に "<リマインド>"をする
+/remind #<分報用チャンネル> to "<リマインド>" at 17:00 every weekday
+# チーム用 : 月曜日は毎日19:00 に "<リマインド>"をする
+/remind #<チームチャンネル> to "<リマインド>" at 10:00 every Monday
+
+

コメント

+
/remind me ...
+
+

としても、リマインドできるけど、その場合、プライベートチャットでリマインドされる。
+会社のタスクだったり、予定だったりするので、特にプライベートでやる意味がないので、チャンネルに通知することにしている。

+

他の使い方については、helpを見よう。 よく使いそうなのは、 in とかだと思う。

+
/remind help
+
+

実行に時間がかかるコマンドの終了通知

+

検証などで、 ansibleやらを実行するときに、時間がかかるステップがある。(例えば、windwos update。)
+実行中は他の作業をしたいので、終了を通知されるようにした。

+

やり方

+
    +
  • Slack 側 : incoming webhook を設定。
      +
    • アイコンは、スクリプト側で指定するので、無視して良い。
    • +
    • URLをメモするのと、通知先のチャンネル、ユーザー名を決めておく程度。
    • +
    +
  • +
  • zsh shell側 : 時間がかかるコマンドの実行結果をSlackに通知する を参考にした。
      +
    • SLACK_WEBHOOK_URL をメモしたURL
    • +
    • SLACK_USER_NAME をメンションしたいユーザー名
    • +
    +
  • +
+

コメント

+

これは分報用チャンネルに入れた。

+

GitLab, Jenkins との連携

+

Merge Requestが来たときとか。
+やり方は、割愛。

+

コメント

+

今のところは、複雑なことはやっていない。
+また細かい設定をしたら、書く。

+

Zabbix などの監視

+

やった。
+ひとまず、alert の発生と収束だけを通知している。
+slackから操作できるようにしたいが、まだやっていない。

+

Redmine/JIRA 連携

+

これからやるけど、全社共通のものなので、Redmine 側には pluginは入れてくれないかもしれない。
+botでやろうかと思っている。

+

Office 365

+

できていない。
+メール・カレンダーは連携したい。
+社内ADと連携しているはずなので、社内ADの認証を通してから、APIを叩くbotを作る必要があると思っている。
+でも、APIのたたき方がわからない。まだ調べる気が起きていない。

+

暫定対処

+

直接は連携できていないが、ひとまず、メールをSlackに転送するようにした。

+

bot

+

まだ書いてない。
+これから書く。ひとまず、以下のあたりをやるつもり。

+
    +
  • 打刻
  • +
  • 定時頃になったら、今月の残業時間を通知
  • +
  • Redmine連携
  • +
+
+
+
+

+ slack + hubot +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/05/2040.html b/blog/2016/07/05/2040.html new file mode 100644 index 00000000..943f24f3 --- /dev/null +++ b/blog/2016/07/05/2040.html @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる + + + + +
+ + + +
+
+ +

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + +

+
+ + +
+ + +
+ +

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系です。

+

+

上記の図を含め、資格と試験の情報は以下にまとまっています。

+

VMware Certified Professional 6 – Network Virtualization (VCP6-NV)

+

試験について

+

まず、今日(2016/07/05) 時点での、試験は、 2V0-641: VMware Certified Professional 6 - Network Virtualization Exam です。
+以前の試験から、2015/08/30あたりで切り替わっているようです(詳細は調べていません)。
+そのため、昔の情報を見る場合には、きちんと現行のVCP-NVになっているのか確かめる必要があります。

+

受講資格について

+

現在、有効なVCPを持っているかどうかによって異なります。
+昔のVCPを持っている人に取っては、あまり馴染みはないですが、現行のVCPの試験には Foundation試験を受けた後、DCVならDCVの試験、NVならNVの試験という風な2段階の試験になっています。
+そのため、必要なトレーニングを受講後、試験2つをパスする必要があります。
+ただし、現在有効なVCP資格を持っている場合、トレーニングもFoundation試験も免除されるため、NVの試験(2V0-641: VMware Certified Professional 6 - Network Virtualization Exam) を受けるだけで問題ありません。

+

まとめると以下です。

+
    +
  1. 有効なVCPを持っている場合
      +
    1. 2V0-641: VMware Certified Professional 6 - Network Virtualization Exam を受験し、合格する
    2. +
    +
  2. +
  3. VCPを保有していない、もしくは失効している場合
      +
    1. 対象のトレーニングの受講
        +
      • NSX: Install, Configure, Manage [V6.0] , [V6.1], [V6.2]
      • +
      • NSX for Internetworking Experts Fast Track [V6.0],[V6.1]
      • +
      • NSX Troubleshooting & Operations [V6.1] (available as Onsite Training only)
      • +
      • NSX: Design & Deploy [V6.2] (available as Onsite Training only)
      • +
      • Security Operations for the Software Defined Data Center
      • +
      +
    2. +
    3. vSphere 6 の Foundation試験を受験し、合格する
    4. +
    5. 2V0-641: VMware Certified Professional 6 - Network Virtualization Exam を受験し、合格する
    6. +
    +
  4. +
+

試験の概要について

+

このページにまとまっています。
+VMware Certified Professional 6 – Network Virtualization Exam

+

抜粋すると、以下の通りです。

+
    +
  • 試験時間 : 100分
  • +
  • 問題数 : 85問
  • +
  • 合格点 : 300点
  • +
  • 対象のプロダクト : VMware NSX for vSphere v6
  • +
  • 試験費用 : $225 USD
  • +
+

まとめ

+

とりあえず、これから受けるのでまとめてみましたが、以前のVCPの情報よりよくまとまっていて、資格試験としての体裁が整っている印象です。
+VMwareの人と話していても、資格試験としてまともなっていると聞くので、受ける価値がありそうです。
+(以前のVCPはちょっと・・・という感じの試験内容だった。)

+

とりあえず、受けたらまた試験について書きます。

+

追記

+

VCP6-NV の試験勉強メモを書いた。

+
+
+
+

+ VMware + NSX + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/05/2121.html b/blog/2016/07/05/2121.html new file mode 100644 index 00000000..d3dfc9d7 --- /dev/null +++ b/blog/2016/07/05/2121.html @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VCP6-NV 試験勉強メモ + + + + +
+ + + +
+
+ +

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + +

+
+ + +
+ + +
+ +

VCP6-NV 受験シリーズ

+ +

資料

+

最も公式っぽい資料

+ +

ブログ : シリーズものは一通り目を通した方が良い

+ +

NSXの configuration maximums

+

vSphere 製品のように 公開されているわけではない。
+でも、以下のサイトのように、情報を公開している人はいる。

+ +

会社でNSX使っている人は、VMwareの人に言えば上限値資料もらえると思うけど、会社外で確認したいときに、便利。
+運用・開発を考える場合でも、上限値系は何も見ずに言えることが望ましいと思う。
+おおざっぱな各上限値のオーダーは頭に入れておきたいところ...なんだけど、NSX 6.1と6.2で数値が違うところがあるんだよなぁ。

+

VCP6-NV (2V0-641) Practice Exam の問題抜粋

+
    +
  • 上限値系
      +
    • Q. "What is the maximum number of VNIs that can be used in a vSphere environment?"
        +
      • 10,000
      • +
      • これは、NSXの制限というよりは、 vCenterの制限かもしれない※要確認
      • +
      • VNIを1つ使うごとにポートグループを作ってしまう。現状のvSphere 6.0では、 10,000 portgroup/vC なので、これ以上作成できることに意味がない、ということと覚えている
      • +
      +
    • +
    • Q. "How many DHCP pools can be created on the NSX Edge?"
        +
      • 20,000
      • +
      • 覚えるしかない?
      • +
      • "NSX DHCP service can provide configuration of IP pools, gateways, DNS servers, and search domains."
      • +
      +
    • +
    • Q. "What is the maximum number of audit logs retained by the NSX Manager?"
        +
      • 1,000,000
      • +
      • 覚えるしかない
      • +
      +
    • +
    +
  • +
  • デプロイメント
  • +
  • Q. "What is the minimum vSphere configuration needed to deploy NSX?"
      +
    • A cluster of ESXi hosts managed by vCenter Server
    • +
    +
  • +
  • Q. "What is the minimum vSphere 6.0 license edition required to deploy NSX?" +
  • +
  • Q. "Which two components are valid minimum prerequisites for installing NSX in a vSphere environment? (Choose two.)"
      +
    • VMware vCenter Server 5.5 or later
    • +
    • VMware Tools 8.6 or later
    • +
    • ESXi 5.0 or later
    • +
    +
  • +
  • Q. "What is the packet size of the VXLAN standard test packet when using the Ping test on the logical switches?"
      +
    • 1,550
    • +
    • VXLAN 分のオーバーヘッドは 50 byteなので。
    • +
    +
  • +
+

良く意味がわかっていない

+
    +
  • Q. "What is the minimum number of vSphere Standard Switches (vSS) that must be configured before deploying VMware NSX for vSphere?"
      +
    • 選択肢は、0, 1, 2, 3 のどれかで、正解は0。
    • +
    • 解説は、 "NSX includes logical switches. The NSX logical switch creates logical broadcast domains or segments to which an application or tenant virtual machine can be logically wired." となっていた。
    • +
    • いまいち問題の趣旨がわかっていない。答えるとしたら 0だけど、解説を読む限りは、「NSX自体をデプロイするのにportgroupが必要になるけど、それはvDSで作れば良い」とかそういう話ではないっぽい。
    • +
    +
  • +
+

NSX の概要おさらい

+

おさらいなので、一度でもNSXについて理解したことのある人向け。

+

NSX のアーキテクチャ

+
    +
  • Management plane
      +
    • NSX Manager
    • +
    +
  • +
  • Control plane
      +
    • NSX Controller
    • +
    • 論理ルータコントロール VM
    • +
    +
  • +
  • Data plane
      +
    • ESXi カーネルモジュール
        +
      • 論理スイッチ
      • +
      • 分散ルータ
      • +
      • 分散FW
      • +
      +
    • +
    • Edge
    • +
    +
  • +
+

NSX のコントローラ

+
    +
  • コントローラは必ず3つデプロイする。
  • +
  • コントロールプレーンとして、4つのテーブルを持つ
      +
    • ARP
    • +
    • MAC
    • +
    • VTEP
    • +
    • ルーティング
    • +
    +
  • +
  • コントローラとESXiホストのカーネルモジュールは、分散FWを除いて、netcpaというUWAを通じて通信する。(VXLAN, 論理ルータなど。)
      +
    • UWAはカーネルモジュールと通信してよしなにする。
    • +
    • 分散FWは、直接カーネルモジュールがvsfwdを通じて、NSX Managerと通信する。
    • +
    +
  • +
  • コントローラは、Paxos ベースのアルゴリズムで分散処理している
      +
    • マスターを選出
    • +
    • VXLAN, 論理ルータのそれぞれに対して、スライスを作成し、各コントローラに割り当てて処理させる
    • +
    • コントローラの追加・削除時には再度スライスの分散が行われる
    • +
    +
  • +
+

NSX の VXLAN

+

プロトコル概要

+
    +
  • VXLAN は 24bitのIDを持っていて、VNI という。(つまり、 1677万以上ある)
  • +
  • VXLAN のオーバーヘッドは、 50byte分ある
      +
    • MTUは少なくとも 1550byteである必要がある
    • +
    • IPv6 のことも考えると、推奨は、1600byte以上らしい
    • +
    • ジャンボフレームを設定すれば間違いない
    • +
    +
  • +
  • カプセル化後のパケットは、 4789/UDP
  • +
  • VNI のうち、1NSXでは、10,000までしか利用できない
  • +
  • VNI のうち、5,000からしか利用できない
  • +
  • 論理スイッチを作成するとき、レプリケーションモード(マルチキャストモード、ハイブリッドモード、ユニキャストモード)を選択する。それにより、BUMトラフィックのパケットフローが大きく変更される。
      +
    • BUMトラフィックとは、 ブロードキャスト、不明なユニキャスト、マルチキャストのトラフィックのこと
    • +
    +
  • +
+

トランスポートゾーン

+
    +
  • トランスポートゾーンは、VNI用の境界になる
      +
    • Layer 3/VXLAN ネットワークの境界になるという意味
    • +
    +
  • +
  • VXLANオーバーレイのメンバーまたは、VTEPを定義している。
      +
    • 異なるvSphereクラスタのESXiホストを含めることができる
    • +
    • 1個のクラスタを複数のトランスポートゾーンに含めることもできる
    • +
    +
  • +
+

VTEP,MTEP,UTEP

+
    +
  • VTEP
      +
    • VXLAN のカプセル化、またはカプセル化の解除を行うエンドポイント
    • +
    • vSphereでは、vDS上の VMkernelポートでカプセル化される
    • +
    • NSXと連携可能な H/W VTEP も世の中には存在する予定
    • +
    +
  • +
  • VTEPプロキシ : リモートセグメントにある別のVTEPから受け取ったVXLANトラフィックをローカルセグメントに転送するVTEP。MTEP,UTEPがある。
  • +
+

レプリケーションモード

+
    +
  • それぞれの場合のBUMトラフィックの図が以下のサイトにある +
  • +
  • マルチキャストモード
      +
    • Layer 2でIGMPが有効化されていて、かつ、Layer 3でマルチキャストルーティングが必要
    • +
    • ローカルもリモートのどちらのトラフィックもマルチキャストのパケットを投げる
    • +
    +
  • +
  • ハイブリッドモード
      +
    • Layer 2でIGMPが有効化されている必要
    • +
    • ローカルではマルチキャストで投げ、リモートにはMTEPへユニキャストパケットを投げる
    • +
    • MTEPは受け取ったパケットをローカルセグメントへマルチキャストとして投げる
    • +
    +
  • +
  • ユニキャストモード
      +
    • 特に制限はない
    • +
    • ローカルもユニキャストで投げ、リモートにはUTEPにユニキャストパケットを投げる
    • +
    • UTEPは受け取ったパケットをローカルセグメントへユニキャストとして投げる
    • +
    +
  • +
+
+
+
+

+ VMware + NSX + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/07/0742.html b/blog/2016/07/07/0742.html new file mode 100644 index 00000000..4dfe9bb1 --- /dev/null +++ b/blog/2016/07/07/0742.html @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VCP6-NV 試験勉強メモ 2日目 + + + + +
+ + + +
+
+ +

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + +

+
+ + +
+ + +
+ +

VCP6-NV 受験シリーズ

+ +

資料

+ +

NSX におけるVXLAN

+

関係する要素

+
    +
  • 論理スイッチ
  • +
  • 分散論理ルータ
  • +
  • 論理ルータコントロール VM
  • +
  • Edge
  • +
+

分散論理ルータ

+

カーネルモジュール内で動作するルーター。
+各ESXiに分散して存在していて、ヘアピントラフィックを防ぐことができる。

+

分散論理ルータのインターフェースは、LIF(論理インターフェース)と呼ばれる。

+
    +
  • LIF
      +
    • IPアドレスが割り当てられる
    • +
    • ARPテーブルはLIFごとに持つ
    • +
    +
  • +
  • vMAC
      +
    • LIFが分散スイッチにささっている時のMAC
    • +
    • 物理スイッチに保存されることはない
    • +
    • VXLAN LIF の時のMACアドレス
        +
      • VLAN LIFと違い、代表インスタンスなどは不要
      • +
      • 1つの論理スイッチに接続できるVXLAN LIFは1つ
      • +
      • トランスポートゾーン全体のDVSに広げることができる
      • +
      +
    • +
    +
  • +
  • pMAC
      +
    • LIFがポートグループにささっている時のMAC
    • +
    • 物理スイッチに保存される
    • +
    • VLAN LIF の時のMACアドレス
        +
      • VLAN LIF は1台のDVSにのみ所属できる
      • +
      • VLAN LIF は代表インスタンスを1つ持ち、ARP要求はその代表インスタンスが処理する
          +
        • 疑問: ARP要求は代表インスタンスが答えるが、実際には全てのホストで同じpMACを持っていて、その後のトラフィックは各ホストで処理するということで良いのか?
        • +
        +
      • +
      • 代表インスタンスの選定は、NSX Controllerが行う
      • +
      +
    • +
    +
  • +
+

制御プレーンについて

+

分散論理ルータの制御プレーンは、以下の2つある。

+
    +
  • インスタンスごとに作られる、論理ルータコントロール仮想マシン
      +
    • Active/Standby 構成にもできる
    • +
    • ダイナミックルーティング(OSPF, BGP)を処理する
        +
      • つまり、隣接ノードから見ると、VLAN LIFとは異なるIPとセッションをはることになる
      • +
      +
    • +
    • 処理したルーティング情報をNSX Controllerへ送る
    • +
    +
  • +
  • NSX Controller
      +
    • ルーティング情報を分散ルータへ(つまり対象のすべてのESXiへ)プッシュする
    • +
    +
  • +
+

L2 ブリッジ

+

VXLAN と VLAN の L2ブリッジのみがサポートされる。
+アップリンクをDVSに割り当てておけば、物理機器とVXLANをつなぐような用途で利用できる。

+

L2 ブリッジには分散ルータが必要で、論理ルータコントロール仮想マシンが載っているホストが、ブリッジインスタンスとして、実際のブリッジを行う。つまり、1ホストのラインレートが上限になる。
+スループットを向上させるには、1つのブリッジに対しては1つの分散ルータを作成するようにすることが良い。

+

分散ルーティングと論理スイッチ上のブリッジは同時に有効にできない。

+
+
+
+

+ VMware + NSX + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/09/1232.html b/blog/2016/07/09/1232.html new file mode 100644 index 00000000..65659487 --- /dev/null +++ b/blog/2016/07/09/1232.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VCP6-NV 取得した + + + + +
+ + + +
+
+ +

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + +

+
+ + +
+ + +
+ +

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読み返すだけでも、かなり点は取れる気がする。

+

もっと学習しておくべきだったこと

+
    +
  • VCNSからのアップグレード条件
      +
    • 3問くらい出てた気がする
    • +
    +
  • +
  • アクティビティモニタリング
      +
    • 一般的な使い方を調べておけば良さそう
    • +
    +
  • +
  • トラブルシューティングの方法
      +
    • 特にフローキャプチャについて
    • +
    +
  • +
  • QoS の知識
      +
    • QoSの仕組み
    • +
    • 物理機器との連携について
    • +
    +
  • +
  • 動的ルーティングプロトコル
      +
    • プロトコル自体の一般的な事柄
    • +
    +
  • +
+

一応、vRealize についての問題も出ていたが、使うつもりがないので、学習しない。

+

感想

+

3日間くらいでVCP-NVを学習したけど、普段使っていない機能について振り返りつつ、「こんな感じで導入すれば上手くいきそう、と思ったけど上限にぶち当たるなー」とか考えながらできるので良い。
+やっぱり日常的に使っているプロダクトのベンダー試験は、そこそこの勉強で合格できるようになっているみたいだし、本番である程度運用に慣れてきたら、一度こういう試験を受けるのはアリだと思う。

+
+
+
+

+ VMware + NSX + VCP +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/10/0344.html b/blog/2016/07/10/0344.html new file mode 100644 index 00000000..d8bb7a5b --- /dev/null +++ b/blog/2016/07/10/0344.html @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – s3で自前 Debian Package リポジトリを作る + + + + +
+ + + +
+
+ +

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + +

+
+ + +
+ + +
+ +

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバーで Pin するのは面倒、などの理由で自分でバージョンをコントロールしたい
  • +
  • 公式パッケージがない場合に、ビルド済みのものをインストールする形式にしたい
  • +
+

ただし、リポジトリの構成を調べたり、一度手で作ってみるとわかるが、更新がとっても大変です。
+そのため、aptlyreprepro といったリポジトリを管理するためのツールがあります。

+

aptly

+

aptly

+

リポジトリ管理を行うツールで、かなりリポジトリ管理のフローを考慮されたツールになっています。
+全く新しくリポジトリを作る場合や、リポジトリのミラーをしたりできます。
+特に個人的に便利に使えそうだと思っているのは、スナップショットの機能で、複数のリポジトリからスナップショットを作成できます。
+スナップショットを作成して、s3(やs3互換ストレージ)やswiftへアップロードすることができます。

+

注意点として、リポジトリのミラーをする場合、現状、自分のGPG keyになってしまうようで、ミラーのためにこのツールを使うのは難しいです。ミラーをしたいだけであれば、 rsync した方が良いです。
+リポジトリのミラーを resign なしで作成できるようにする機能は作成途中のようです。

+

また、今回はs3にアップロードする前提ですが、aptly自体は、自前サーバーで公開するためにも利用可能になっています。
+その場合にもほとんど同じフローでできます。

+

インストール

+

sudo apt-get install aptly すれば良いです。

+

自前のパッケージを含むリポジトリをs3へアップロードする手順

+

事前作業

+

GPG keyの作成が必要です。

+
gpg --gen-key
+
+

アップロードするリポジトリの作成

+

まずは、空のリポジトリを作成します

+
aptly repo create -distribution=wheezy -component=main <repo_name>
+
+

次に、パッケージをリポジトリに追加します

+
aptly repo add <repo_name> <deb_packages>
+
+

現状、どんなパッケージが追加されているかは、 aptly repo show -with-packages <repo_name> で確認できます。

+

スナップショットの作成

+

さて、必要なパッケージ追加でき、リポジトリをアップロードする準備ができたら、スナップショットを取得しておきます。
+最低限、publishする単位ごとにスナップショットを取っておけば良いと思います。
+アップロードするのも、このスナップショットをもとに行います。

+
aptly snapshot create <snapshot_name> from repo <repo_name>
+
+

スナップショットの一覧は、 aptly snapshot list です。 aptly snapshot show -with-packages <snapshot_name> とすれば各スナップショットの詳細を確認できます。

+

スナップショット名としては、サービスのバージョンと連携してパッケージをpublishするのであれば、そのバージョンをsuffixにつけるのが良いと思います。通常の運用時には、タイムスタンプをsuffixにつけましょう。

+

aptlyのs3設定

+

事前にs3のアクセスキーなどを取得している前提です。
+以下のように環境変数に設定します。(後述する、 aptly.confに書くこともできます)

+
export AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXX"
+export AWS_ACCESS_KEY_ID="YYYYYYYYYYYYYYYYYYYY"
+
+

次に、 ~/.aptly.conf にバケットの情報を書きます。

+
{
+  "rootDir": "/home/hitsu/.aptly",
+  "downloadConcurrency": 4,
+  "downloadSpeedLimit": 0,
+  "architectures": [],
+  "dependencyFollowSuggests": false,
+  "dependencyFollowRecommends": false,
+  "dependencyFollowAllVariants": false,
+  "dependencyFollowSource": false,
+  "gpgDisableSign": false,
+  "gpgDisableVerify": false,
+  "downloadSourcePackages": false,
+  "ppaDistributorID": "ubuntu",
+  "ppaCodename": "",
+  "skipContentsPublishing": false,
+  "S3PublishEndpoints": {},
+  "SwiftPublishEndpoints": {},
+  "S3PublishEndpoints":{
+    "<endpoint_name>" : {
+      "region": "ap-northeast-1",
+      "bucket": "<バケット名>",
+      "prefix": "debian",
+      "acl": "public-read"
+    }
+  }
+}
+
+

スナップショットのアップロード

+

スナップショットをpublishします。
+このコマンドを打つと、s3へ自動でアップロードしてくれます。
+s3のWebサイトのホスティングを設定していれば、これでパッケージを公開できたことになります。

+
aptly publish snapshot <snapshot_name> s3:<endpoint_name>:
+
+

リポジトリの更新について

+

基本的には、aptly repo addaptly snapshot create で良いのですが、アップロードについては、注意が必要です。

+
aptly publish switch <distribution_name> s3:<endpoint_name>: <new_snapshot_name>
+
+
+
+
+

+ debian + apt + s3 +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/11/0428.html b/blog/2016/07/11/0428.html new file mode 100644 index 00000000..04263e66 --- /dev/null +++ b/blog/2016/07/11/0428.html @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ + + + + +
+ + + +
+
+ +

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + +

+
+ + +
+ + +
+ +

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成された deb ファイルの中身を確認し、install してみる
+ar x <deb file>
+# ... check files
+sudo dpkg -i <deb file>
+# ... check installation
+# dpkg -s <package>
+# dpkg -L <package>
+
+# 問題がなければ
+git commit -a
+git push origin master
+
+
+
+
+

+ debian + deb + package + apt +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/07/12/0742.html b/blog/2016/07/12/0742.html new file mode 100644 index 00000000..ecbf261b --- /dev/null +++ b/blog/2016/07/12/0742.html @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – GnuPGのメモ @ Debian Sid + + + + +
+ + + +
+
+ +

GnuPGのメモ @ Debian Sid

+

+ Posted on Tue 12 July 2016 in blog + +

+
+ + +
+ + +
+ +

Debain での GnuPG

+

GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。
+Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。
+普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。
+以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思ったら、gpg2 を使うしかありません。

+

PGP での鍵の使われ方

+

ざっくり言うと、暗号化と署名の場合に鍵を利用することがあると思います。
+説明の都合で、ファイルをAさんからBさんへ送るというシチュエーションで考えてみます。
+(AさんとBさんが同一人物でも同じです)

+
    +
  • ファイルを暗号化して送信
      +
    • Aさんは暗号化をするとき、Bさんの公開鍵を利用します
    • +
    • Bさんは復号するとき、 Bさんの暗号鍵を利用します
    • +
    +
  • +
  • ファイルに署名して送信
      +
    • Aさんは署名するとき、Aさんの秘密鍵を利用します
    • +
    • Bさんは署名を検証するとき、 Aさんの公開鍵を利用します
    • +
    +
  • +
+

鍵の管理体系について

+

上述の通り、暗号化と署名時に鍵を利用することができますが、事前に公開鍵を配布しておく必要があります。
+このために、公開鍵サーバーを利用することができます。

+

公開鍵をここにアップロードしておき、公開鍵を利用したいユーザーは、鍵ID (16進8桁) を指定するかユーザー情報("名前 <メールアドレス>")の一部を指定して、鍵を受け取ることができます。
+ただ、ユーザー情報から、鍵を検索・受け取ることはできるのですが、第3者が同じ情報を使って別の鍵を登録することもできてしまいます。
+もし、間違って、別の鍵でファイルを暗号化してしまうと、相手は復号できないだけでなく、別の人が復号できていまいます。

+

そういった事態を極力防ぐために、フィンガープリントを確認することが必要になります。
+(鍵ID, ユーザー情報, フィンガープリントの3つを重複させることはめったにできない、という前提です。)
+秘密鍵を生成した人は、鍵ID, ユーザー情報のほか、フィンガープリントを提供しておき、公開鍵を利用する人は、公開鍵を受け取ったときにフィンガープリントを確認してから、利用するという手順です。

+

鍵の有効性を確認するための別の考え方として、 web of trust という考え方があり、 What is not WoT? (In Japanese: WoT とはなんでないか) に詳しく載っています。

+

gpg2の使い方

+

鍵の生成

+
gpg2 --full-gen-key
+
+

鍵の失効

+
# まず失効用の証明書を作成しておく
+# 厳重に保管しておく必要がある
+gpg2 -o revoke.asc --gen-revoke <keyid>
+
+# ... 失効したくなったら
+gpg2 --import revoke.asc
+
+

公開鍵サーバーの利用

+

アップロード

+
gpg2 --send-key <keyid>
+
+

ダウンロード

+
# 検索
+gpg2 --search-keys (<keyid>|<user>)
+
+# インポート
+gpg2 --recv-keys <keyid>
+
+

鍵を信用する

+
gpg2 --edit-key <keyid>
+  gpg> trust
+  ...
+  gpg> (適切に 1-5 のどれかを選択)
+  gpg> q
+gpg2 --update-trustdb
+
+

公開鍵のフィンガープリント

+
gpg2 --fingerprint
+
+

ファイルの暗号化

+
gpg2 -e -r <keyid> plain.txt
+# 同時署名をする場合
+gpg2 -se -r <keyid> plain.txt
+
+

ファイルの復号

+
gpg2 plain.txt.gpg
+
+

ファイルの署名

+
gpg2 -sa plain.txt
+
+

ファイルの署名の検証

+
gpg2 -d plain.txt.asc
+
+

資料

+ +
+
+
+

+ gpg + debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/09/27/1445.html b/blog/2016/09/27/1445.html new file mode 100644 index 00000000..266d02b6 --- /dev/null +++ b/blog/2016/09/27/1445.html @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – DockerHub で docker build のオプションを設定したい + + + + +
+ + + +
+
+ +

DockerHub で docker build のオプションを設定したい

+

+ Posted on Tue 27 September 2016 in blog + +

+
+ + +
+ + +
+ +

参考リポジトリ

+
    +
  • https://github.com/hitsumabushi/docker-phpipam
  • +
+

目的

+
    +
  • Dockerfile の中で、 ARGを使いたい。
      +
    • LABEL としてビルドした日付や、 VCSのリビジョンを入れたい
    • +
    • ソフトウェアのバージョンをARGで指定したい
    • +
    +
  • +
+

やること

+
    +
  1. Dockerfile と同じ場所に、 hook ディレクトリを作成する。
  2. +
  3. hook ディレクトリ以下に、 build というファイルを作成する。
      +
    • build には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。
    • +
    • 自分で docker build ... というコマンドを書く
    • +
    +
  4. +
+

TIPS

+

Dockerfileを別の場所に置く場合

+

https://github.com/hitsumabushi/docker-phpipam では、 Dockerfile を、/dockerimages/phpipam/ 以下に置いている。
+その場合であっても、 Dockerfileと同じディレクトリに、 hook ディレクトリを作成すれば良い。
+その上で、 DockerHub の Build Settings の Dockerfile Location にて、 /dockerimages/phpipam/Dockerfile とすれば良い。

+

注意点としては、実際にビルドされるとき、 /dockerimages/phpipam/ 以下でビルドされることになるのだけど、
+上位(例えば、リポジトリルート) のファイルなどはビルド中アクセスできない。
+もし必要なファイルがあるのであれば、Dockerfileと同じか、そのサブディレクトリに置く必要がある。

+

build 中の環境変数の参考

+

printenvなどすればわかる。
+色々便利な環境変数がセットされていて、例えば、以下のようなものが便利そう。

+
    +
  • GIT_SHA1 : revision の sha-1 ハッシュ
  • +
  • GIT_MSG : commit メッセージ
  • +
  • SOURCE_BRANCH : git branch
  • +
  • DOCKER_REPO : DockerHubで公開されるときのURL
  • +
  • DOCKER_TAG : ビルドに成功したときに利用されるタグ (Build Settingsで設定できる。)
  • +
  • IMAGE_NAME : イメージ名 ( index.docker.io/hitsumabushi/phpipam:latest のようになる。)
  • +
+

Dockerfile のラベルについて

+

Dockerfile には LABEL を追加することでメタ情報をつけておくことができる。
+フォーマットに関して指定はないが、以下のようなラベルをつけるのも良さそう。

+

http://label-schema.org/rc1/

+

その他のhook

+

もし、build の前に何かやりたいなどあれば、 pre_build などのhookもある。
+その他の hook については、 thibaultdelor/testAutobuildHooks が参考になる。

+
+
+
+

+ docker + dockerhub +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/11/10/0352.html b/blog/2016/11/10/0352.html new file mode 100644 index 00000000..f32619ff --- /dev/null +++ b/blog/2016/11/10/0352.html @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – git bisect でバグ/仕様変更のコミットを探す + + + + +
+ + + +
+
+ +

git bisect でバグ/仕様変更のコミットを探す

+

+ Posted on Thu 10 November 2016 in blog + +

+
+ + +
+ + +
+ +

まとめ

+
    +
  • git bisect が便利
  • +
  • ansible 2.1.0 -> 2.1.1 で group名に / を入れるとうまく動かないケースが存在する
      +
    • ansible リポジトリでbisect すると対象のコミットは 7287effb5ce241ce645d61e55e981edc73fa382a
    • +
    • group名には / を入れないように、 group_vars 以下はフラットな構成にしよう
    • +
    +
  • +
+

遭遇した問題

+

ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、
+複数のリージョンやゾーンにまたがるシステムのため、うまく設定を見やすくするために、
+以下のように group_vars 配下にディレクトリ構造を作っていた。

+

再現環境

+

ディレクトリ構成

+

用途やrole, ノードの場所などで、グルーピングして、group_vars 以下のディレクトリを作成する。

+
.
+├── group_vars
+   ├── env
+      ├── production
+      └── staging
+          ├── app.yml
+         (└── vault-pass.yml ※今回は関係ないが暗号化したい情報。ansible-vault で作成。)
+   ├── region
+      └── region-1.yml
+   ├── role
+      └── web.yml
+   └── zone
+       └── zone-1.yml
+├── inventories
+   └── sample.ini
+├── library
+├── roles
+└── site.yml
+
+

group_vars

+
$ cat env/staging/app.yml
+---
+
+app_name: "sample_app_name"
+
+

inventory

+

各ノードの状況に応じて、env/stagingregion/region-1 などにノードを所属させていた。

+
$ cat inventories/sample.ini
+[env/staging]
+app_server-1
+db_server-1
+
+[region/region-1:children]
+zone/zone-1
+
+[zone/zone-1]
+app_server-1
+db_server-1
+
+[role/web]
+app_server-1
+
+[app]
+app_server-1 ansible_host=localhost
+
+[db]
+db_server-1 ansible_host=example.com
+
+

playbook

+
$ cat site.yml
+---
+
+- hosts: app
+  gather_facts: no
+  tasks:
+    - debug: msg="{{ app_name }}"
+
+

問題の再現

+

ansible 2.1.0.0 だと app_name を参照できている。

+
$ ansible --version
+ansible 2.1.0.0
+...
+$ ansible-playbook -i inventories/sample.ini site.yml
+
+PLAY [app] *********************************************************************
+
+TASK [debug] *******************************************************************
+ok: [app_server-1] => {
+    "msg": "sample_app_name"
+    }
+...
+
+

ansible 2.1.1.0 だと app_name を参照できず、未定義になっている。

+
$ ansible --version
+ansible 2.1.1.0
+...
+$ ansible-playbook -i inventories/sample.ini site.yml
+
+PLAY [app] *********************************************************************
+
+TASK [debug] *******************************************************************
+fatal: [app_server-1]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'app_name' is undefined\n\nThe error appears to have been in '/home/hitsu/tmp/blog/site.yml': line 6, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  tasks:\n    - debug: msg=\"{{ app_name }}\"\n      ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes.  Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}
+
+...
+
+

コミット履歴の調査

+

コードを読むとこの辺が怪しいというのはわかるが、コードを順番に読んでいくと時間がかかるので、調査する範囲を絞りたい。
+そこで、どのコミットまで正しく動作していて、どのコミットから挙動が変わっているのかを知りたい。
+最初、手作業で二分探索していたが、Twitterで mapk0yさんにgit bisect を教えてもらった。

+ + +

git bisect での調査

+

リポジトリのクローン

+
git clone https://github.com/ansible/ansible.git
+
+

テストスクリプトの準備

+
$ cd ansible
+$ cat check.sh
+#!/bin/sh
+
+PATH_TO_PLAYBOOK="${HOME}/tmp/sample"
+PATH_TO_ANSIBLE="${HOME}/tmp/ansible"
+
+cd "${PATH_TO_ANSIBLE}"
+git submodule update --init --recursive
+pip uninstall -y ansible; pip install "${PATH_TO_ANSIBLE}"
+cd "${PATH_TO_PLAYBOOK}"
+ansible-playbook -i inventories/sample.ini site.yml
+
+

git bisect の実行(自動)

+

現在、すでに 2.1.0.0 と 2.1.1.0 の間で動作が変わっていることがわかっている。
+タグとしては、 v2.1.0.0-1v2.1.1.0-1 の間になる。

+

まずは、 2分探索をどの範囲で実施するか設定して、開始する。
+git bisect start "壊れているコミット" "正しく動作しているコミット" の順番で指定する。

+
$ git bisect start v2.1.1.0-1 v2.1.0.0-1
+
+

次に、各コミットに対して、 good/bad の判断を行うため、テストスクリプトを指定する。
+これで、自動的にテストスクリプトを実行して、2分探索を行ってくれる。
+あとは、結果が出るまで待てば良い。

+
$ git bisect run ./check.sh
+...
+7287effb5ce241ce645d61e55e981edc73fa382a is the first bad commit
+commit 7287effb5ce241ce645d61e55e981edc73fa382a
+...
+
+

これで、 commitが特定できた。あとは、内容の変更を精査すれば良い。

+

片付け

+

調査が終わったら、 git bisect reset して、終わってしまえば良い。

+
+

git bisect 便利!!

+

参考資料

+ +
+
+
+

+ git + ansible +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2016/12/15/0000.html b/blog/2016/12/15/0000.html new file mode 100644 index 00000000..535b0c61 --- /dev/null +++ b/blog/2016/12/15/0000.html @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – チーム活動で失敗したことの振り返り + + + + +
+ + + +
+
+ +

チーム活動で失敗したことの振り返り

+

+ Posted on Thu 15 December 2016 in blog + +

+
+ + +
+ + +
+ +
+

これは、 NIFTY Advent Calendar 2016 の15日目です。

+

@plan0213 さんの 『ネットワーク機器へのコマンド入力自動化』でした。
+ネットワークインフラエンジニアが大好きな話でしたね。

+

はじめに

+

今日の記事ですが、私が社内でやっていたチーム活動について振り返りを書きます。
+特に、失敗した点に注目して共有することで役に立てばと思っています。
+大前提としては、私は一般社員であり、チームのマネジメント等を行う立場ではありません。
+あくまでボトムアップからの活動です。

+

パダワン制度という取り組みについて

+

1年~1年半前あたりに始めた取り組みです。基本的な制度設計は、期間を区切った徒弟制度になっています。
+徒弟制度といえば、ペパボのブログで書かれていたものもあったりしますが、
+パダワン制度は、トランザクティブ・メモリーの文脈で "組織内で『誰が何を知っているか』を把握すること" が大切だ言われているのを意識していました。

+

組織構造について

+
+
+
+
    +
  • 部全体では30~40人程度の時期
  • +
  • 各プロジェクトごとに、関係するチームの人がアサインされる
      +
    • 1チームからは1人か2人
    • +
    +
  • +
  • タスクの進捗については、行われている
      +
    • 実際の活動内容は、同じプロジェクトにアサインされいてるか、同じプロジェクトに入っていないとわかりづらい
    • +
    +
  • +
+

当時の課題

+
    +
  • 新しいツールや仕組みを導入する人が偏っている
      +
    • 世の中の流れにキャッチアップできている人が限られている
    • +
    • キャッチアップする人には常に最高速を出せる状態にあって欲しいが、質問が集中して負荷が高い
    • +
    +
  • +
  • 導入した後の手離れが悪い
      +
    • いつまで経っても、質問がその人に集中する
    • +
    +
  • +
  • ヨコ展開がない/少ない
      +
    • 導入済み環境で利用している人も、自分で導入しようとしていない
    • +
    • そもそも新しい取り組みについて知らない
    • +
    • 個人のスキルから組織のスキルにできていない
    • +
    +
  • +
+

試み

+

当時、以下のような資料を作成して、パダワン制度を始めました。

+


+

+

マスターがパダワンを教育する期間は、適当に区切っていました。
+教育期間の終わりに勉強会を部内向けに行い、その時点でパダワンは独り立ちする、としています。
+また、マスターがパダワンへ教育した後は、パダワンが他の人から質問を受けることにしていました。
+パダワンの選定については、マスターと異なるチームから選ぶことにしていました。

+

結果

+
    +
  • 無事に特定メンバーへの質問を減らすことができた
      +
    • とはいえ、あまり口うるさく言わない
    • +
    +
  • +
  • パダワンを『○○に詳しい人』と部内で認知させることができた
      +
    • 新しく使い始める人が、パダワンへ相談することができるようになった
    • +
    +
  • +
+

反省

+

まず、この活動ですが、現在は継続していません。
+それに関しては、以下のような理由があります。

+
    +
  • マスター/パダワンの負荷がとても大きい
      +
    • 自由活動としてやっていたため、既存業務と並行して行っていた
    • +
    • きちんと業務として考慮されるように調整すべきだった
    • +
    +
  • +
  • マスター/パダワン選択の難しさ
      +
    • 業務に余裕のある人でないとできない
    • +
    • 一通り聞いた後は、メンバーが聞きたいことが先立って、それほど詳しくない状態のトピックが挙がるようになった
        +
      • これ自体は良いことだけど、マスターが学習・習得・教育を一気に行うことになるので、落ち着きたい
      • +
      • それほど深い話も聞けないので、あえて弟子を取る必要が無い
      • +
      +
    • +
    +
  • +
+

また、成果物の扱いが曖昧になってしまった、という反省があります。
+これは会社の文化だと思います。

+
    +
  • 成果物の扱いが曖昧で、成果物が社内でしか閲覧できない
      +
    • 内容的には、社内に限定する意味はないので、社外公開したい
    • +
    • 最終的には社外へ公開しましょう、というのを明示しておかないといけなかった
    • +
    +
  • +
+

一方で、個人的な思いとしては、一通り問題の大きい部分は解消できたという思いも半分あって、新しいマスターが生まれるような活動を進めたいなぁ、というのが最近の気持ちです。
+ただ、そのためには、組織構造や仕事の仕方を変えることも含めて考える必要があると思っていて、個人的に得意ではない『ご説明』をしないといけないのかなぁ、と考えている今日この頃です。

+

終わり

+

良いチームで良い活動を行うことが、エンジニアにとってもサービスにとっても大事だと思っているので、
+今よりうまくチームとして活動することを常に目指していきたいです。
+貪欲に改善活動をしていきたい所存なので、上手くいった話ばかりではなくて、
+もっと失敗談とか、どういう準備をすべきだった、という振り返りが共有されると良いなぁ、と思います。

+
+

明日は、 @qracさんの『リメイクUIコーディング』です。
+qracさんは、 Yaku Han JPというWebフォントを作ったりするほど、デザインやUIガチ勢です。
+そんなqracさんのUIコーディングの話が読める、明日のAdvent Calendarはとても面白そうなので、ぜひ見てください。

+
+
+
+

+ teaming +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/01/31/1936.html b/blog/2017/01/31/1936.html new file mode 100644 index 00000000..733aba1a --- /dev/null +++ b/blog/2017/01/31/1936.html @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – ニフティ株式会社を退職しました + + + + +
+ + + +
+
+ +

ニフティ株式会社を退職しました

+

+ Posted on Tue 31 January 2017 in blog + +

+
+ + +
+ + +
+ +

本日最終出社日でした。

+

ニフティでやったこと

+

ニフティでは、ニフティクラウドのIaaSを中心に仕事をしていました。
+基本的にずっと @ysaotome さんの下で働いており、
+チームメンバーも優秀だったので、とても面白い環境でした。

+

本来は仮想ネットワークチームという名前だったのですが、割と何でもやるチームで、
+自身がやっていた仕事も、仮想ファイアウォールやIPアドレスの払い出しに関する諸々、
+DRサービスやデスクトップサービスなど、色々なことをやらせてもらったと思います。
+技術/ツール的には、 vSphere関係のことについてはかなり詳しくなりましたし、
+ansible, python, golang, ...といったものを使いつつ、運用改善やサービス化のためのツールを書くことができました。

+

特に自分として印象に残っている仕事としては、DRサービスというサービスの課金情報を作るための仕組みを、golangで実装したことでしょうか。
+β版をリリースした段階で離れてしまったのですが、、
+ここにも記載されている通り、VMwareのプロダクトを利用していて、
+当時は『インフラ部分も大体作り方理解したし、さーて実装するかー』と製品仕様調査をしていたところ、
+展示会に間に合わせたいと言われ、2,3週間で一気に実装しきった記憶があります。
+課金に必要な情報を色々なイベントから取得すればできることがわかった後も、
+VMwareがどのように実装しているかわからないため、
+どの操作でどんなイベントが出て、どんなイベントが出たらどんなことが起こっているのか、ということをひたすら調べて実装していました。
+golangで(運用ツールではなくて、)プロダクション環境で動くコードを書いた最初の機会だったので、今も印象に残っています。

+

また退職日当日、会社再編を行うことが発表され
+会社の事業が売却されることについて、労働契約承継法という法律の存在を教えてもらうなどし、
+なかなか貴重な体験ができました。

+

明日から

+

明日から次の会社で働く予定です。
+通勤経路がほとんど変わらないので、寝ぼけて前の会社に出社してしまいそうで怖いです。

+
+
+
+

+

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/02/07/2355.html b/blog/2017/02/07/2355.html new file mode 100644 index 00000000..215354bc --- /dev/null +++ b/blog/2017/02/07/2355.html @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Rust を始めるための設定 + + + + +
+ + + +
+
+ +

Rust を始めるための設定

+

+ Posted on Tue 07 February 2017 in blog + +

+
+ + +
+ + +
+ +

rust のインストール

+

公式からインストールのためのスクリプトが提供されている。
+これを使うと、rustup というrustのマネージャが使えるようになって、
+rustc のバージョンアップや切替なんかができるらしい。

+
## rustup のインストール
+curl https://sh.rustup.rs -sSf | sh
+
+## これを .zshrc などに加える
+source ${HOME}/.cargo/env
+
+

rust のツールのインストール

+

cargo というので、いろんなライブラリとかツールをダウンロードできるらしい。
+go get 的なノリだと思う。
+ひとまず、補完とフォーマットのために以下の2つをインストールする。

+
## 割と時間がかかるので注意
+cargo install rustfmt
+cargo install racer
+
+

vim の設定

+

rust.vim, vim-racer の2つをインストールする。
+設定は以下の通り。

+
" Rust
+let g:rustfmt_autosave = 1
+set hidden
+let g:racer_cmd = "${HOME}/bin"
+
+

hello world

+

例えば、以下のようなわざとフォーマットが崩れた状態のファイルを保存すると、保存時にフォーマットされる。

+
fn main() {println!("Hello,  world!");
+}
+
+

最低限これで十分使えるけど、定義ジャンプとかもできたりするらしいので、その辺のショートカットの設定と、syntax エラーがわかるように設定をしたい。

+

参考

+ +
+
+
+

+ rust + vim +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/02/08/2231.html b/blog/2017/02/08/2231.html new file mode 100644 index 00000000..2ebb0faa --- /dev/null +++ b/blog/2017/02/08/2231.html @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ + + + + +
+ + + +
+
+ +

自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ

+

+ Posted on Wed 08 February 2017 in blog + +

+
+ + +
+ + +
+ +

構成

+

Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。

+

OSイメージ

+

VMware用のイメージを利用。
+/usr/share/oem/cloud-config.yml に vmware tools周りの設定が入っているので便利。

+

password の変更

+

grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。

+

初期設定: cloud-config

+

/var/lib/coreos-install/user_data を編集する。
+(作法を無視すれば、 /usr/share/oem/cloud-config.yml でも良いはず。)

+
#cloud-config
+coreos:
+  units:
+    - name: docker-tcp.socket
+      command: start
+      enable: true
+      content: |
+        [Unit]
+        Description=Docker Socket for the API
+
+        [Socket]
+        ListenStream=2375
+        BindIPv6Only=both
+        Service=docker.service
+
+        [Install]
+        WantedBy=sockets.target
+
+    - name: ens192-static.network
+      runtime: false
+      content: |
+        [Match]
+        Name=ens192
+
+        [Network]
+        Address=192.168.101.11/24
+        Gateway=192.168.101.1
+        DNS=8.8.8.8
+        DNS=8.8.4.4
+    - name: down-ens192.service
+      command: start
+      content: |
+        [Service]
+        Type=oneshot
+        ExecStart=/usr/bin/ip link set ens192 down
+        ExecStart=/usr/bin/ip addr flush dev ens192
+    - name: ens224-static.network
+      runtime: false
+      content: |
+        [Match]
+        Name=ens224
+
+        [Network]
+        Address=192.168.105.11/24
+    - name: down-ens224.service
+      command: start
+      content: |
+        [Service]
+        Type=oneshot
+        ExecStart=/usr/bin/ip link set ens224 down
+        ExecStart=/usr/bin/ip addr flush dev ens224
+    - name: systemd-networkd.service
+      command: restart
+
+ssh_authorized_keys:
+  - "ssh-rsa ..."
+hostname: "coreos-00x"
+users:
+  - name: "hitsumabushi"
+    passwd: "hashed password: https://coreos.com/os/docs/latest/cloud-config.html#users"
+    groups:
+      - "sudo"
+      - "docker"
+    ssh-authorized-keys:
+      - "ssh-key ..."
+write_files:
+  - path: "/etc/resolv.conf"
+    permissions: "0644"
+    owner: "root"
+    content: |
+      nameserver 8.8.8.8
+      nameserver 8.8.4.4
+
+

もうすこし設定する

+

NTP

+

デフォルトで、 systemd-timesyncd が上がっていて、 /etc/ntp.conf をみると [0-3].coreos.pool.ntp.org へ接続している。

+

etcd2

+
coreos:
+  etcd2:
+    # generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
+    discovery: "https://discovery.etcd.io/<token>"
+    # multi-region and multi-cloud deployments need to use $public_ipv4
+    advertise-client-urls: "http://192.168.101.11:2379"
+    initial-advertise-peer-urls: "http://192.168.105.11:2380"
+    # listen on both the official ports and the legacy ports
+    # legacy ports can be omitted if your application doesn't depend on them
+    listen-client-urls: "http://0.0.0.0:2379,http://0.0.0.0:4001"
+    listen-peer-urls: "http://192.168.105.11:2380,http://192.168.105.11:7001"
+...
+  units:
+...
+    - name: etcd2.service
+      command: start
+...
+
+

locksmith

+
coreos:
+  update:
+    reboot-strategy: "best-effort"
+...
+  units:
+...
+    - name: locksmithd.service
+      command: start
+
+
+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/07/10/1600.html b/blog/2017/07/10/1600.html new file mode 100644 index 00000000..dfff6001 --- /dev/null +++ b/blog/2017/07/10/1600.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – さくらのクラウドを便利に使うためのツールメモ + + + + +
+ + + +
+
+ +

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + +

+
+ + +
+ + +
+ +

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example_node
+
+

peco と usacloud でもっと便利にSSHする

+

peco ( http://peco.github.io/ ) をインストールする。
+以下のようなスクリプトを .zshrc に書く。

+ +

.zshrc を読み込み直して、 Ctrl + g を押すと、サーバー名やIPで絞り込みを行って SSH できる。
+上記スクリプトではタグ情報を入れていないけど、入れたい場合には、 usacloud server list --output-type json などにして、出力を jq でフィルタして表示するのが良いと思う。

+

2. terraform 経由で使いたい

+

usacloud と同じ作者が作っている terraform provider がある。
+terraform 公式には入っていないが、インストールも簡単。

+

https://sacloud.github.io/terraform-provider-sakuracloud/

+

ただ、既存リソースをインポートして使うにはなかなか大変。
+色々 tfstate ファイルを生で書き換える必要がある。
+特に、リソースには基本的にIDが必要だけど、さくらのクラウドにIDがないものがある。
+例えば、DNSのゾーンにはIDがあるけど、レコードにはIDがない。
+これを管理するために、terraform provider 側でIDを生成している。
+以下のような形で生成したものをtfstateに書けば良い。
+https://play.golang.org/p/rYk3VNLeGN

+

3. ansible で便利に使いたい

+

TODO

+
+
+
+

+ sakura + terraform + peco +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/10/13/0106.html b/blog/2017/10/13/0106.html new file mode 100644 index 00000000..ced59405 --- /dev/null +++ b/blog/2017/10/13/0106.html @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Intel NUC 上に vSphere 6.5 のVSAN環境を作る + + + + +
+ + + +
+
+ +

Intel NUC 上に vSphere 6.5 のVSAN環境を作る

+

+ Posted on Fri 13 October 2017 in blog + +

+
+ + +
+ + +
+ +

あまりVMwareを触らなくなってきて、何も見ずにvCenterの設定とかMaximum configurationsとか言えなくなってきたので、VMware周りのことをメモに残しておくことにする。
+ひとまず、自宅のVSAN環境の構築メモ。

+

環境

+

以下の構成のIntel NUC 3台にESXiをインストールして、その上にvCenterを立て、VSAN環境を作る。

+
    +
  • Machine: NUC6i3SYH https://www.amazon.com/gp/product/B018NSAPIM +
  • +
  • NFS サーバー
      +
    • vCenter をデプロイしたいだけなので、データストアがVSANと別に作成できれば何でも良い。
    • +
    • 外付けHDDとかでもたぶんできるし、vCenterを作成するESXi上ではない場所にデプロイできるならそれでも良い。
    • +
    • あと、vCenterデプロイ時にSingle host VSANを構成することができるようになっているみたいだけど、今回はライセンスの適用順とかの問題を考えたくなかったので、使わなかった
    • +
    +
  • +
+

ESXi Customizer を利用する都合上、作業マシンはWindowsである必要がある(と思う)。

+

手順

+

ここでは、最初に StartechのUSB Ethernet adapterをインストール時点で使うために、ESXiのイメージカスタマイズから行う。
+通常のESXiインストール後にvibでドライバを入れる場合には、 このブログ を参照すれば良い。

+

ESXi用のバンドルファイルのダウンロード

+

このブログ のStep 0 にある、 ESXi 6.5 USB Ethernet Adapter Driver Offline Bundle をダウンロードする。
+これを新しくディレクトリを作って(ここでは、 C:\path\to\pkg とする)保存しておく。

+

ESXi イメージの準備

+

普通のESXi イメージを使っても良い。

+

ESXi Customizer を使う。
+事前に、 VMware PowerCLI をインストールしておく。
+(VMware PowerCLI の最新版の場所はわかりづらい。たぶん https://www.vmware.com/support/developer/PowerCLI/ あたりに飛んで、新しそうなバージョンのリンクを踏めば良い。)

+

ESXi Customizer をインストールした場所で、以下のコマンドを実行する。
+(C:\path\to\pkg は、先の手順で作成したディレクトリ)

+
.\ESXi-Customizer-PS-v2.5.1.ps1 -pkgDir C:\path\to\pkg -nsc
+
+

すると、 ESXi-6.5.0-20171004001-standard-customized.iso のような名前のISOファイルができる。

+

オプション: USBでブートしてインストールできるようにする

+

今回は、CDに焼くのが面倒だったのでUSBからブートしてインストールする。
+何かしらのUSBドライブを用意する。
+UNetbootin を利用して、用意したUSBドライブにイメージを書く。
+見たままだけど、ディスクイメージの項目からISOファイルを選んで、USBドライブを選べび、OKを押せば良い。間違って変なドライブを選択しない限りは特に問題はない。

+

以下のインストールでは、このUSBドライブをIntel NUCに挿して行う。

+

ESXi インストール

+

普通にインストールする。
+boot時はF10連打してbootしたいドライブを選ぶ。
+install先はインストール用のUSB(私の構成ではSanDiskのUSBドライブ)を選ぶ。

+

インストール後の追加の初期設定

+

通常通り、管理ネットワークの設定やホスト名の設定を行う他に、NICを有効にする必要がある。
+手順としては以下の通り。

+
    +
  • DCUI(もしくはSSH)に入れるようにして、DCUIに入る
  • +
  • esxcli software vib list して、vghetto-ax88179-esxi65 というvibが入っていることを確認する
  • +
  • 以下を実行する
  • +
+
esxcli system module set -m=vmkusb -e=FALSE
+
+
    +
  • reboot
  • +
  • 以下をDCUIで実行して、NICが見えていることを確認する
  • +
+
esxcli network nic list
+
+

自分の環境では以下のように見える。

+
[root@esxi-01:~] esxcli network nic list
+Name    PCI Device    Driver        Admin Status  Link Status  Speed  Duplex  MAC Address         MTU  Description
+------  ------------  ------------  ------------  -----------  -----  ------  -----------------  ----  --------------------------------------------
+vmnic0  0000:00:1f.6  ne1000        Up            Up            1000  Full    b8:ae:ed:eb:0c:11  1500  Intel Corporation Ethernet Connection I219-V
+vusb0   Pseudo        ax88179_178a  Up            Up            1000  Full    00:0a:cd:2f:23:6a  1500  Unknown Unknown
+vusb1   Pseudo        ax88179_178a  Up            Down             0  Half    00:0a:cd:2f:23:6b  1500  Unknown Unknown
+
+

これを3台とも行う。

+

NFS のマウント

+

vCenter をデプロイする先のデータストアが必要なので、どれか1台でNFSをマウントする。

+

vCenter のデプロイ && VSANの設定

+
    +
  • vCenter は通常どおりデプロイする。CLIからデプロイした。
  • +
  • VSANの設定も通常どおり行えば良い。
      +
    • vDSを作って、VSAN用のportgroupを作る。今回の vusb0/1 はMTU4000までいけるので、必要に応じて、MTU4000にしておく
    • +
    • その後各ホストで、vmkアダプタを作って、VSAN用ポートグループにアサインして、VSANネットワークとして設定する
    • +
    • HAを有効化するのはVSAN有効化後に行う
    • +
    +
  • +
+

参考

+ +
+
+
+

+ vmware +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/10/17/0336.html b/blog/2017/10/17/0336.html new file mode 100644 index 00000000..675f896e --- /dev/null +++ b/blog/2017/10/17/0336.html @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Travis CIで git submodule update --init --recursive を止める + + + + +
+ + + +
+
+ +

Travis CIで git submodule update --init --recursive を止める

+

+ Posted on Tue 17 October 2017 in blog + +

+
+ + +
+ + +
+ +

結論

+ +
git:
+  submodule: false
+
+
    +
  • 個別に git submodule update --init hoge していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 $TRAVIS_BUILD_DIR を使えば良い。
  • +
+

経緯

+

久しぶりにこのブログを書いたらビルドに失敗していた。
+原因としては、このブログで利用している getpelican/pelican-plugins のsubmoduleの設定によって、
+取得できないsubmoduleがあり、 git submodule update --init --recursive に失敗しているという感じだった。

+

ハマった点

+

もともと、自分自身で .travis.yml の installgit submodule update --init --recursive していて、そこが悪いと思っていた。
+そのため、必要なsubmoduleについて、個別に git submodule update --init hoge していって終わりだと思った。
+実際にやってみると、 https://travis-ci.org/hitsumabushi/blog/builds/288689875 のようになるが、install よりも早い段階でエラーになっていることに気づくのに時間がかかった。

+
+
+
+

+ git + travis-ci +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/11/10/1402.html b/blog/2017/11/10/1402.html new file mode 100644 index 00000000..dce1290a --- /dev/null +++ b/blog/2017/11/10/1402.html @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Ansible でバージョンチェックする + + + + +
+ + + +
+
+ +

Ansible でバージョンチェックする

+

+ Posted on Fri 10 November 2017 in blog + +

+
+ + +
+ + +
+ +

やりたいこと

+

サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。
+- インストールされていなかったらインストール
+- あるバージョン未満だったらアップデート

+

pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。
+いい感じに playbook の中でバージョン比較をして、インストール/アップデートすべきかを判定したいと考えました。

+

結論

+
    +
  • バージョン比較には、 version_compare filter を使う +
  • +
  • バージョン比較方法としては、 LooseVersionStrictVersion がある
  • +
  • 実装としては、 python の distutils.version を利用しているので、どう判定されるか迷ったら、比較してみれば良い
  • +
+

playbook

+

例えば、docker の場合だと、以下のような感じで書けば良い。

+
## docker version を取得
+## docer version してみて、
+##   - rc が 1 だったら、docker がインストールされていないと判断
+##   - stdout にバージョンが入る
+- name: check docker version
+  command: docker version -f \{\{.Server.Version\}\}
+  changed_when: false
+  ignore_errors: yes
+  register: docker_installed
+
+- name: install curl
+  apt: name=curl
+
+- name: install docker
+  shell: curl -sSL https://get.docker.com/ | sudo sh
+  when: docker_installed.rc == 1
+
+## docker_min_version という変数が定義されているとする。
+## 例えば、 '1.11.0' という文字列が入っている
+- name: update docker if older than docker_min_version
+  apt: name=docker-engine state=latest
+  when: docker_installed.stdout | version_compare(docker_min_version,  '<')
+
+

distutils.version で試してみる

+
>>> from distutils.version import LooseVersion
+>>> LooseVersion('1.10.3') < LooseVersion('1.11.0')
+True
+>>> LooseVersion('17.05.0-ce') < LooseVersion('1.11.0')
+False
+
+
+
+
+

+ ansible + debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/12/01/2001.html b/blog/2017/12/01/2001.html new file mode 100644 index 00000000..06e0aef4 --- /dev/null +++ b/blog/2017/12/01/2001.html @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Mesos の sandbox のログローテーションをする + + + + +
+ + + +
+
+ +

Mesos の sandbox のログローテーションをする

+

+ Posted on Fri 01 December 2017 in blog + +

+
+ + +
+ + +
+ +

結論

+
    +
  • http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger
  • +
  • LogrotateContainerLogger を使って、 module parameter を設定する
  • +
+

概要

+

Mesos + Marathon 環境でdockerを動かしている。
+基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。
+調べてみると、 /var/lib/mesos-slave/slaves/ 以下にあるフォルダのうち、sandbox のログが肥大化していた。
+sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosからファイルとして取得することができる。
+長期的なものは fluentd で飛ばしているので問題ないため、障害時や直近の確認のために sandbox を使うことにして、
+短期間でのログローテーションを行うことにした。

+

設定方法

+

LogrotateContainerLogger の利用が可能か調べる

+

共有オブジェクト /usr/lib/liblogrotate_container_logger.so にあることを確認する。
+パスが違っても良いが、その場合は以下で出てくるパスも変更する。

+

モジュールの設定ファイルを書く

+

/etc/mesos_slave_modules.json として以下を書く。

+
{
+  "libraries": [{
+    "file": "/usr/lib/liblogrotate_container_logger.so",
+    "modules": [{
+      "name": "org_apache_mesos_LogrotateContainerLogger"
+      # パラメータを指定するときはここに書く
+    }]
+  }]
+}
+
+

モジュールの有効化

+

/etc/mesos-slave/modules として、以下が書かれたファイルを置く。

+
file:///etc/mesos-slave-modules.json
+
+

/etc/mesos-slave/container_logger として、以下が書かれたファイルを置く。

+
org_apache_mesos_LogrotateContainerLogger
+
+

mesos-slave の起動

+

mesos-slave を起動する。

+

動作確認

+

sandbox を見ると、 stdout.logrotate.conf, stderr.logrotate.conf が出来ている。

+

+

ファイルの中身は

+
/path/to/stdout/ {
+## logrotate オプション: パラメータで指定してない場合は size 10481664 くらいしかない
+}
+
+

となっている。

+
+
+
+

+ mesos + docker +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2017/12/05/1748.html b/blog/2017/12/05/1748.html new file mode 100644 index 00000000..ddf7b823 --- /dev/null +++ b/blog/2017/12/05/1748.html @@ -0,0 +1,415 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話 + + + + +
+ + + +
+
+ +

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + +

+
+ + +
+ + +
+ +
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果としてTerraform を導入し、Terraform (+ Terraform for さくらのクラウド) + Ansible で運用することになりました。
+導入までの課題と、どのように導入・利用しているのか、について書きたいと思います。

+

運用の課題

+

検証環境と本番環境で構成に差分があり、それに気づきづらい

+

mesos+marathon を利用したコンテナ実行環境を使ったマイクロサービスアーキテクチャになっていて、それ以外にも、redis, memcached, メッセージキューなどいろいろなコンポーネントがあります。
+そのため、個別の開発者がクリーンな環境を気軽に用意しづらいです。

+

インフラの構成を変更したいと思ったとき、個別の開発者がクリーンな環境を個別に作るのは手間がかかってしまうため、直接検証環境でテストしがちです。その際に、行われた変更がそのまま残ってしまい、本番環境との差が残ってしまっているケースがありました。

+

Ansible Playbook の内容と現実に差分がある

+

もともとOS内の設定はansibleで管理していたのですが、対象ホストの増加、ansible playbookの肥大化に伴い、実行時間が増えてしまいました。
+それに伴い、--limit, --tags をつけて部分的に実行するようになり、playbook と差分が散見されるようになりました。

+

方針

+

ansible は全部実行しろ、などとルールを作ることは簡単なのですが、上記に書いたとおり、心理的なハードルによって発生している問題だと思いました。そこでルール化することはエンジニアリングの敗北という感じがしたので、差分がわかるように構成管理することと、差分を定期的にチェックして通知することに集中することにしました。

+

構成管理として、OS内の部分はansibleを利用していたためそのまま利用し、インフラの構成管理としては、ちょうど Terraform for さくらのクラウド もあったため、terraformを利用することにしました。

+

差分の検知としては、terraform plan, ansible check mode を定期的に実行することにしました。

+

terraform 導入のために

+

terraform のフォルダ構成

+

他のクラウドでのベストプラクティス を参考に、フォルダ構成は以下のようにしています。
+terraform plan, apply などする場合には、 pod-xxx ディレクトリ配下で実行します。

+
.
+├── module
+│   └── sakuracloud
+│       ├── compute
+│       │   ├── compute.tf          // compute のエントリーポイント。各roleのモジュールへ変数を渡す
+│       │   ├── role-hoge           // role ごとに作成
+│       │   │   └── role-hoge.tf    // util の base-wrapperへ変数を渡す。role固有の変数変換はここでやる
+│       │   └── util                // 他のroleから読まれる
+│       │       ├── base-wrapper    // instance と service-dns を呼ぶためのやつ。他のroleからはこいつを見る
+│       │       ├── instance        // 個別のサーバーの、サーバー/ディスク/DNSレコードの作成
+│       │       └── service-dns     // roleごとに、DNSレコードがある場合(VIPに紐づくレコードなど)
+│       ├── dns                     // さくらのクラウドのドメイン/DNSレコードを管理するために利用
+│       │   ├── dns.tf
+│       │   └── example
+│       │       ├── example.tf
+│       │       └── output.tf
+│       ├── gslb                    // さくらのクラウドのGSLBを管理するために利用
+│       │   ├── api
+│       │   │   └── api.tf
+│       │   └── gslb.tf
+│       ├── network                 // さくらのクラウドのスイッチ/ルーターを管理するために利用
+│       │   ├── internal
+│       │   │   ├── internal.tf
+│       │   │   └── output.tf
+│       │   ├── network.tf
+│       │   └── output.tf
+│       └── simple-monitor          // さくらのクラウドのシンプル監視を管理するために利用
+│           └── simple_monitor.tf
+└── providers
+    └── sakuracloud
+        └── pod-xxx                 // システム単位ごとに作る
+            ├── pod-xxx.tf          // compute.tf, dns.tf, ... などのモジュールごとのエントリーポイントへ変数を渡す
+            ├── terraform.tfstate.d // tfstate。env (今で言うworkspace) で本番と検証環境をわけてる。
+            │   ├── dev
+            │   └── ...
+            └── terraform.tfvars    // 変数をひたすら書く。具体的な値は全てここに書かれているはず。
+
+

大体はさくらのクラウドのコンポーネントごとに、moduleを作っているのですが、compute のところは大きく変更しています。
+サーバー作成と同時に、ディスクの作成や、DNSレコードの作成を行うためです。

+

例えば、role-hoge というロールが2台あるとき、tfvar中では以下のような変数を作っています。

+
sakuracloud_dns_foo = {
+  dev.zone = "dev.example.com"
+  staging.zone = "staging.example.com"
+}
+
+sakuracloud_role_hoge = {
+  dev.ipaddresses = ["192.168.0.10", "192.168.0.11"]
+  dev.server_tags = ["hoge", "develop", "__with_sacloud_inventory", "starred"]
+  dev.disk_tags = ["hoge"]
+  staging.ipaddresses = ["192.168.1.10", "192.168.1.11"]
+  staging.server_tags = ["hoge", "staging", "__with_sacloud_inventory", "starred"]
+  staging.disk_tags = ["hoge"]
+
+

これを使って、dev環境でサーバー作成したとき

+
    +
  • サーバー名をFQDNに一致させる
      +
    • hoge-01.dev.example.com, hoge-02.dev.example.com
    • +
    +
  • +
  • DNSレコードも合わせて作成する
      +
    • Aレコードとして hoge-01.dev.example.com は192.168.0.10, hoge-02.dev.example.com は192.168.0.11 に対応させる
    • +
    +
  • +
  • サーバータグとして、ansibleのroleをつける
      +
    • hoge, develop, staging がansible側で利用しているロール名です
    • +
    +
  • +
  • サーバータグとして、 __with_sacloud_inventory をつける
      +
    • 一応、terraform 管理外のリソースを許すためにつけています
    • +
    +
  • +
  • サーバータグとして、 @group=a などのグループタグをつける
      +
    • 1つ目のサーバーはa、2つ目はb、...4つ目はd、5つ目はaなどとしています
    • +
    +
  • +
+

既存リソースをterraformにimport

+

既存のリソースをインポートします。形式としては、以下のような形式です。

+
terraform import 'module.hoge.module.base-instance.sakuracloud_server.base[0]' _リソースID_
+
+

注意点としては、tfファイルを書いたあと、terraform planすれば、何をインポートしないといけないかわかるのですが、
+その表示では、module.hoge.base-instance.sakuracloud_server.base[0] というように、途中にmoduleがない形式で表示されます。 import するには都度moduleを書く必要があります。

+

また、さくらのクラウドにはリソースIDがないけど、terraform で管理できるものがあります。例えばDNSレコードがそうです。
+この場合、リソースIDに当たるものを自分で作成する必要があります。
+どのように生成するかは、 terraform for さくらのクラウドのソースを見ればよいのですが、参考までにgolangで生成する例を載せておきます。
+https://play.golang.org/p/OvQw6BdxVf

+

ansible の dynamic inventory のスクリプト作成

+ +

上記のようなsacloud_inventory.pyスクリプトをansibleのリポジトリに実行権限をつけて用意しています。
+それにより、 ansible-playbook -i sacloud_inventory.py ... とすることで、インベントリファイルを書くことなくansibleを実行できます。

+

このスクリプトで、さくらのクラウドのAPIを叩くところはすべて、 usacloud におまかせしています。
+先程の terraform の例であったように、 __with_sacloud_inventory が入っていないものは全部無視し、タグは全てグループ名にすることにしています。
+(13-22行目は、Ansible TowerのOSS版であるAWX を試しているために入れています。)

+

もしかしたら、さくらのクラウドの特殊タグである @group=a などは除いた方が使いやすいかもしれませんが、監視側からも見るために現状はすべて入れています。

+

ansible 側の準備

+

ansible-playbook -i sacloud_inventory.py site.yml --check をしたいのですが、しばしば check modeで実行できていないplaybookや、変更がないのにchangedにしているplaybookがあります。これを直しましょう。
+check modeで実行できていない、典型的なものとしては以下のようなものがあります。

+

別のtaskの実行結果を参照している

+

register を使っているタスクAの結果を参照しているタスクBがある場合、check mode 中でAが実行されないため、タスクBのcheck実行時に変数が参照できないエラーが出ます。
+これを防ぐには、register を使っているタスクAに check_mode: no をつけることです。
+check modeでも本当に実行されるようになるため、例えば、ファイルの存在だけを確認している場合など、副作用がない場合のみ、 check_mode: no をつけましょう。

+

check modeに対応していない(特にshellモジュール)

+

実行する判断を行うようなタスクを作って、その結果次第で、タスクを実行するように書き換えます。
+新しく作成したタスクでは、上述の通り副作用がないようにし、 check_mode: no をつけましょう。

+

補足: DNSゾーンファイルの更新

+

今回、check modeで実行可能にするためにplaybookをみなしていると、ansible で更新されていないものとして、template指定されたDNSゾーンファイルがありました。
+ゾーンファイルは、シリアルを増やしていく必要があるため、面倒だったのだと思います。

+

確かに、言われるとめんどくさいような気もしますが、やってみると以下のようにすれば良さそうです。

+
    +
  1. 現在のzone fileを見て、現在の serial を取り出し、registerで変数に入れる
  2. +
  3. template ファイルに、 1.で取ったserialを入れて、差分があるかどうかを確かめる
  4. +
  5. もし、2.で差分があったら serialをインクリメントした上で、template を実行する
  6. +
+

実際に書いてみると以下のようになると思います。(NSDを利用した場合の例)

+
server:
+    port: 10053
+    zonesdir: "/etc/nsd/zones"
+
+{% for zone in dns.zones %}
+zone:
+    name: "{{ zone }}"
+    zonefile: "{{ zone }}"
+
+{% endfor %}
+
+
- block:
+  - name: parse serial from zone file
+    shell: grep ";Serial" /etc/nsd/zones/{{ item }} | awk '{print $1}'
+    with_items: "{{ dns.zones }}"
+    register: old_serials
+    check_mode: no
+    changed_when: no
+    tags: nsd
+  - name: check whether zone files updated or not
+    template: src=zones/{{ item.1 }}.j2 dest=/etc/nsd/zones/{{ item.1 }} owner=root group=root mode=0644
+    vars:
+      serial: "{{ old_serials.results[item.0].stdout }}"
+    with_indexed_items: "{{ dns.zones }}"
+    diff: no
+    register: zonefiles_changed
+    tags: nsd
+  - name: update zonefile when changed
+    template: src=zones/{{ item.1 }}.j2 dest=/etc/nsd/zones/{{ item.1 }} owner=root group=root mode=0644
+    vars:
+      serial: "{{ old_serials.results[item.0].stdout|int + 1 }}"
+    when: zonefiles_changed.results[item.0].changed
+    with_indexed_items: "{{ dns.zones }}"
+    notify: reload nsd
+    tags: nsd
+
+

定期的な差分チェック

+

ここまでくれば、あとはcronなりJenkinsで、terraform planansible-playbook -i sacloud_inventory.py site.yml --check を定期的に走らせて、差分があったらslackなりに通知すればオッケーです。
+Jenkinsからapplyするようにしておけば、より良いと思います。

+

感想と今後に向けて

+

ここではインフラのデプロイをどのように改善してきたのかを書きました。
+usacloud や Terraform for さくらのクラウドがあるおかげで、規模が大きくなっても楽に管理できている実感があります。
+実際、雑に自前スクリプトを書いていたものも捨てていっているところです。

+

この記事で書いたようにインフラの整合性を確かめることができるようになったので、今後としては、

+
    +
  • (ansibleの実行を AWX で行う(だいたいできた) )
  • +
  • インフラ/アプリケーションのCDを行うための監視改善。特に node/service discovery改善
  • +
  • アプリケーションのCD
  • +
  • terraform, ansible の自動適用
    +などを目標に改善活動を行っていく予定です。
  • +
+
+
+
+

+ sakrua + ansible + terraform +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2018/02/05/2009.html b/blog/2018/02/05/2009.html new file mode 100644 index 00000000..c71f0f36 --- /dev/null +++ b/blog/2018/02/05/2009.html @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ + + + + +
+ + + +
+
+ +

Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ

+

+ Posted on Mon 05 February 2018 in blog + +

+
+ + +
+ + +
+ +

概要

+

Google Pub/SubGoのSDK から使おうとしていました。
+やっているといくつか詰まったので、メモしておきます。

+
    +
  1. サービスアカウントを利用するためにCredentials JSONを指定する
  2. +
  3. サブスクリプションの Pub/Sub サブスクライバー権限 を与えても Permission Denied になる
  4. +
+

サービスアカウントを利用するためにCredentials JSONを指定する

+

権限の都合上、サービスアカウントのCredentials JSONを利用して認証したい、という要件がありました。
+ドキュメントを見ていると、 ADC(Application Default Credentials) を利用して認証している場合が多いです。
+これを使う場合、 GOOGLE_APPLICATION_CREDENTIALS という環境変数が設定されていれば、そのファイルを読んでくれるのですが、今回の要件では複数の Credentials を利用したかったので、Go プログラム中で指定する必要がありました。

+

結論としては、以下のような形でpubsub client を作るときに認証情報を渡すことができます。

+
  jsonKey, err := ioutil.ReadFile(credentialJSONPath)
+  conf, err := google.JWTConfigFromJSON(jsonKey, pubsub.ScopePubSub, pubsub.ScopeCloudPlatform)
+  if err != nil {
+    log.Fatal(err)
+  }
+  ctx := context.Background()
+  ts := conf.TokenSource(ctx)
+  c, err := pubsub.NewClient(ctx, projectID, option.WithTokenSource(ts))
+
+

Publisherのサンプルは以下の通りです。

+ +

サブスクリプションの Pub/Sub サブスクライバー 権限を与えても Permission Denied になる

+

結論としては、 Pub/Sub サブスクライバー 権限に加えて、 Pub/Sub 閲覧者 の権限が必要でした。
+ドキュメント上は、 Pub/Sub サブスクライバー 権限だけで良さそうに見えますが、権限不足だったようでした。
+Subscriberのサンプルは以下の通りです。

+ +
+
+
+

+ GCP + golang +

+
+ + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2018/04/05/1420.html b/blog/2018/04/05/1420.html new file mode 100644 index 00000000..0f65ed1b --- /dev/null +++ b/blog/2018/04/05/1420.html @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – PyPIへパッケージをアップロードする + + + + +
+ + + +
+
+ +

PyPIへパッケージをアップロードする

+

+ Posted on Thu 05 April 2018 in blog + +

+
+ + +
+ + +
+ +

資料

+
    +
  • パッケージ構成については github.com/pypa/sampleproject
  • +
  • https://pypi.python.org/pypi/twine
  • +
  • https://packaging.python.org/tutorials/distributing-packages/
  • +
+

手順

+

PyPIへユーザー登録する

+

PyPI には普段使われている本番環境とは別に、テスト環境がある。
+アカウントがそれぞれ独立しているので、両方で作成する必要がある。

+ +

.pypirc の作成

+

以下のように ~/.pypirc を作成して、test 環境を利用できるようにしておく。
+平分でパスワードを書くことになるので、最低限パーミッションを変えておくことにする。

+
$ cat ~/.pypirc
+[distutils]
+index-servers =
+  pypi
+  testpypi
+
+[pypi]
+repository=https://upload.pypi.org/legacy/
+username=_username_
+password=_password_
+
+[testpypi]
+repository=https://test.pypi.org/legacy/
+username=_username_
+password=_password_
+
+$ chmod 0600 ~/.pypirc
+
+

パッケージのアップロード

+

コマンドのインストール

+
$ pip install twine
+
+

パッケージング前のチェック

+
$ pip install check-manifest
+$ check-manifest
+
+

パッケージング

+
$ pip install wheel
+$ python setup.py sdist bdist_wheel
+
+

Test 環境へアップロード

+
$ twine upload -r testpypi dist/*
+
+

pip でインストールするには、以下のようにする。

+
$ pip install --index-url https://test.pypi.org/simple/ _package_
+
+

本番へアップロード

+
$ twine upload dist/*
+
+
+
+
+

+ pypi + python +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2018/04/11/1058.html b/blog/2018/04/11/1058.html new file mode 100644 index 00000000..34752d43 --- /dev/null +++ b/blog/2018/04/11/1058.html @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Debian でログインシェルをzshにしている人が snappy を使う場合の注意 + + + + +
+ + + +
+
+ +

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + +

+
+ + +
+ + +
+ +

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バージョンの不整合がおきる、という問題は起きない。

+

snapcraftのページではパッケージングの方法も紹介されているので、配布したい人自身がsnapパッケージを作りやすいはず。
+少なくとも、ディストーションごとのパッケージを各アプリケーション作成者がやるよりは、遥かにやりやすい。
+自動アップデートとかもあるので、サービス提供者が利用者に常に最新版を使ってもらいたい場合などにメリットもある。
+実際、 Ubuntu以外にも、Debian, Arch Linux, Gentoo, Fedora, open SUSE などでも利用できる。

+

Snappy は、snapd というAPIデーモンが動くことになっている。

+

snappy のインストール

+
$ sudo apt install snapd
+
+

snap パッケージのインストール

+
$ sudo snap install hello-world
+
+

困ったこと

+
    +
  • Snappy でインストールしたアプリケーションへのパスが通らない
  • +
  • Snappy でインストールしたデスクトップアプリケーションが、menuに登録されない
  • +
+

調べたこと

+

バージョン

+

Kernel はpinningしているので、少し古い。

+
$ snap version
+snap    2.32.3
+snapd   2.32.3
+series  16
+debian
+kernel  4.9.0-3-amd64
+
+

snappy でインストールした場合のパス

+
    +
  • 実態はバージョンごとに、 /snap/_app_name_/_version_/ 以下に置かれる。現在利用しているものへのリンクは /snap/_app_name_/current/
  • +
  • コマンドは、 /snap/bin/ 以下にコピーされる。
  • +
  • デスクトップエントリのファイルは /var/lib/snapd/desktop/applications/*.desktop というファイルが作成される
  • +
+

パスの設定方法について

+

/etc/profile.d/apps-bin-path.sh にパスを設定するためのスクリプトが置かれている。

+
$ cat /etc/profile.d/apps-bin-path.sh
+#!/bin/sh --this-shebang-is-just-here-to-inform-shellcheck--
+
+# Expand $PATH to include the directory where snappy applications go.
+if [ "${PATH#*/snap/bin}" = "${PATH}" ]; then
+    export PATH=$PATH:/snap/bin
+fi
+
+# desktop files (used by desktop environments within both X11 and Wayland) are
+# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for
+# snappy applications' desktop files.
+if [ "${XDG_DATA_DIRS#*/snapd/desktop}" = "${XDG_DATA_DIRS}" ]; then
+    export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:/var/lib/snapd/desktop"
+fi
+
+

zsh では /etc/profile などを読まないので、パスが設定できていない。
+/etc/zsh/zprofile に、上記の内容を書いて置けば良い。
+あるいは、 /etc/zsh/zprofile で以下のようにする。

+
for i in /etc/profile.d/*.sh ; do
+    [ -r $i ] && source $i
+done
+
+
+
+
+

+ debian + snappy + zsh +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2018/10/31/1901.html b/blog/2018/10/31/1901.html new file mode 100644 index 00000000..efd8e41d --- /dev/null +++ b/blog/2018/10/31/1901.html @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – DebianでLuaJITTeXを使いたい + + + + +
+ + + +
+
+ +

DebianでLuaJITTeXを使いたい

+

+ Posted on Wed 31 October 2018 in blog + +

+
+ + +
+ + +
+ +

そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。

+

参考

+ +

未解決の問題

+
    +
  • /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST が自動生成されている、とコメントされているが、元ファイルがわからない
  • +
+
### This file was automatically generated by update-fmtutil.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on how to override things from here.
+#
+###
+
+

準備

+

パッケージインストール

+
sudo apt install texlive-lang-japanese texlive-latex-extra texlive-luatex
+# 参考文献とか書くとき
+sudo apt install texlive-bibtex-extra biber
+
+

/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST を編集したい。(未解決の項目に書いた通り、元ファイルがわからないので直接編集している)

+
@@ -6,7 +6,7 @@
+ ###
+ dviluatex luatex language.def,language.dat.lua dviluatex.ini
+ etex pdftex language.def -translate-file=cp227.tcx *etex.ini
+-#! luajittex luajittex language.def,language.dat.lua luatex.ini
++luajittex luajittex language.def,language.dat.lua luatex.ini
+ luatex luatex language.def,language.dat.lua luatex.ini
+ mf mf-nowin - -translate-file=cp227.tcx mf.ini
+ pdfetex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini
+@@ -14,7 +14,7 @@
+ tex tex - tex.ini
+ dvilualatex luatex language.dat,language.dat.lua dvilualatex.ini
+ latex pdftex language.dat -translate-file=cp227.tcx *latex.ini
+-#! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
++luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
+ lualatex luatex language.dat,language.dat.lua lualatex.ini
+ mptopdf pdftex - -translate-file=cp227.tcx mptopdf.tex
+ pdflatex pdftex language.dat -translate-file=cp227.tcx *pdflatex.ini
+
+

使い方

+
luajittex --fmt=luajitlatex.fmt {tex file}
+
+

問題なくコンパイルできれば、pdfが生成されるはず。

+

VSCodeでTeXする

+

LaTeX Workshop をインストールして、以下の設定をする。
+参考文献が必要なときは、 luajittex_with_bib のレシピでビルドするように書いている。

+
{
+    "latex-workshop.chktex.enabled": true,
+    "latex-workshop.latex.recipes": [
+        {
+            "name": "luajittex",
+            "tools": ["luajitlatex"]
+        },
+        {
+            "name": "luajittex_with_bib",
+            "tools": [
+                "luajitlatex",
+                "biber",
+                "luajitlatex",
+                "luajitlatex"
+            ]
+        },
+    ],
+    "latex-workshop.latex.tools": [
+        {
+            "name": "luajitlatex",
+            "command": "luajittex",
+            "args": [
+                "--cmdx",
+                "--synctex=1",
+                "--fmt=luajitlatex.fmt",
+                "%DOCFILE%"
+            ]
+        },
+        {
+            "name": "biber",
+            "command": "biber",
+            "args": [
+                "%DOCFILE%"
+            ]
+        }
+    ],
+    "latex-workshop.intellisense.surroundCommand.enabled": true,
+    "latex-workshop.synctex.afterBuild.enabled": true,
+}
+
+

その他実際のTeXを書く時に参考になりそうなもののメモ

+ +
+
+
+

+ tex + debian +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2019/01/25/1454.html b/blog/2019/01/25/1454.html new file mode 100644 index 00000000..63df6966 --- /dev/null +++ b/blog/2019/01/25/1454.html @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – CloudFormation の不満点 + + + + +
+ + + +
+
+ +

CloudFormation の不満点

+

+ Posted on Fri 25 January 2019 in blog + +

+
+ + +
+ + +
+ +

以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。

+

要点

+
    +
  • CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない
  • +
  • Drift 検出は誤検出が多すぎて使いづらい
  • +
  • Change Set は動いている状態との差分を見ていないので、信用できない
  • +
+

経緯

+

CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。
+ただ、各サービスの担当者ごとにある程度自由にオペレーションできるため、手動で変更されていないか、一応調べておこうと思い、
+2018-11 にリリースされたドリフト検出 を使って、
+手作業で実施された変更点もCloudFormationに取り込みつつ、対応しようとした。

+

期待したこと

+
    +
  • CloudFormation のスタックがたくさんあるため、1つ1つ細かく差分を見て修正することが難しい
  • +
  • ドリフト検出されたところだけ1つずつ修正していって、Change Setを作りながら現状に合わせたい
  • +
+

実際

+

ドリフト検出

+ +

Change Set

+
    +
  • 実際に動いているシステムとの差分を見ていない
  • +
  • 前回の設定とのスタックの差分を見ている
  • +
  • 手作業で変更されているとChange Setの実行に失敗する(実際には差分がないので)
  • +
  • その場合 Update Stack するしかない
  • +
+

例えば、手作業でタグを増やしたとして、翌営業日にCloudFormationに反映したい、と思った場合、
+ドリフト検出で誤検知を目でフィルタしつつ(誤検知だと確信が持てるかはわからない)、
+CloudFormation のパラメータを書き換えて、Update Stackしないといけない。
+(一応、Update Stack 前に Change Set で差分を見て、execute して失敗することを確認したほうが安心感はある。)

+

まとめ

+

手作業の変更をできないようにしておく以外にない。
+あるいは、本格的にCloudFormationを利用し始めるまでの間に Terraform に移行する。

+

(なんでChange SetをRunnning Stateとの比較にしなかったんだろう...)

+
+
+
+

+ aws + cloudformation +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2019/02/12/1630.html b/blog/2019/02/12/1630.html new file mode 100644 index 00000000..9d61d515 --- /dev/null +++ b/blog/2019/02/12/1630.html @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった + + + + +
+ + + +
+
+ +

Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった

+

+ Posted on Tue 12 February 2019 in blog + +

+
+ + +
+ + +
+ +

資料

+ +

背景

+

とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。
+sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。

+
    +
  • コメントは消したくない
  • +
  • ブロックスタイルのままにしたい
  • +
  • diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)
  • +
+

ruamel.yaml

+

python で yaml を扱うときは、PyYAML が有名だと思う。
+PyYAMLを使う場合、yamlをloadしてdumpすると、フロースタイルなのは変更できるが、
+コメントは消えてしまうのに対応するのが簡単ではない(と思っている)。

+

ruamel.yaml はPyYAMLをフォークしたもので、YAML 1.2 をサポートしているし、コメントやスタイル、キーの順番を保つloaderが実装されている。
+https://yaml.readthedocs.io/en/latest/overview.html

+

使い方

+

使い方としては、 load, dumpの代わりに、 round_trip_load, round_trip_dump を使えば良い。
+オプションは自分が使っているconfigに合わせて使えば良い。

+
import ruamel.yaml
+import os
+
+def process(filepath):
+    with open(filepath, 'r+') as f:
+        data = ruamel.yaml.round_trip_load(f, preserve_quotes=True)
+        # 必要な処理をする
+        # data["foo"] = "bar"
+        if rewrite:
+            f.seek(0)
+            ruamel.yaml.round_trip_dump(data, f, explicit_start=True)
+            f.truncate()
+
+for pathname, dirnames, filenames  in os.walk('.'):
+    for filename in filenames:
+        print(f"{pathname}/{filename}")
+        process(f"{pathname}/{filename}")
+
+
+
+
+

+ python + yaml +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2021/10/12/0100.html b/blog/2021/10/12/0100.html new file mode 100644 index 00000000..59f8fe73 --- /dev/null +++ b/blog/2021/10/12/0100.html @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 1Password CLIを使ってTOTPを取得する + + + + +
+ + + +
+
+ +

1Password CLIを使ってTOTPを取得する

+

+ Posted on Tue 12 October 2021 in blog + +

+
+ + +
+ + +
+ +

2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。
+TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。
+ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。

+

1Password CLIの初期設定

+

1Password CLI を利用できるようにする。
+1Password CLIのGetting Startedを見て、初期設定する。

+
$ op signin _1password_url_ _signin_address_
+... # Secret Key, Password, (設定していればTOTPの6-digit)を聞かれる
+
+

短縮形が _1password_url_ から自動的に決まるが、どうしても指定したい場合には、 --shorthandオプションで指定する。

+

TOTPの取得

+

通常の1password appのように、30minアクセスがなければ、ロックされるため、パスワードの入力が必要。
+1passwordのURLが example.1password.com であれば、

+
$ eval $(op signin example)
+
+

として、再認証する。
+環境変数 OP_SESSION_example に認証したときのsession情報が載る。(--session オプションで各コマンドごとに渡しても良い)

+

TOTPを取得するには、以下のコマンドを実行する。

+
$ op get totp "UUID or Name"
+
+

UUIDで指定したい場合には、 op list items --categories Login の結果をjqなどで調べて、取得する。

+

終わり

+

以上で概ねやりたかった、CLIでTOTPを取得することができるようになった。
+最近1PasswordはLinux Desktop向けのアプリを出していたりしているので、もう少し真面目に使っていきたい所存。

+

ちなみに、複数のプロファイルの切り替えなどで便利なように、 99designs/aws-vaultというのもあるらしいが、特に使わずに自前シェルスクリプトで使っている。

+
+
+
+

+ aws + 1password +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/blog/2021/10/12/0200.html b/blog/2021/10/12/0200.html new file mode 100644 index 00000000..720117e8 --- /dev/null +++ b/blog/2021/10/12/0200.html @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – CloudFormation Stackを安全に削除する + + + + +
+ + + +
+
+ +

CloudFormation Stackを安全に削除する

+

+ Posted on Tue 12 October 2021 in blog + +

+
+ + +
+ + +
+ +

以前、CloudFormation の不満点 というのを書いたが、諦めて大半のCfnをterraformに移行した。
+その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。

+

概要

+

アイデアは簡単で以下の通り。

+
    +
  1. cfn の操作のみが許可されているIAM roleを作成する
  2. +
  3. 上記roleを指定して cfn stackをdeleteする
  4. +
+

モチベーション

+

そもそも以前の記事でも、予期せぬ手作業の変更があった場合に、ドリフト検出やChange setで検出・対応が難しいことを問題としていた。
+cfn stackを削除しようと思った場合、ドリフトしている状態だと、単純には削除できない。一旦cfn updateすれば簡単かもしれないが、何か手作業で変更されているかもしれない状況だと、updateしたくない。
+cfn updateをせずに、安全にcfn stackをdeleteしたい。

+

方法

+

cfnの操作しかできないIAM roleを作成する

+

以下の通り、terraformで作成した。

+
resource "aws_iam_role" "delete_cfn_stack" {
+  name = "delete-cfn-stack"
+  path = "/"
+
+  assume_role_policy = jsonencode({
+    Version = "2012-10-17"
+    Statement = [
+      {
+        Action = "sts:AssumeRole"
+        Effect = "Allow"
+        Sid    = ""
+        Principal = {
+          Service = "cloudformation.amazonaws.com"
+        }
+      },
+    ]
+  })
+}
+
+resource "aws_iam_role_policy" "delete_cfn_stack_policy" {
+  name = "cfn_policy"
+  role = aws_iam_role.delete_cfn_stack.id
+  policy = jsonencode({
+    Version = "2012-10-17"
+    Statement = [
+      {
+        Effect = "Allow"
+        Action = [
+          "cloudformation:*",
+        ]
+        Resource = "*"
+      },
+    ]
+  })
+}
+
+

上記のroleでスタック削除する

+
export STACK_NAME=stack_name
+
+# 失敗するdeleteを実行
+aws cloudformation delete-stack --role-arn arn:aws:iam::_aws_account_id_:role/delete-cfn-stack --stack-name ${STACK_NAME}
+
+# resource idのリストを取得
+aws cloudformation describe-stack-resources --stack-name ${STACK_NAME} | jq '.StackResources[].LogicalResourceId' | xargs
+
+# 削除しないリソースとして上の結果を指定
+aws cloudformation delete-stack --role-arn arn:aws:iam::_aws_account_id_:role/delete-cfn-stack --stack-name ${STACK_NAME} --retain-resources (↑の結果をペースト)
+
+

終わり

+

地道にterraform importしてから、上記をコツコツ(スクリプト化して)実行して、cfn stackを削除した。
+terraform importは単純に差分がなくなるまでtf fileを修正するだけなので、そんなに困ることはない。
+これで安心・安全にリソース管理できるようになった。

+
+
+
+

+ aws + cloudformation +

+
+ + + + + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/categories.html b/categories.html new file mode 100644 index 00000000..e6bfcf24 --- /dev/null +++ b/categories.html @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Categories + + + + +
+ + + +
+
+

Categories

+
+
+ +
+
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog.html b/category/blog.html new file mode 100644 index 00000000..c912a117 --- /dev/null +++ b/category/blog.html @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

CloudFormation Stackを安全に削除する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以前、CloudFormation の不満点 というのを書いたが、諦めて大半のCfnをterraformに移行した。
+その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。

+

概要

+

アイデアは簡単で以下の通り。

+
    +
  1. cfn の操作のみが許可されているIAM roleを作成する
  2. +
  3. 上記roleを指定して cfn stackをdeleteする
  4. +
+

モチベーション

+

そもそも以前の記事でも、予期せぬ手作業の …

+
+ + Continue reading + +
+
+
+
+
+

1Password CLIを使ってTOTPを取得する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, 1password +

+
+
+
+

2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。
+TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。
+ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。

+

1Password CLIの初期設定

+

1Password CLI を利用できるようにする。
+1Password CLIのGetting Startedを見て、初期設定 …

+
+ + Continue reading + +
+
+
+
+
+

Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった

+

+ Posted on Tue 12 February 2019 in blog + + • Tagged with + python, yaml +

+
+
+
+

資料

+ +

背景

+

とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。
+sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。

+
    +
  • コメントは消したくない
  • +
  • ブロックスタイルのままにしたい
  • +
  • diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)
  • +
+

ruamel.yaml

+

python で yaml を扱うときは …

+
+ + Continue reading + +
+
+
+
+
+

CloudFormation の不満点

+

+ Posted on Fri 25 January 2019 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。

+

要点

+
    +
  • CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない
  • +
  • Drift 検出は誤検出が多すぎて使いづらい
  • +
  • Change Set は動いている状態との差分を見ていないので、信用できない
  • +
+

経緯

+

CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。
+ただ、各サービ …

+
+ + Continue reading + +
+
+
+
+
+

DebianでLuaJITTeXを使いたい

+

+ Posted on Wed 31 October 2018 in blog + + • Tagged with + tex, debian +

+
+
+
+

そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。

+

参考

+ +

未解決の問題

+
    +
  • /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST が自動生成されている、とコメントされているが、元ファイルがわからない
  • +
+
### This file was automatically generated by update-fmtutil.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on …
+
+ + Continue reading + +
+
+
+
+
+

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + + • Tagged with + debian, snappy, zsh +

+
+
+
+

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バ …

+
+ + Continue reading + +
+
+
+
+
+

PyPIへパッケージをアップロードする

+

+ Posted on Thu 05 April 2018 in blog + + • Tagged with + pypi, python +

+
+
+
+

資料

+
    +
  • パッケージ構成については github.com/pypa/sampleproject
  • +
  • https://pypi.python.org/pypi/twine
  • +
  • https://packaging.python.org/tutorials/distributing-packages/
  • +
+

手順

+

PyPIへユーザー登録する

+

PyPI には普段使われている本番環境とは別に、テスト環境がある。
+アカウントがそれぞれ独立しているので、両方で作成する必要がある。

+ +

.pypirc の作成

+

以下のように ~/.pypirc を作成して、test 環境を利用できるようにしておく。
+平分でパスワードを書くことになる …

+
+ + Continue reading + +
+
+
+
+
+

Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ

+

+ Posted on Mon 05 February 2018 in blog + + • Tagged with + GCP, golang +

+
+
+
+

概要

+

Google Pub/SubGoのSDK から使おうとしていました。
+やっているといくつか詰まったので、メモしておきます。

+
    +
  1. サービスアカウントを利用するためにCredentials JSONを指定する
  2. +
  3. サブスクリプションの Pub/Sub サブスクライバー権限 を与えても Permission Denied になる
  4. +
+

サービスアカウントを利用するためにCredentials JSONを指定する

+

権限の都合上、サービスアカウントのCredentials JSONを利用して認証 …

+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + + • Tagged with + sakrua, ansible, terraform +

+
+
+
+
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果と …

+
+ + Continue reading + +
+
+
+
+
+

Mesos の sandbox のログローテーションをする

+

+ Posted on Fri 01 December 2017 in blog + + • Tagged with + mesos, docker +

+
+
+
+

結論

+
    +
  • http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger
  • +
  • LogrotateContainerLogger を使って、 module parameter を設定する
  • +
+

概要

+

Mesos + Marathon 環境でdockerを動かしている。
+基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。
+調べてみると、 /var/lib/mesos-slave/slaves/ 以下にあるフォルダのうち、sandbox のログが肥大化していた。
+sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosか …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog2.html b/category/blog2.html new file mode 100644 index 00000000..f8c7ebc2 --- /dev/null +++ b/category/blog2.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

Ansible でバージョンチェックする

+

+ Posted on Fri 10 November 2017 in blog + + • Tagged with + ansible, debian +

+
+
+
+

やりたいこと

+

サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。
+- インストールされていなかったらインストール
+- あるバージョン未満だったらアップデート

+

pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。
+いい感じに playbook の中でバー …

+
+ + Continue reading + +
+
+
+
+
+

Travis CIで git submodule update --init --recursive を止める

+

+ Posted on Tue 17 October 2017 in blog + + • Tagged with + git, travis-ci +

+
+
+
+

結論

+ +
git:
+  submodule: false
+
+
    +
  • 個別に git submodule update --init hoge していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 $TRAVIS_BUILD_DIR を使えば良い。
  • +
+

経緯

+

久しぶりにこのブログを書いたらビルドに失敗していた。
+原因としては、このブログで利用している getpelican/pelican-plugins のsubmoduleの設定によって、
+取得で …

+
+ + Continue reading + +
+
+
+
+
+

Intel NUC 上に vSphere 6.5 のVSAN環境を作る

+

+ Posted on Fri 13 October 2017 in blog + + • Tagged with + vmware +

+
+
+
+

あまりVMwareを触らなくなってきて、何も見ずにvCenterの設定とかMaximum configurationsとか言えなくなってきたので、VMware周りのことをメモに残しておくことにする。
+ひとまず、自宅のVSAN環境の構築メモ。

+

環境

+

以下の構成のIntel NUC 3台にESXiをインストールして、その上にvCenterを立て、VSAN環境を作る。

+
+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + + • Tagged with + sakura, terraform, peco +

+
+
+
+

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example …
+
+ + Continue reading + +
+
+
+
+
+

自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ

+

+ Posted on Wed 08 February 2017 in blog + + • Tagged with + coreos, containerlinux +

+
+
+
+

構成

+

Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。

+

OSイメージ

+

VMware用のイメージを利用。
+/usr/share/oem/cloud-config.yml に vmware tools周りの設定が入っているので便利。

+

password の変更

+

grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。

+

初期設定: cloud-config

+

/var/lib/coreos-install/user_data を編集する。
+(作法を無視すれば、 /usr/share/oem/cloud-config.yml でも良いはず。)

+
#cloud-config
+coreos:
+  units:
+    - name: docker-tcp.socket
+      command …
+
+ + Continue reading + +
+
+
+
+
+

Rust を始めるための設定

+

+ Posted on Tue 07 February 2017 in blog + + • Tagged with + rust, vim +

+
+
+
+

rust のインストール

+

公式からインストールのためのスクリプトが提供されている。
+これを使うと、rustup というrustのマネージャが使えるようになって、
+rustc のバージョンアップや切替なんかができるらしい。

+
## rustup のインストール
+curl https://sh.rustup.rs -sSf | sh
+
+## これを .zshrc などに加える
+source ${HOME}/.cargo/env
+
+

rust のツールのインストール

+

cargo というので、いろんなライブラリとかツールをダウン …

+
+ + Continue reading + +
+
+
+
+
+

ニフティ株式会社を退職しました

+

+ Posted on Tue 31 January 2017 in blog + + +

+
+
+
+

本日最終出社日でした。

+

ニフティでやったこと

+

ニフティでは、ニフティクラウドのIaaSを中心に仕事をしていました。
+基本的にずっと @ysaotome さんの下で働いており、
+チームメンバーも優秀だったので、とても面白い環境でした。

+

本来は仮想ネットワークチームという名前だったのですが、割と何でもやるチームで、
+自身がやっていた仕事も、仮想ファイアウォー …

+
+ + Continue reading + +
+
+
+
+
+

チーム活動で失敗したことの振り返り

+

+ Posted on Thu 15 December 2016 in blog + + • Tagged with + teaming +

+
+
+
+
+

これは、 NIFTY Advent Calendar 2016 の15日目です。

+

@plan0213 さんの 『ネットワーク機器へのコマンド入力自動化』でした。
+ネットワークインフラエンジニアが大好きな話でしたね。

+

はじめに

+

今日の記事ですが、私が社内でやっていたチーム活動について振り返りを書きます。
+特に、失敗した点に注目して共有することで役に立てばと思っています。
+大前提としては、私は一般社員であ …

+
+ + Continue reading + +
+
+
+
+
+

git bisect でバグ/仕様変更のコミットを探す

+

+ Posted on Thu 10 November 2016 in blog + + • Tagged with + git, ansible +

+
+
+
+

まとめ

+
    +
  • git bisect が便利
  • +
  • ansible 2.1.0 -> 2.1.1 で group名に / を入れるとうまく動かないケースが存在する
      +
    • ansible リポジトリでbisect すると対象のコミットは 7287effb5ce241ce645d61e55e981edc73fa382a
    • +
    • group名には / を入れないように、 group_vars 以下はフラットな構成にしよう
    • +
    +
  • +
+

遭遇した問題

+

ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、
+複数のリージョンやゾーンにまたがるシステムのため、うまく設 …

+
+ + Continue reading + +
+
+
+
+
+

DockerHub で docker build のオプションを設定したい

+

+ Posted on Tue 27 September 2016 in blog + + • Tagged with + docker, dockerhub +

+
+
+
+

参考リポジトリ

+
    +
  • https://github.com/hitsumabushi/docker-phpipam
  • +
+

目的

+
    +
  • Dockerfile の中で、 ARGを使いたい。
      +
    • LABEL としてビルドした日付や、 VCSのリビジョンを入れたい
    • +
    • ソフトウェアのバージョンをARGで指定したい
    • +
    +
  • +
+

やること

+
    +
  1. Dockerfile と同じ場所に、 hook ディレクトリを作成する。
  2. +
  3. hook ディレクトリ以下に、 build というファイルを作成する。
      +
    • build には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。
    • +
    • 自分で docker build …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog3.html b/category/blog3.html new file mode 100644 index 00000000..1e86c327 --- /dev/null +++ b/category/blog3.html @@ -0,0 +1,509 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

GnuPGのメモ @ Debian Sid

+

+ Posted on Tue 12 July 2016 in blog + + • Tagged with + gpg, debian +

+
+
+
+

Debain での GnuPG

+

GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。
+Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。
+普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。
+以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思っ …

+
+ + Continue reading + +
+
+
+
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+
+
+
+

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + + • Tagged with + debian, apt, s3 +

+
+
+
+

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバ …
+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読 …

+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

資料

+ +

NSX におけるVXLAN

+

関係する要素

+
    +
  • 論理スイッチ
  • +
  • 分散論理ルータ
  • +
  • 論理ルータコントロール …
+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

資料

+

最も公式っぽい資料

+ +

ブログ : シリーズものは一通り目を通した方が良い

+
+
+ + Continue reading + +
+
+
+
+
+

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系 …

+
+ + Continue reading + +
+
+
+
+
+

会社にslack入ったので、色々やってた

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + slack, hubot +

+
+
+
+

勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。

+

現在のチャンネル構成

+
    +
  • 定常系
      +
    • 分報用のチャンネル。個々人が作る
    • +
    • 部署用
    • +
    • チーム用
    • +
    • プロジェクト用
    • +
    +
  • +
  • 雑多な情報共有用
      +
    • ニュース用
    • +
    +
  • +
  • トラブル用
  • +
  • その他
      +
    • 臨時に必要になるとか
    • +
    • テストとか
    • +
    +
  • +
+

やったことメモ

+

RSS を Slack に移行

+

live dwango reader をずっと使っていたのだけど、更新頻度が …

+
+ + Continue reading + +
+
+
+
+
+

Anisble for Windows

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + ansible, windows +

+
+
+
+

久しぶりに ansible で windows を操作するので、メモ。
+実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。
+ansibleは2.1.0を使っている。

+

やること

+

以下を anisble で実行する。

+
    +
  1. Windows Update
  2. +
  3. Windows Server 2012 R2 に AD をインストール
  4. +
  5. ADに適当なダミーエントリを突っ込む
  6. +
+

初期設定

+

ansible 実行サーバーの準備

+

winrm経由で実行することになるので、 pywinrm が必要。

+
# pip install ansible pywinrm
+
+

Inventory

+
[windows_server …
+
+ + Continue reading + +
+
+
+
+
+

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + + • Tagged with + vyos, YAMAHA, NIFTY +

+
+
+
+

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog4.html b/category/blog4.html new file mode 100644 index 00000000..70a0c33e --- /dev/null +++ b/category/blog4.html @@ -0,0 +1,471 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

久しぶりにGitHub Pagesのjekyll触ったので、メモ

+

+ Posted on Fri 25 March 2016 in blog + + • Tagged with + jekyll, github +

+
+
+
+

このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、
+昔とだいぶ状況も変わっていそうだったので、メモをしておく。

+

gem

+

とりあえず、Gemfileを用意して、以下の2行を書く

+
source 'https://rubygems.org'
+gem 'github-pages'
+
+

全体的なconfig

+

GFMを使う

+

ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、_config.ymlに以下を追加しておいた方が良さそう。

+
markdown: kramdown
+kramdown:
+  input: GFM
+
+

related post …

+
+ + Continue reading + +
+
+
+
+
+

Travis コマンドでのエラー

+

+ Posted on Sat 02 January 2016 in blog + + • Tagged with + travis +

+
+
+
+

Travis CIでCIする素振りをしていたら、最新版のtravisコマンドでエラーが出るようになった。

+

発生した問題

+
$ travis setup releases
+Invalid scheme format: git@github.com
+for a full error report, run travis report
+
+

問題の解析

+

こういう時には、

+
$ travis report
+
+

をして、スタックトレースを見るものらしい。

+
$ travis report
+System
+Ruby:                     Ruby 2.3.0-p0
+Operating System:         Mac OS X 10.11.2
+RubyGems:                 RubyGems 2.5.1
+
+CLI
+Version:                  1.8.0
+Plugins:                  none
+Auto-Completion:          yes
+Last Version Check:       2016-01-02 14:54:05 +0900
+
+Session
+API Endpoint:             https://api.travis-ci.org/
+Logged In:                as "<username>"
+Verify SSL:               yes
+Enterprise:               no
+
+Endpoints
+org …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 6.0 でのHA機能のエンハンスの要点

+

+ Posted on Tue 08 December 2015 in blog + + • Tagged with + VMware, vSphere +

+
+
+
+

まとめ

+
    +
  1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。
  2. +
  3. vCenterは watchdogs によりプロセス落下時には再起動される
  4. +
  5. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある
  6. +
+

資料

+
    +
  1. VMware vSphere 6 のドキュメント
    +
  2. +
  3. http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf
  4. +
  5. vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)
  6. +
+

vSphere 5.5 までの …

+
+ + Continue reading + +
+
+
+
+
+

最近の仕事の振り返り

+

+ Posted on Sat 31 October 2015 in blog + + +

+
+
+

最近、仕事のやり方について考えている(悩んでいるに近いかも)ことが多いので、
+頭の中を整理するために、文章にしてみようと思う。

+

なので、技術的な内容は一切ない。

+ +

目次

+
    +
  1. スケジュール調整と突発案件
  2. +
  3. エンジニアの成長パス
  4. +
  5. 愚痴とポエム
  6. +
+

スケジュール調整と突発案件

+

前置き

+

どんな仕事にも突発的な仕事は大なり小なりあると思う。
+自分としては精神 …

+
+ + Continue reading + +
+
+
+
+
+

Dockerの細々としたメモ

+

+ Posted on Tue 15 September 2015 in blog + + • Tagged with + docker, debian +

+
+
+

Debian で利用する際のメモを書いておく。

+ +

grub でのカーネルパラメータ

+
    +
  1. systemd を利用する設定
  2. +
  3. cgroups で、メモリに制限をかけるための設定
  4. +
+
# quiet はあってもなくても良い
+GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

cgroups まわり

+

cgroups のディレクトリ配下に設定がある

+
/sys/fs/cgroup/cpu,cpuacct/docker/
+
+

network

+

参考: Dockerのネットワーク管理とnetnsの関係

+

docker コンテナを1つ立ち上げるごとに、vethデバイスができる …

+
+ + Continue reading + +
+
+
+
+
+

VM Resource Allocation

+

+ Posted on Sun 26 July 2015 in blog + + • Tagged with + math, papers, 論文 +

+
+
+

資料

+
+
+
+
+
+
+

Twitterからメールアドレス拾えるんじゃね?的な攻撃について

+

+ Posted on Fri 26 June 2015 in blog + + • Tagged with + security +

+
+
+

任意のTwitterアカウントの登録メールアドレス(伏せ字含)を表示させる攻撃が急増中(対策設定有り) というエントリが盛り上がっていたらしい。(とてもシェアされている)
+ただ、自分には有用な攻撃シナリオには見えなかったので、考えを整理するために書いておきます。
+自分はセキュリティ素人なので、間違った考察かもしれません。

+ +

リンク先ブログの主張 …

+
+ + Continue reading + +
+
+
+
+
+

runCをDebianで実行する

+

+ Posted on Tue 23 June 2015 in blog + + • Tagged with + runc, debian +

+
+
+

opencontainers/runc を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。

+ +

runCのインストール

+

golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。

+
git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc
+cd $GOPATH/src/github.com/opencontainers/runc/
+make
+sudo make install
+
+

状況

+

ディレクトリ構成

+
.
+├── container.json (とりあえず、runc spec で生成されるもので …
+
+ + Continue reading + +
+
+
+
+
+

Windowsの勉強を始めた

+

+ Posted on Mon 15 June 2015 in blog + + • Tagged with + Windows +

+
+
+

人生で初めて、Windowsの勉強を始めた。
+進捗は以下のgithub pagesから確認できる。
+とりあえず、章立てを書いて、内容を徐々に埋めているところ。

+ +

内容の誤りやコメントなどあれば、githubのissueで欲しい。

+
+
+
+
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog5.html b/category/blog5.html new file mode 100644 index 00000000..e487eeb5 --- /dev/null +++ b/category/blog5.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

WindowsをAnsibleで設定する

+

+ Posted on Thu 28 May 2015 in blog + + • Tagged with + Windows, ansible +

+
+
+
+

資料

+

Windows Support — Ansible Documentation

+

マシンの準備

+

ansibleコマンドを実行するマシン

+

ansibleがすでに実行できる状況であれば、

+
pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm
+pip install kerberos # AD accountを使う場合
+
+

とすればOK。

+

Windowsマシン

+

要件

+
    +
  1. WinRM がインストール済み
  2. +
  3. PowerShell version > 3.0
  4. +
  5. 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる
  6. +
  7. Windows Server 2012ははじめからPowershell 4.0がインストールされている
  8. +
+

セットアップ方法

+
    +
  1. Powershell 3.0にアップデートが必要な場合 …
+
+ + Continue reading + +
+
+
+
+
+

Ravelloが便利

+

+ Posted on Sat 09 May 2015 in blog + + • Tagged with + ravello, VMware +

+
+
+
+

VMware環境のテストをしたい

+

会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。
+今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。
+あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、という …

+
+ + Continue reading + +
+
+
+
+
+

Xmonadの設定

+

+ Posted on Sun 05 April 2015 in blog + + • Tagged with + debian, xmonad +

+
+
+
+

資料

+
    +
  1. http://xmonad.org/documentation.html
  2. +
  3. Archlinux Wiki - Xmonad
  4. +
  5. Xmonad/Config archive/John Goerzen's Configuration
  6. +
  7. Xmonadの設定 1/3 「基本」編 - ナレッジエース
  8. +
+

環境

+

Debian Sid & Xfce4

+

Install and Initial Configure

+

Package install

+
# basic packages
+sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev
+# for adding launcher
+sudo apt-get install dmenu
+# for status bar
+sudo apt-get install xmobar
+# tools
+sudo apt-get install suckless-tools scrot tilda trayer
+
+

Xsession

+
    +
  1. +

    add /usr/share/xsessions/custom.desktop

    +
    [Desktop Entry]
    +Name=Xsession
    +Exec=/etc/X11/Xsession
    +
    +
  2. +
  3. +

    ${HOME}/.xsession

    +
    xmodmap ~/.Xmodmap
    +exec xmonad
    +
    +
  4. +
+

Edit config

+
import XMonad
+
+main = do
+xmonad $ defaultConfig
+
+

Set xmonad as the default window manager

+
$ sudo update-alternatives --config x-window-manager
+
+

デフォルトのキーボードショートカットは、man xmonadで見ることができる。
+とりあえず、Alt + Shift …

+
+ + Continue reading + +
+
+
+
+
+

Hatena Engineer Seminar #4に行ってきました

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + 勉強会 +

+
+
+
+

Intro

+

タイトルどおり、行ってきました。
+目当ては、mackerelの話だったんですが、思ったより他の話も面白かったです。
+今回は抽選だったし、参加できなかった人のためにも、メモと感想を書いておきます。
+序盤の話はTwitterでつぶやいているので、参考までに。(後半はPCの電源が死んだのでないです)

+

資料は見つけたら追加します。

+

開会の挨拶

+

はてなの東京オフィスが増床 …

+
+ + Continue reading + +
+
+
+
+
+

fioを使ったベンチマーク

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + fio, benchmark +

+
+
+
+

Intro

+

ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。
+今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。
+ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。

+

オプション

+

オプションの与え方

+

以下の2つが使える。

+
    +
  • コマンドラインオプション …
+
+ + Continue reading + +
+
+
+
+
+

Easter Egg Collections

+

+ Posted on Sat 07 February 2015 in blog + + • Tagged with + 遊び +

+
+
+

イースターエッグは、見つかるとよく話題に上がっているけど、
+実際にどんなものがあるのか、よく知らないなー、と思ったので集めようと思う。
+ただ、調べてみると、昔あったものがなくなってたりして、このリストも最新状態に保つ必要があるので、なくなってたら教えてほしいです。

+

とりあえずは、いろいろ見つけるたびに徐々に更新していきたいと思い …

+
+ + Continue reading + +
+
+
+
+
+

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + + • Tagged with + Algorithm, papers, 論文 +

+
+
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノー …
+
+ + Continue reading + +
+
+
+
+
+

CROSS 2015のアンカンファレンスで話しました

+

+ Posted on Sat 31 January 2015 in blog + + • Tagged with + 勉強会, 脆弱性 +

+
+
+

CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。
+スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。
+たぶんプレゼン作成時間30分くらい。

+ + +

書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。
+自分自身は何か情報系の教育を受 …

+
+ + Continue reading + +
+
+
+
+
+

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + + • Tagged with + CROSS, 勉強会, 運営 +

+
+
+
+

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋 …

+
+ + Continue reading + +
+
+
+
+
+

Dockerのプロキシ設定

+

+ Posted on Thu 29 January 2015 in blog + + • Tagged with + Docker, Debian +

+
+
+

自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。
+bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、
+あらためて考えると解決できた。

+

結論は、dockerのデーモンが起動すると …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog6.html b/category/blog6.html new file mode 100644 index 00000000..92bbb4c3 --- /dev/null +++ b/category/blog6.html @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

DNS サーバーの比較資料集め

+

+ Posted on Mon 26 January 2015 in blog + + • Tagged with + DNS, Debian +

+
+
+

自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。
+DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。
+以下に、参考ページを列挙する。

+ +

参考になるページ

+

権威サーバ

+ +

キャッシュサーバ

+
+
+ + Continue reading + +
+
+
+
+
+

vShere Beta Program の注意点

+

+ Posted on Sun 25 January 2015 in blog + + • Tagged with + VMware +

+
+
+

VMware のBetaプログラムの利用について、基本的なルールがあるので、忘れないようにまとめた。
+ここに書いてあることは、オレオレ要約なので、きちんと自分で確認してください。

+

ざっくり言うと、「ここで知ったことは他で話すなよ」ってことでした。

+ +

資料

+ +

利用方法

+

上記ページから"Join Now!"して、規約に同意すれば良い。
+規約は以下の2つあるので、それぞれ同意 …

+
+ + Continue reading + +
+
+
+
+
+

VCP5-DCV取得した

+

+ Posted on Fri 16 January 2015 in blog + + • Tagged with + VMware, VCP +

+
+
+

最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。
+VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。

+ +

VCPトレーニングと試験内容のギャップ

+

トレーニングを受講しても、おそらく言われると思いますが、
+VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたこと …

+
+ + Continue reading + +
+
+
+
+
+

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + + • Tagged with + VMware, VCP, vDS +

+
+
+
+

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バイン …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+
+
+
+

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, VDP +

+
+
+
+

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる …
+
+ + Continue reading + +
+
+
+
+
+

ESXiをkickstartでインストールする

+

+ Posted on Tue 06 January 2015 in blog + + • Tagged with + VMware, ESXi +

+
+
+

ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。

+ +

利用OS

+
    +
  • ESXi 5.5
  • +
  • Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる)
  • +
+

DHCP, TFTP, HTTPサーバーの準備

+

必要なソフトウェアのインストール

+
apt-get install tftpd-hpa isc-dhcp-server xinetd apache2
+
+

DHCPサーバーの設定

+

BOOTPでインストールするため、あまり自由度がない。

+
+ +
+
+ + Continue reading + +
+
+
+
+
+

vCloud Airの価格感を調べる

+

+ Posted on Mon 05 January 2015 in blog + + • Tagged with + VMware, クラウド +

+
+
+
+

資料

+ +

vCloud Airとは

+

VMwareが提供している、ハイブリッドクラウドのサービス。

+

特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、
+vSphere Clientのプラグインと統合して操作ができることが挙げられる。

+

日本では、ソフトバンクと提携しているようだ

+

vCloud Air の価格感を調べる

+

大前提として、一般的なクラウドサービスと …

+
+ + Continue reading + +
+
+
+
+
+

2014年のまとめをしておかねば

+

+ Posted on Wed 31 December 2014 in blog + + • Tagged with + KPT +

+
+
+

今年1年は反省の多い年だったので、きちんと書いて残しておく。

+ +

2014年面白かった技術、触りたかったソフトウェア

+

新たに導入したもの

+
    +
  1. Ansible
  2. +
  3. Ceph
  4. +
  5. Pelican(このブログを生成してるやつ)
  6. +
  7. Flask
  8. +
+

ちょっとしか触れず...

+
    +
  1. VyOS
  2. +
  3. Consul
  4. +
  5. Fluentd
  6. +
  7. Golang
  8. +
  9. Docker
  10. +
  11. CoreOS
  12. +
  13. Hashicorpのツールその他
  14. +
  15. Hadoop
  16. +
+

触りたかったけど、触らず

+
    +
  1. Strom
  2. +
  3. Rust
  4. +
+

2014年のトピックス

+

思い返すと1月のこととかは何年も前に感じるが、今年は割と色々あっ …

+
+ + Continue reading + +
+
+
+
+
+

VCPの学習中のメモ

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VCP, VMware +

+
+
+

項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。
+特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。

+ +

VMware Data Recovery

+

資料

+ +

概要

+

デプロイ

+

OVF形式で提供されているので、OVF deployします。

+

動作

+

VMware vStorage API for Data Protectionを使って、バックアップを …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog7.html b/category/blog7.html new file mode 100644 index 00000000..f9873a49 --- /dev/null +++ b/category/blog7.html @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+
+

VCP-DCV取得のために勉強していたところ、NPIVという用語が出てきたので、調べてみたことを書いておきます。

+ +

資料

+
+
+ + Continue reading + +
+
+
+
+
+

VCP-DCVの概要 : VCP550

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

資料

+

VCP-Data Center Virtualization
+受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。

+

VCP-DCVの概要

+

バージョン

+

VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。
+例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。

+

さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバ …

+
+ + Continue reading + +
+
+
+
+
+

fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編)

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + Ruby, Fluentd +

+
+
+

本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。
+ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。

+ +

基本情報

+
    +
  1. +

    lib/fluent/plugin/{TYPE}_{NAME}.rb 以下がプラグインの本体。

    +
      +
    • TYPE : in, out, buf,... etc
    • +
    • NAME : プラグインの名前
    • +
    +
  2. +
  3. +

    pluginを書く時のお約束

    +
      +
    • Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する
    • +
    • 設 …
+
+ + Continue reading + +
+
+
+
+
+

VMware 環境でのMACアドレス割当て

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

1. まとめ

+

vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、

+
    +
  1. vCenter環境でプレフィックス指定
  2. +
  3. 固定割当て
  4. +
+

といった方法を使いましょう

+

2. MACアドレスの割当て方式

+
    +
  1. vCenterによる自動割当て
      +
    1. VMware OUI
    2. +
    3. プレフィックスベース
    4. +
    5. 範囲ベース
    6. +
    +
  2. +
  3. vCenterに接続されていないESXiによる自動割当て
  4. +
  5. 手動での割当て
  6. +
+

vCenterによる自動割当て

+

設定の …

+
+ + Continue reading + +
+
+
+
+
+

ソースコードリーディングをするときにctagsを使いたい

+

+ Posted on Tue 16 December 2014 in blog + + • Tagged with + Emacs, Ruby +

+
+
+

きっかけ

+

とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。
+でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。
+そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、
+ぱっと見でわからず、いちいち時 …

+
+ + Continue reading + +
+
+
+
+
+

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + + • Tagged with + CI, drone.io, pelican +

+
+
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分が …

+
+ + Continue reading + +
+
+
+
+
+

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + + • Tagged with + consul, provisioning, cluster +

+
+
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス …
+
+ + Continue reading + +
+
+
+
+
+

vSphere API事始め

+

+ Posted on Thu 14 August 2014 in blog + + • Tagged with + VMware +

+
+
+

リファレンス

+
    +
  • https://www.vmware.com/support/developer/vc-sdk/
  • +
  • https:// "vcenter_ip" /mob/
  • +
+

参考サイト

+
    +
  • http://thinkit.co.jp/story/2010/06/23/1617
  • +
+

Overview

+

Types

+

4つのタイプがある。

+ + + + + + + + + + + + + + + + + + + + + + + + + +
vSphere APIの型普通のプログラミングとの類推
managed object typeプリミティブ型、複合型
data object type抽象データ型
enumerated type定数
Fault type例外型
+

1. Managed object types

+

Managed object typeとは

+

(サーバーサイドのオブジェクトモデルの基本的なデータを担っている。data objectも同じく。)
+managed objectには、大きく2つの種類が …

+
+ + Continue reading + +
+
+
+
+
+

IPv6のことを調べ始めた

+

+ Posted on Tue 12 August 2014 in blog + + • Tagged with + IPv6 +

+
+
+

IPv6 環境構築

+

ひとまず参照すべきRFC

+
    +
  • RFC3315(DHCPv6) とそれをupdateしているやつ
  • +
  • RFC4861(Neighbor DiscoveryのIPv6バージョン)
  • +
  • RFC5942(IPv6のsubnet model)
  • +
+

IPv6 アドレス配布方式について

+

全体としては、下記の4パターンある。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
アドレス配布方式RAは必要?RAにプレフィックス情報は必要?m-flago-flag配布できるもの
手動xx---
ステートレスアドレス自動設定(SLAAC)oooffoffプレフィックスのみ
ステートフルDHCPv6oo(たぶ …
+
+ + Continue reading + +
+
+
+
+
+

DebianにOzをインストールする

+

+ Posted on Sun 27 July 2014 in blog + + • Tagged with + Debian, CTMCP +

+
+
+

ガウディ本読みはじめた。

+ + +

困ったこと

+

この本で使われるOzという言語をDebian上で実行するのに、少し困った。
+morzart2をダウンロードして、適当にインストールしただけだと、
+emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。
+正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。

+

このために、必要なパッケージが …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog8.html b/category/blog8.html new file mode 100644 index 00000000..ac730112 --- /dev/null +++ b/category/blog8.html @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

[論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads

+

+ Posted on Thu 17 July 2014 in blog + + • Tagged with + Paper +

+
+
+
+

読んだもの

+

http://research.google.com/pubs/pub41179.html

+

主な内容

+
    +
  • 『2種類の異なるストレージ(フラッシュとディスク)を複数のワークロードで共用する』効率的な使い方を最適化問題への帰着
    + 使い方に2つの戦略があって、『FIFO or LRU』。
  • +
  • LRUの方がキャッシュヒットレート的には良いけど、メトリクスを取るのが複雑になりがちなので、FIFOで良いのでは。
  • +
  • 実システムでの計測結果
  • +
+

使われて …

+
+ + Continue reading + +
+
+
+
+
+

DebianでZNCを使って、快適なIRC生活を送る

+

+ Posted on Mon 09 June 2014 in blog + + • Tagged with + Debian +

+
+
+

やりたいこと

+

最近、自分の興味のあるソフトウェアのIRCによく引きこもっています。
+自宅のPCはつけっぱなしにしておけば、全部のログを見れるのですが、
+会社やスマホで見るときには、接続している間のことしか確認できず、若干もどかしいです。

+

そういうわけで、ZNCサーバーを立てて、IRCのログを出先からでも確認できるようにしましょう。

+

実現するこ …

+
+ + Continue reading + +
+
+
+
+
+

WebHDFSで詰まったこと

+

+ Posted on Sun 08 June 2014 in blog + + • Tagged with + Hadoop, WebHDFS +

+
+
+

困っていたこと

+

HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。
+ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。
+しかし、実際にやっているとうまくいかないケースがあった。

+
% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open"
+HTTP/1.1 307 TEMPORARY_REDIRECT …
+
+ + Continue reading + +
+
+
+
+
+

LEDバックライトの調整

+

+ Posted on Mon 02 June 2014 in blog + + • Tagged with + Debian, Linux +

+
+
+

ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。
+GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。

+

環境

+
    +
  • PC: ASUS 24A
  • +
  • OS: Linux(Debian sid amd64)
  • +
+

調整可能な範囲

+
  cat /sys/class/backlight/intel_backlight/max_brightness
+
+ +

ディスプレイの明るさ変更

+
  # 明るさを800にするとき
+  echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness
+
+
+
+
+
+
+

Perl の正規表現

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

マッチ演算子

+

評価の結果は真偽値としては、マッチすれば真、そうでなければ偽。 +and, or, ! が役立つのは間違いない。

+
+

$_ にマッチさせる

+
/regex/
+m:regex:
+
+
+
+

string にマッチさせる

+
string =~ /regex/
+string =~ m:regex:
+
+
+
+

$_ の文字列置換

+
s/regex/new/
+s:regex:new:
+
+
+
+

string の文字列置換

+
string =~ s/regex/new/
+string =~ s:regex:new:
+
+
+
+
+

特殊なメタキャラクタ

+
+

^, $

+
    +
  • 行頭、末尾にマッチ
  • +
+
+
+

.

+
    +
  • ニューライン以外の任意の文字にマッチ
  • +
+
+
+

[chars]

+
    +
  • chars に含まれる任意の1文字にマッチ …
+
+ + Continue reading + +
+
+
+
+
+

Perlスクリプトメモ

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考文献

+
    +
  1. Perl基礎文法最速マスター
  2. +
  3. ミニマル perl
  4. +
+
+
+

スクリプトを書く時

+
    +
  • プラグマ +
  • +
  • 推奨 : スクリプト先頭に書く
  • +
+
use strict;
+use warnings;
+
+
    +
  • 1文字でも減らしたい

    +
    +
      +
    • print のデフォルト引数は、 $_
    • +
    • print $_; したいだけなら書く必要ない。
    • +
    +
    +
  • +
+
+
+

用語

+
+

レコード

+
    +
  • 1つのまとまりとして読み書きされる文字の集合
  • +
  • 入出力の際、ファイルはレコードの集まりと見ることができる。 +この時、デフォルトでは …
+
+ + Continue reading + +
+
+
+
+
+

VPLSについてのメモ

+

+ Posted on Mon 06 January 2014 in blog + + • Tagged with + vpls +

+
+
+
+

What is VPLS

+
    +
  • Virtual Private LAN
  • +
  • MACフレームを、ルーターを含むネットワークを超えて、やり取りするための技術の1つ
  • +
  • +
    MPLSはIPにラベルをつけるが、VPLSはMACにラベルをつけるというイメージ
    +
      +
    • ラベルを使う理由としては、元々、経路計算を高速にしたかったはずだけど、今はそんなに気にしなくて良いっぽい
    • +
    +
    +
    +
  • +
+
+
+

Why VPLS

+

MPLSが便利なのと、同じ。

+
    +
  • VPN
  • +
  • +
    TE(Trafic Engineering)
    +
      +
    • 明示的な経路選択
    • +
    • 回線使用率か …
+
+ + Continue reading + +
+
+
+
+
+

便利なツール

+

+ Posted on Thu 02 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

POD

+
    +
  • Plain Old Documentation
  • +
  • man perldoc を参照
  • +
+
+
+

lwp-request

+
    +
  • Webサーバーにリクエストを送って、適当な形式に変換してくれる
  • +
  • GET, POST, PUT も選べる。
  • +
  • 出力形式としては、 text, ps, links, html, dump
  • +
+
lwp-request -o text www.example.com
+
+
+
+

Text::Autoformat

+
+
+

Text::Tabs

+
    +
  • タブをスペースに変換
  • +
+
+
+

String::Approx

+
    +
  • あいまいなマッチをする
  • +
+
+
+

Template-Toolkit

+
+
+

Lingua::En::Inflect 'PL_N'

+
    +
  • 単数形と複数形を変換してくれる
  • +
+
+
+
+
+
+
+
+

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + pxe, preseed, kickstart +

+
+
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立 …
+
+ + Continue reading + +
+
+
+
+
+

実UID, 実行UID

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + linux +

+
+
+

プロセスはいくつかのIDを持っている。 +あまり深く考えず、実UIDと実行UIDについて考える。

+
+

実UID(UID)

+
    +
  • 呼び出し元のプロセス(親プロセス)の実ユーザーID。
  • +
  • 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。
  • +
+
+
+

実効UID

+
    +
  • 呼び出し元のプロセス(親プロセス)の実効ユーザーID …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/category/blog9.html b/category/blog9.html new file mode 100644 index 00000000..7e186a7d --- /dev/null +++ b/category/blog9.html @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Category blog + + + + +
+ + + + + +
+
+

DNS サーバー

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + dns +

+
+
+

ニフティクラウド上でサーバーを立てた。 +いろいろと設定していこうかと思っているが、まずはDNSから始める。

+
+

作業内容

+

1. /etc/bind/named.conf.options +以下のように書き換える:

+
+// v6の設定: v6は応答しない
+// listen-on-v6 { any; };
+listen-on-v6 { none; };
+
+// transfer を許すIPを制限
+allow-transfer "192.168.100.1";
+
+

2. /etc/bind/named.conf.local +ゾーンの設定:

+
+zone "example.com" {
+   type master;
+   file "example.db";
+};
+zone "100.168.192.in-addr.arpa" {
+   type master;
+   file "192.rev"
+};
+
+
+
+
+
+
+
+
+

Perl のコンパイラオプション

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考ページ

+ +
+
+

基本的なオプション

+
+

-e

+
    +
  • ワンライナーを書くために必須。
  • +
  • 複数並べられるので、それなりに色々書ける
  • +
  • 直後にperlプログラムを書ける。
  • +
+
perl -e 'print 11/2'
+
+
+
+

-l[8進数]

+
    +
  • 行末に指定された8進数に変える。-l のみの場合、改行になる。
  • +
+
perl -e 'print 22'       #=> 22
+perl -l -e 'print 22'    #=> 22\n
+perl -l101 -e 'print 22' #=> 22A
+
+
+
+

-0[digits]

+
    +
  • -l の入力セパレータバージョン

    +
  • +
  • -00 とすれば、空行を区切 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/content/diary/2014/20140602_debian_backlight.md b/content/diary/2014/20140602_debian_backlight.md deleted file mode 100644 index 63a5a5c3..00000000 --- a/content/diary/2014/20140602_debian_backlight.md +++ /dev/null @@ -1,24 +0,0 @@ -Title: LEDバックライトの調整 -Date: 2014-06-02 16:31 -Category: blog -Tags: Debian, Linux - - -ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。 -GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。 - -## 環境 -- PC: ASUS 24A -- OS: Linux(Debian sid amd64) - -## 調整可能な範囲 -```shell - cat /sys/class/backlight/intel_backlight/max_brightness -``` - -## ディスプレイの明るさ変更 -```shell - # 明るさを800にするとき - echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness -``` - diff --git a/content/diary/2014/20140608_webHDFS_memo.md b/content/diary/2014/20140608_webHDFS_memo.md deleted file mode 100644 index 0a1110d7..00000000 --- a/content/diary/2014/20140608_webHDFS_memo.md +++ /dev/null @@ -1,44 +0,0 @@ -Title: WebHDFSで詰まったこと -Date: 2014-06-08 16:33 -Category: blog -Tags: Hadoop, WebHDFS - - -## 困っていたこと -HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。 -ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。 -しかし、実際にやっているとうまくいかないケースがあった。 - -```shell -% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open" -HTTP/1.1 307 TEMPORARY_REDIRECT -Cache-Control: no-cache -Expires: Mon, 02 Jun 2014 20:27:09 GMT -Date: Mon, 02 Jun 2014 20:27:09 GMT -Pragma: no-cache -Expires: Mon, 02 Jun 2014 20:27:09 GMT -Date: Mon, 02 Jun 2014 20:27:09 GMT -Pragma: no-cache -Content-Type: application/octet-stream -Location: http://localhost:50075/webhdfs/v1/tmp/client.retry?op=OPEN&namenoderpcaddress=namenode:8020&offset=0 -Content-Length: 0 -Server: Jetty(6.1.26) -``` - -## 解決 -これは簡単で、ホスト名の設定がおかしい。 - -``` sh - hostname - # => hostname.example.com -``` -となるだけではダメで、 - -``` sh - hostname -f - # => (ダメな例)localhost - # => (正しい例)hostname.example.com -``` -となるようにしないといけない。 -CentOS初めて使ったけど、ドメイン名がどこで決まるかとか、難しいな。 - diff --git a/content/diary/2014/20140608_znc_memo.md b/content/diary/2014/20140608_znc_memo.md deleted file mode 100644 index c5a252e3..00000000 --- a/content/diary/2014/20140608_znc_memo.md +++ /dev/null @@ -1,162 +0,0 @@ -Title: DebianでZNCを使って、快適なIRC生活を送る -Date: 2014-06-09 16:34 -Category: blog -Tags: Debian - -## やりたいこと -最近、自分の興味のあるソフトウェアのIRCによく引きこもっています。 -自宅のPCはつけっぱなしにしておけば、全部のログを見れるのですが、 -会社やスマホで見るときには、接続している間のことしか確認できず、若干もどかしいです。 - -そういうわけで、ZNCサーバーを立てて、IRCのログを出先からでも確認できるようにしましょう。 - -## 実現すること -* スマホからIRCのログを見る - -## 作業環境 - -```bash -# lsb_release -a -No LSB modules are available. -Distributor ID: Debian -Description: Debian GNU/Linux 7.5 (wheezy) -Release: 7.5 -Codename: wheezy -``` - -## インストール -色んなブログでは、build-depして自前でビルドするように書かれているが、今はパッケージがあるので、それを使おう。 -```bash -$ sudo apt-get install znc -``` - -## 設定 -1. ユーザーの作成 - zncを動かすユーザーを作成しておく。 - - :::bash - $ useradd -d /home/znc -s /bin/bash -m znc - -2. 設定ファイルの作成 - 適当に答えるだけです。 - 設定値もモジュールも後からどうにでもなると思うので、気にしない。 - webadminを入れて、webから設定をできるようにしておきます。 - - :::bash - $ znc --makeconf - [ ** ] Building new config - [ ** ]. - [ ** ] First let's start with some global settings... - [ ** ]. - [ ?? ] What port would you like ZNC to listen on? (1025 to 65535): 6667 - [ ?? ] Would you like ZNC to listen using SSL? (yes/no) [no]:. - [ ?? ] Would you like ZNC to listen using ipv6? (yes/no) [yes]: no - [ ?? ] Listen Host (Blank for all ips):. - [ ok ] Verifying the listener.... - [ ** ]. - [ ** ] -- Global Modules -- - [ ** ]. - [ ** ] +-----------+----------------------------------------------------------+ - [ ** ] | Name | Description | - [ ** ] +-----------+----------------------------------------------------------+ - [ ** ] | partyline | Internal channels and queries for users connected to znc | - [ ** ] | webadmin | Web based administration module | - [ ** ] +-----------+----------------------------------------------------------+ - [ ** ] And 13 other (uncommon) modules. You can enable those later. - [ ** ]. - [ ?? ] Load global module ? (yes/no) [no]:. - [ ?? ] Load global module ? (yes/no) [no]: yes - [ ** ]. - [ ** ] Now we need to set up a user... - [ ** ] ZNC needs one user per IRC network. - [ ** ]. - [ ?? ] Username (AlphaNumeric): hitsumabushi - [ ?? ] Enter Password:. - [ ?? ] Confirm Password:. - [ ?? ] Would you like this user to be an admin? (yes/no) [yes]:. - [ ?? ] Nick [hitsumabushi]:. - [ ?? ] Alt Nick [hitsumabushi_]:. - [ ?? ] Ident [hitsumabushi]:. - [ ?? ] Real Name [Got ZNC?]: - [ ?? ] Bind Host (optional):. - [ ?? ] Number of lines to buffer per channel [50]:. - [ ?? ] Would you like to keep buffers after replay? (yes/no) [no]:. - [ ?? ] Default channel modes [+stn]:. - [ ** ]. - [ ** ] -- User Modules -- - [ ** ]. - [ ** ] +-------------+------------------------------------------------------------------------------------------------------------+ - [ ** ] | Name | Description | - [ ** ] +-------------+------------------------------------------------------------------------------------------------------------+ - [ ** ] | admin | Dynamic configuration of users/settings through IRC. Allows editing only yourself if you're not ZNC admin. | - [ ** ] | chansaver | Keep config up-to-date when user joins/parts | - [ ** ] | keepnick | Keep trying for your primary nick | - [ ** ] | kickrejoin | Autorejoin on kick | - [ ** ] | nickserv | Auths you with NickServ | - [ ** ] | perform | Keeps a list of commands to be executed when ZNC connects to IRC. | - [ ** ] | simple_away | Auto away when last client disconnects | - [ ** ] +-------------+------------------------------------------------------------------------------------------------------------+ - [ ** ] And 36 other (uncommon) modules. You can enable those later. - [ ** ]. - [ ?? ] Load module ? (yes/no) [no]: yes - [ ?? ] Load module ? (yes/no) [no]:. - [ ?? ] Load module ? (yes/no) [no]:. - [ ?? ] Load module ? (yes/no) [no]:. - [ ?? ] Load module ? (yes/no) [no]: yes - [ ?? ] Load module ? (yes/no) [no]:. - [ ?? ] Load module ? (yes/no) [no]: yes - [ ** ]. - [ ** ] -- IRC Servers -- - [ ** ] Only add servers from the same IRC network. - [ ** ] If a server from the list can't be reached, another server will be used. - [ ** ]. - [ ?? ] IRC server (host only): irc.freenode.net - [ ?? ] [irc.freenode.net] Port (1 to 65535) [6667]:. - [ ?? ] [irc.freenode.net] Password (probably empty):.... - [ ?? ] Does this server use SSL? (yes/no) [no]:. - [ ** ]. - [ ?? ] Would you like to add another server for this IRC network? (yes/no) [no]:. - [ ** ]. - [ ** ] -- Channels -- - [ ** ]. - [ ?? ] Would you like to add a channel for ZNC to automatically join? (yes/no) [yes]:. - [ ?? ] Channel name: #ceph - [ ?? ] Would you like to add another channel? (yes/no) [no]:. - [ ** ]. - [ ?? ] Would you like to set up another user (e.g. for connecting to another network)? (yes/no) [no]:. - [ ok ] Writing config [/home/znc/.znc/configs/znc.conf].... - [ ** ]. - [ ** ] To connect to this ZNC you need to connect to it as your IRC server - [ ** ] using the port that you supplied. You have to supply your login info - [ ** ] as the IRC server password like this: user:pass. - [ ** ]. - [ ** ] Try something like this in your IRC client... - [ ** ] /server 6667 hitsumabushi: - [ ** ] And this in your browser... - [ ** ] http://:6667/ - [ ** ]. - [ ?? ] Launch ZNC now? (yes/no) [yes]:... - [ ok ] Opening Config [/home/znc/.znc/configs/znc.conf].... - [ ok ] Loading Global Module [webadmin]... [/usr/lib/znc/webadmin.so] - [ ok ] Binding to port [6667].... - [ ** ] Loading user [hitsumabushi] - [ ok ] Adding Server [irc.freenode.net 6667 ].... - [ ok ] Adding Server [irc.oftc.net 6667 ].... - [ ok ] Loading Module [admin]... [/usr/lib/znc/admin.so] - [ ok ] Loading Module [nickserv]... [/usr/lib/znc/nickserv.so] - [ ok ] Loading Module [simple_away]... [/usr/lib/znc/simple_away.so] - [ ok ] Forking into the background... [pid: 27494] - [ ** ] ZNC 0.206+deb2 - http://znc.in - -3. Webからzncに接続する - ブラウザから http(s)://hostname:6667 にアクセスする - ログインして、List Users→Editを開いて、log モジュールにチェックを入れておくと、IRCのログを書いてくれる。 - -4. クライアントから接続する - xchatでやってみた。 - SSLで接続する場合には、ネットワーク一覧の設定から、SSLで接続するように設定をし、SSL不正な証明書を受け入れるようにしておく必要がある。 - 例として、zncサーバーが blog.hitsumabushi.org:6667, ユーザー名が oftc, パスワードが 123456 というユーザーで接続したことにすると、以下のようになる。 - ![XChat](/images/2014/XChat_201406061.jpg) - -## おわり -これで快適なIRC生活がおくれるぞ! diff --git a/content/diary/2014/20140717_janus.md b/content/diary/2014/20140717_janus.md deleted file mode 100644 index 171263fd..00000000 --- a/content/diary/2014/20140717_janus.md +++ /dev/null @@ -1,35 +0,0 @@ -Title: [論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads -Date: 2014-07-17 16:35 -Category: blog -Tags: Paper - -[TOC] - -## 読んだもの -[http://research.google.com/pubs/pub41179.html](http://research.google.com/pubs/pub41179.html) - -## 主な内容 -* 『2種類の異なるストレージ(フラッシュとディスク)を複数のワークロードで共用する』効率的な使い方を最適化問題への帰着 - 使い方に2つの戦略があって、『FIFO or LRU』。 -* LRUの方がキャッシュヒットレート的には良いけど、メトリクスを取るのが複雑になりがちなので、FIFOで良いのでは。 -* 実システムでの計測結果 - -### 使われているシステム, 技術要素 - -* Clossus (GFSの改良版) -* アルゴリズム: 貪欲法 - -### 大事なこと -* 最適化問題を特にあたって、ワークロード特性を表す関数を、convexで近似したことにすることがアイディアの1つ。 -* 理論としては、piecewise-linearでなくても良いが、実測では有限個の点しか取れないので、piecewise-linearとしておくと計算が楽になる。 -* 運用中もワークロード特性を測定してフィードバックすることで、特性の変化に対応することができる。 - -## 所感 -* よくまとまっているので、とても良い。 - -* 実際にこの論文と同じことを行う際には、現状のストレージをどういうふうに使っているかが問題になる。 - GFSのようなマスターを持つ分散ストレージを使っているなら、この論文の内容は実践しやすい。 - (もちろん、ワークロードのメトリクスを取るようにしたり、最適化問題を解くロジックを入れるなど、変更は必要。) -* 個人的にはマスターに色々聞かなくて済むような分散ストレージ(Cephとか)の方がアーキテクチャ的に好きなのだけど、 - この論文を読むと、マスターがあったほうが均質じゃないシステムの制御は、扱いやすいように見える。 - diff --git a/content/diary/2014/20140727_debian_oz.md b/content/diary/2014/20140727_debian_oz.md deleted file mode 100644 index ad257ab5..00000000 --- a/content/diary/2014/20140727_debian_oz.md +++ /dev/null @@ -1,44 +0,0 @@ -Title: DebianにOzをインストールする -Date: 2014-07-27 16:37 -Category: blog -Tags: Debian, CTMCP - -ガウディ本読みはじめた。 - - - -## 困ったこと -この本で使われるOzという言語をDebian上で実行するのに、少し困った。 -morzart2をダウンロードして、適当にインストールしただけだと、 -emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。 -正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。 - -このために、必要なパッケージがあるので、それを予めインストールしておくと良い。 - -## インストール手順 -1. 必要なパッケージをインストール - - :::bash - sudo apt-get install tcl tk8.5 - - 最初は、tk8.5ではなく、tkを指定して、tk8.6だけがインストールされていた。 - この状況では、結果が表示されない。 - -2. morzart2のダウンロード - - 以下のページからダウンロード。(Githubからでも良い) - [Source Forge](http://sourceforge.net/projects/mozart-oz/files/) - -3. morzart2の展開 - - :::bash - tar xf "ダウンロードしたファイル" - -4. 実行 - - :::bash - cd "展開したディレクトリ" - bin/oz - -こんな感じ。 -必要ならパスを通しておくと良い。 diff --git a/content/diary/2014/20140812_ipv6_memo.md b/content/diary/2014/20140812_ipv6_memo.md deleted file mode 100644 index 1d8dabd1..00000000 --- a/content/diary/2014/20140812_ipv6_memo.md +++ /dev/null @@ -1,30 +0,0 @@ -Title: IPv6のことを調べ始めた -Date: 2014-08-12 16:38 -Category: blog -Tags: IPv6 - - -## IPv6 環境構築 -### ひとまず参照すべきRFC -* RFC3315(DHCPv6) とそれをupdateしているやつ -* RFC4861(Neighbor DiscoveryのIPv6バージョン) -* RFC5942(IPv6のsubnet model) - -### IPv6 アドレス配布方式について - -全体としては、下記の4パターンある。 - -| アドレス配布方式 | RAは必要? | RAにプレフィックス情報は必要? | m-flag | o-flag | 配布できるもの | -|---------------------------|------------|------------------------|--------|--------|-------------| -| 手動 | x | x | - | - | - | -| ステートレスアドレス自動設定(SLAAC) | o | o | off | off | プレフィックスのみ | -| ステートフルDHCPv6 | o | o(たぶん。) | on | on | IPアドレスとDUIDの組, DNSなど | -| ステートレスDHCPv6 | o | x | off | on | DNSなど | - -よく使われそうな、SLAACとステートフルDHCPv6には、以下のようなメリット・デメリットがある。 - -方式 | メリット | デメリット ---------|:-------:|:---------: -SLAAC | ルーター設定のみでOK | IPを固定化しづらい -ステートフルDHCPv6 | DHCPDを立てる必要あり | IP固定化できる。DNS情報もその気になれば配布できる - diff --git a/content/diary/2014/20140814_vsphere_api.md b/content/diary/2014/20140814_vsphere_api.md deleted file mode 100644 index 73b289fd..00000000 --- a/content/diary/2014/20140814_vsphere_api.md +++ /dev/null @@ -1,98 +0,0 @@ -Title: vSphere API事始め -Date: 2014-08-14 16:39 -Category: blog -Tags: VMware - -## リファレンス -* https://www.vmware.com/support/developer/vc-sdk/ -* https:// "vcenter\_ip" /mob/ - -## 参考サイト -* http://thinkit.co.jp/story/2010/06/23/1617 - -# Overview -## Types -4つのタイプがある。 - -| vSphere APIの型 | 普通のプログラミングとの類推 | -|-----------------|------------------------| -| managed object type | プリミティブ型、複合型 | -| data object type | 抽象データ型 | -| enumerated type | 定数 | -| Fault type | 例外型 | - -### 1. Managed object types - -#### Managed object typeとは - -(サーバーサイドのオブジェクトモデルの基本的なデータを担っている。data objectも同じく。) -managed objectには、大きく2つの種類がある。 - -1. ManagedEntity を拡張したもので、仮想コンポーネントのインベントリとして使われている。 - "managed entities"と呼ばれることもある。 - - 例えば以下のようなものがある。 - - | HostSystem | ホストシステムのインスタンス | - | VirtualMachine | VM | - | Datastore | データストア | - -2. システム全体のための、サービスを提供するもの。 - 例えば、以下のもの。 - - | PerfomanceManager | パフォーマンス管理 | - | LicenseManager | VMware製品のライセンス管理 | - | VirtualDiskManager | 仮想ストレージの管理 | - -#### Managed object typeの使い方 -使いはじめるには、 - - 1. connect : サーバーに接続 - 2. authenticate :認証を通す - 3. session : セッションを得る - -というステップがある。 - -セッションを貼った後は、_ServiceInstance_ という managed objectを得る。 -ServiceInstance の下には、 Data object typesがぶら下がっている。 -以下の図で、"MOR"というのは、 _ManagedObjectRefarence_ の略で、 -これは、server-side object へのリファレンスを与えるdata objectである。 - -※図は[vmwareのドキュメント](http://pubs.vmware.com/vsphere-50/index.jsp#com.vmware.wssdk.apiref.doc_50/mo-types-landing.html)から。 - -![ServiceInstance\_TopLevel\_Figure](/images/2014/ServiceInstance_TopLevel_Figure.gif) -凡例 -![legend\_figures](/images/2014/legend_figures.jpg) - -managed obejectは、property と operation(method)を持っている。 - -### 2. Data object types -#### Data object typeとは -Javaでいう抽象データ型や、C++でいうstructデータ型のようなもの。 -managed object typeが、プリミティブデータ型だったり、複合データ型だったりする。 -(vSphere API的な意味での、プリミティブデータ型は、 XML Schemeプリミティブで書かれている。例えば、xsd:string とか。) - -※図は[vmwareのドキュメント](http://pubs.vmware.com/vsphere-50/index.jsp#com.vmware.wssdk.apiref.doc_50/do-types-landing.html) から。 - -![ServiceInstance\_AboutInfo\_Detail](/images/2014/ServiceInstance_AboutInfo_Detail.gif) - -#### Data object typeの例 - -| data object | 説明 | -|-------------|------| -| AlarmInfo | AlarmSpecから継承するプロパティ + ManagedObjectReference(Alarm managed objectへのリファレンス) | -| ManagedObjectReference | MOR, reference, MoRefとか呼ばれる。server-side managed objectのリファレンス | - -### 3. Enumerated types (enumeration) -予め定義されている値や予め定義されたオブジェクトが保管されているオブジェクト。 -つまり、定数のように使われる。 - -| VirtualMachinePowerState | VMの起動状態を持っている。 poweredOff,poweredOn,suspended | - -### 4. Fault types -サーバーによってあげられる例外。 - -| Fault | 説明 | -|--------------|------| -| NotSuported | 呼ばれたメソッドがサーバーでサポートされていなかったとき。vCetnerのメソッドをESXiで呼んだりとかの場合も。 | -| NoPermission | clientユーザーの権限が足りないとき。権限が必要だった、MORを含んで返してくれる | diff --git a/content/diary/2014/20141215_droneio.md b/content/diary/2014/20141215_droneio.md deleted file mode 100644 index 2d78b36e..00000000 --- a/content/diary/2014/20141215_droneio.md +++ /dev/null @@ -1,32 +0,0 @@ -Title: drone.ioを使って、pelicanをビルドする -Date: 2014-12-15 23:00 -Category: blog -Tags: CI, drone.io, pelican - -## 動機 -最近はWordpressでブログをやっていたけど、 -あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。 -そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。 - -そこで[pelican](http://docs.getpelican.com/en/3.5.0/index.html)ですよ。 - -OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分がのらなかったのです。 -pelicanは割と軽量っぽく見えたのと、reStructuredTextでもMarkdownでも書けるのが、自分には気楽だったから採用しました。 - -## やり方 -1. drone.io で New Project -> Github -> 適当なリポジトリを選ぶ -2. drone.io で Settings -> Repository -> View Key をクリックすると、SSH keyが表示される。 -3. Githubの自分のリポジトリで、Settings -> Deploy keys に追加する -4. 後は、自分のビルドの設定をして、ビルドするなり、git pushするなりするだけ。 - -## 困った...?と思ったこと -1. SSHキーがどこから見るのかわからなくて、git pushできないかと思って焦りました。 -2. いい感じにgit pushするスクリプトがなかったので、変なデプロイ用のシェルを書くことになった。しかも、毎回 gh-pages にforce pushするという感じになってしまった。 - -## 感想 -まだテーマとかいじってないので、テーマをいじるかも。 -テーマいじらないとタグクラウドの設定ができないっぽいので。 -使ってみた感じ、割とブログには便利だと思うなー。 - - - diff --git a/content/diary/2014/20141216_emacs_etags.md b/content/diary/2014/20141216_emacs_etags.md deleted file mode 100644 index f8233659..00000000 --- a/content/diary/2014/20141216_emacs_etags.md +++ /dev/null @@ -1,50 +0,0 @@ -Title: ソースコードリーディングをするときにctagsを使いたい -Date: 2014-12-16 20:00 -Category: blog -Tags: Emacs, Ruby - -## きっかけ -とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。 -でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。 -そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、 -ぱっと見でわからず、いちいち時間がかかっていた感じです。 - -ソースコードを読む上で支援してくれるものがあったらなー、と思っていたら、タグをつけると良いと聞いたので、やってみます。 - -## 流れ -今回はmacでやることにします。 -brew がインストールしてあることにしています。 - -1. Exuberant Ctagsのインストール - - :::sh - brew install ctags - -2. tagの生成(Emacsから使うには、etagsと呼ばれる形式で生成) - - :::sh - # 読みたいソースのトップに移動 - cd /home/me/app - # タグの生成 (Emacs の場合) - ctags -Re - # タグの生成 (Vim の場合) - ctags -R - -3. コードリーディング - - 1. Emacs の場合 - - | キー | 意味 | - |-----------|------------------------| - | M-. | ジャンプ(関数, クラス) | - | C-u M-. | 次の検索 | - | C-u – M-. | 前の検索 | - | M-\* | 元の場所 | - - 2. Vim の場合 - - いつも以下のサイトを参考にして生きている。 - - http://archiva.jp/web/tool/vim\_ctags.html - - diff --git a/content/diary/2014/20141217_vmware_mac_address.md b/content/diary/2014/20141217_vmware_mac_address.md deleted file mode 100644 index 66d4e6fc..00000000 --- a/content/diary/2014/20141217_vmware_mac_address.md +++ /dev/null @@ -1,123 +0,0 @@ -Title: VMware 環境でのMACアドレス割当て -Date: 2014-12-17 14:40 -Category: blog -Tags: VMware, VCP - -[TOC] - -## 1. まとめ -vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、 - -1. vCenter環境でプレフィックス指定 -2. 固定割当て - -といった方法を使いましょう - -## 2. MACアドレスの割当て方式 - -1. vCenterによる自動割当て - 1. VMware OUI - 2. プレフィックスベース - 3. 範囲ベース -2. vCenterに接続されていないESXiによる自動割当て -3. 手動での割当て - -### vCenterによる自動割当て -設定の変更は、vSphere Web Clientから行うか、vpxd.cfgから行います。 -#### VMware OUI -これがデフォルトの設定ですが、00:50:56:{XX}:{YY}:{ZZ} という割当てを行います。 -ただし、XX = {vCenterのid} + 0x80 で決めています。 -そういうわけで、XXはvCenterごとに固定なので、65536個だけ利用可能だということになります。 - -普通は、こんなにMACアドレスを使う前に、他の上限値(VM作成上限数やvCPU上限など)にぶち当たって悲しみを抱えるので、大丈夫だと思われます。 -複数のvCenterを利用している人は、vCenter間でIDがかぶっていないことは確認する必要があります。 - -この割当て方式では、00:50:56:80:{YY}:{ZZ} - 00:50:56:BF:{YY}:{ZZ} までの範囲が割当てられるので、見ればわかります。 - -以下が vpxd.cfgでの例です。 - -```xml - - -true - - -``` - -#### プレフィックスベース - -5.1以降の環境では、デフォルトの00:50:56以外のプレフィックスを指定できます。 -また、個数が足りない時には LAA(ローカル管理アドレス)プレフィックスを使うこともできます。 -自分のOUIを使いたいときとか、複数vCenterがある時にLAA使う場合に使いそうです。 - -以下の設定は、00:50:26または、00:50:27から始まるMACアドレスを割当てる例です。 - -```xml - - - -005026 -23 - - - -``` - -#### 範囲ベース - -開始と終了のMACアドレスを指定するものです。 -LAAの複数の範囲を指定できるので、便利かもしれません。 - -これも複数vCenterを使うときには、分割して使えるので便利だと思います。 - -たぶん、こっちの方が、後で拡張したいときには便利なので、(そんなことあるのか知らないけど、)自由に使えるMACアドレス数が少ない場合には、後で追加しやすくて便利だと思います。 - -以下が、範囲ベース割当ての例です。 range idは0から始まります。 以下の例では、00:50:67:00:00:01のみの範囲1つだけを利用する例です。 - -```xml - - - - - 005067000001 - 005067000001 - - - - -``` -### vCenterに接続されていないESXiにより自動割当て -これが利用されるのは、 -1. vCenterに接続されていない -2. vmxファイルに、MACアドレスやMACアドレス割当てタイプが書かれていない -場合です。 - -割当てられるMACアドレスは 00:0C:29 + {UUIDの最後の3オクテット} です。 - -### 固定割当て -デフォルトのOUIは 00:50:56 です。 -このOUIを利用する場合、上で見たように他の用途で使われる箇所は予約されています。そのため、 00:50:56:00:{YY}:{ZZ} - 00:50:56:3F:{YY}:{ZZ} のみが利用可能です。 - -これを利用するためには、以下を削除して、 - -``` -ethernetN.generatedAddress -ethernetN.addressType -ethernetN.generatedAddressOffset -``` - -以下を記述します。 - -``` -ethernetN.addressType = static -ethernetN.address = {MAC ADDRESS} -``` - -## 3. MACアドレスが足りなくなった時の動作 - -起動されるときに、MACアドレスが生成されます。 -基本的には、起動中のMACアドレスとの衝突しか検知しないので、仮想マシンを一時的に停止している場合、再起動したときに、たまにMACアドレスが変更されてしまうことがありえます。 - -## 4. 資料 -vSphere ネットワークガイド -- MACアドレスの管理 diff --git a/content/diary/2014/20141219_create_fluentd_plugin.md b/content/diary/2014/20141219_create_fluentd_plugin.md deleted file mode 100644 index 2cf6a95e..00000000 --- a/content/diary/2014/20141219_create_fluentd_plugin.md +++ /dev/null @@ -1,35 +0,0 @@ -Title: Fluentd Pluginを作成するときのメモ -Date: 2014-12-19 11:11 -Category: blog -Tags: Fluentd, Ruby -Status: draft - -[TOC] - -## 資料 -- [Fluentd - Writing plugins](http://docs.fluentd.org/articles/plugin-development#writing-input-plugins) -- [fluentdのためのプラグインをイチから書く手順(bundler版) - tagomorisのメモ置き場](http://d.hatena.ne.jp/tagomoris/20120221/1329815126) -- [fluentdプラグイン講座](http://toyama0919.bitbucket.org/fluentd_plugin_how_to.html#/37) - -### 参考にしたプラグイン -0. [fluentd/in\_tail.rb at master · fluent/fluentd](https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/in_tail.rb) -1. [fluentd-plugin-secure-forward](https://github.com/tagomoris/fluent-plugin-secure-forward) -2. [fluentd-plugin-dstat](https://github.com/shun0102/fluent-plugin-dstat) - -## 作るもの -設定された文字列を設定ファイルに設定された時間感覚で、outputする。 -設定ファイルのイメージは以下。 - -
-  <source>
-    type practice
-    loopstr "foobar"
-  </source>
-
- -## 準備 - -0. (gemにするとき、)``bundle gem fluent-plugin-hogehoge`` でgemを作成。 - gemにしなくても、fluentdのplugins以下に直接おけば使える。 -1. 実際のfluentdで実験できるように、fluentdをインストールして用意しておく。 - 手元でvagrantやdockerを上げておくと便利。 diff --git a/content/diary/2014/20141230_npiv.md b/content/diary/2014/20141230_npiv.md deleted file mode 100644 index 7667d15d..00000000 --- a/content/diary/2014/20141230_npiv.md +++ /dev/null @@ -1,49 +0,0 @@ -Title: VMware環境でのNPIVについて -Date: 2014-12-30 02:57 -Category: blog -Tags: VMware, VCP, NPIV, Storage - -VCP-DCV取得のために勉強していたところ、NPIVという用語が出てきたので、調べてみたことを書いておきます。 - -[TOC] - -## 資料 -- [vSphere ドキュメント センター](https://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.vm_admin.doc_50/GUID-C713BCA5-71B4-4539-A4AE-8E781330755C.html) -- [サーバ仮想化のカギはストレージ・ネットワークにあり:基幹系サーバ統合に適したストレージ・ネットワーク要件を探れ! - ITmedia エンタープライズ](http://www.itmedia.co.jp/enterprise/articles/0903/23/news002.html) -- [ブレードサーバーで始めるSAN - 第4回 ブレードサーバー特有のSAN設計:ITpro](http://itpro.nikkeibp.co.jp/article/COLUMN/20090417/328662/) - -## まとめ -1. NPIV = N\_Port ID Virtualization -2. NPIVとは、1つのHBAに対して複数のID(WWPN)を割り当てることで、**1つのHBAポートを複数のHBAポートに見せる** ための技術 -3. VMware的には、RDMのディスクを持つ仮想マシンについて、 アクセス制御, QoSなどのために使われる -4. NPIVのしようとして、1ポートあたり255WWPNしか割り当てられない - -## NPIVとは -### FC環境の基本 - -FC環境では、各ノードはWWN(_World Wide Name_)を用いて識別されています。 -IPプロトコルで言うところの、IPアドレスと同様に、アクセス先を表したり、アクセス制限を行ったりする対象が、WWNになります。 - -このWWNは、 -- WWNN (_World Wide Node Name_) -- WWPN (_World Wide Port Name_) -という2種類で構成されています(が、便宜的なものなので、通常、区別する必要はないです)。 -その名の通り、WWNNはノード自身(例えば、HBAごと)に割り当てておき、WWPNはポート(例えば、HBAポートごと)に割り当てておきます。 - -### NPIV -前述の通り、WWNベースでアクセス制限をすることになるのですが、例えば、1つのHBAポートを複数のマシンで共有している状況で、 -各マシンごとにアクセスできるLUN(LUNはWWNを持っています。)を変えたいと思うと、どうすれば良いのでしょうか。 - -NPIVは、1つのHBAポートに対して、最大255個のWWPNを割り当てる技術です。 -これを使って、各マシンごとにWWPNを割り当てることで、LUNからはきちんと個別のアクセス制御が行えることになります。 - -NPIVを使うには、スイッチ側とHBA側の両方で対応している必要があります。 - -## VMware環境で利用する際の制限 -1. スイッチ側でNPIVを有効化 -2. ホストのHBAがNPIVをサポートしている -3. 利用できる仮想マシンは、RDMディスクを持つもののみ -4. 1台の仮想マシンに対して、最大4つの仮想ポートを割り当てられる(つまり、最大4つのWWPNが割り当てられる) - -通常の仮想マシンが利用するWWNは、ホストの物理HBAのWWNを利用します。 - diff --git a/content/diary/2014/20141230_vcp_memo.md b/content/diary/2014/20141230_vcp_memo.md deleted file mode 100644 index 1acefff6..00000000 --- a/content/diary/2014/20141230_vcp_memo.md +++ /dev/null @@ -1,97 +0,0 @@ -Title: VCPの学習中のメモ -Date: 2014-12-30 05:48 -Category: blog -Tags: VCP, VMware - -項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。 -特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。 - -[TOC] - -## VMware Data Recovery -### 資料 - -- [VMware Data Recovery 管理ガイド](http://www.vmware.com/files/jp/pdf/VMware-Data-Recovery-AG-JA.pdf) -- [VMware Data Recovery Datasheet](http://www.vmware.com/files/jp/pdf/data_recovery_datasheet.pdf) - -### 概要 -#### デプロイ -OVF形式で提供されているので、OVF deployします。 - -#### 動作 -VMware vStorage API for Data Protectionを使って、バックアップを取得します。 -そのためVSSが利用でき、Windows 2003以降であれば、ファイルシステムの整合性を保つレベルでのスナップショットが取得できます。 - -また、データの重複排除(デデュープ)を行うため、そこそこのデータ削減が見込めます。 - -#### 上限 - -- 保護VMは、100VM/1アプライアンス -- 10アプライアンス/1vCenter -- デデュープ ストアは、最大1TB - - CIFSのとき、500GB - - VMDK, RDMのとき、1TB - -## メモリ -### 資料 -以下のブログ記事を見ておけば、万事解決です。 - -- [VMware ESXにおけるメモリ管理(10) - メモリ圧縮 (1) - Simple is Beautiful](http://d.hatena.ne.jp/takaochan/20110111/1294755765) -- [VMware ESXにおけるメモリ管理(12) - いつ、どのタイミングで、どの機能が使用されるのか - Simple is Beautiful](http://d.hatena.ne.jp/takaochan/20110321/1300718342) - -実際のメモリ情報の見方について、参考になります。 - -- [vCenterで確認できるメモリ情報の見方について | Japan Cloud Infrastructure Blog - VMware Blogs](http://blogs.vmware.com/jp-cim/2014/04/vcenter_memory.html) - -### ESXiメモリ使用方法順 -メモリの不足状況に応じて、以下の順番で各機能が利用されます。 -後のものほど、VMのパフォーマンスへの影響が大きいです。 - -1. TPS -2. バルーニング -3. メモリ圧縮 -4. SSDホストキャッシュ -5. VMkernelスワッピング - - -### リソース管理/パフォーマンスに関係する機能 -1. TPS - - 透過的メモリ共有の機能。セキュリティ上の理由により、デフォルトでオフになります。 - ホストマシンにおいて、仮想マシン間のメモリ内容が同じ時には、共通の物理メモリアドレスを参照させ、変更時にはCoWで行います。 - これにより、物理メモリを節約することができます。ただ、ラージページが一般的になってきた最近のOSでは、それほど効果はありません。 - - TPSの設定は、ホスト単位で設定できますが、全VMで共有する以外にも、VMごとにシードを与えることで、同じシードを持つVMだけでTPSを有効にすることが可能です。 - -2. バルーニング - - ESXiがVMに割り当てているメモリを回収するための技術です。 - ESXiはVMにメモリを割り当てることはできますが、回収する方法があまりないため、ホストメモリが不足がちになってきたときにバルーニングを使います。 - - バルーニングのために使われるバルーンドライバ(vmmemctlドライバ)は、VMware Toolsに含まれており、ゲストOS内のプロセスとして常駐しています。 - - 動作としては、ESXiから指示があった時、vmmemctlはゲストOS内でメモリを確保しようとします。 - そうすると、ゲストOSはメモリをスワップアウトするなどして、vmmemctlへメモリを割り当てるので、割り当てられたメモリをESXiに渡すことができます。 - -3. メモリ圧縮 - - VMメモリ領域の一部を圧縮し、物理メモリの節約をする技術です。 - - 圧縮前に圧縮率を計算し、50%以上であれば実施します。 - 圧縮したメモリ領域を使用する場合、解凍処理を行う必要があります。 - -4. SSDホストキャッシュ - - vswapファイルをSSD上に作成して、ESXiのメモリが不足した時にSSD上にスワップアウトする機能です。 - 後述するスワッピング処理を高速にするための技術です。 - 通常は、vswapファイルはVMのディレクトリと同じディレクトリに作られ、高速でないこともありますが、 - この機能を使うことで、スワップアウトを高速にすることができます。 - - -5. VMkernelスワッピング - - ESXiの物理メモリが不足した時に、各VMのメモリ(の一部または全て)を vswapファイルにスワップする機能です。 - - とにかくパフォーマンスが低下するため、パフォーマンストラブル時にもっとも気にする機能です。 - - diff --git a/content/diary/2014/20141230_vcp_overview.md b/content/diary/2014/20141230_vcp_overview.md deleted file mode 100644 index e1fd5b0c..00000000 --- a/content/diary/2014/20141230_vcp_overview.md +++ /dev/null @@ -1,62 +0,0 @@ -Title: VCP-DCVの概要 : VCP550 -Date: 2014-12-30 01:30 -Category: blog -Tags: VMware, VCP - -[TOC] - -## 資料 -[VCP-Data Center Virtualization](https://mylearn.vmware.com/mgrReg/plan.cfm?plan=12457) -受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。 - -## VCP-DCVの概要 -### バージョン -VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。 -例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。 - -さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバージョンがあります。 -それが、VCP510, VCP550で、vSphereのマイナーバージョンレベルでの違いです。 -(他に前バージョンからのアップデート用試験もあります。Deltaみたいな感じで書かれていると、アップデート用試験です。) - -### 有効期限 -VCPの有効期限は、取得日から2年間です。 - -延長の方法は、3つあります。 -1. 同じ試験に合格する -2. 上位試験に合格する -3. 他の試験(例えば、VCP-Cloud)に合格する - -### 必須条件 -新しくVCP-DCVを取得しようとする場合、トレーニングを受講する必要があります。 -5種類のうち、対応するバージョンのものを、どれか1つ受講すれば良いですが、初心者向けの1.を受講することが多いようです。 - -1. VMware vSphere: Install, Configure, Manage [V5.x] -2. VMware vSphere: Fast Track [V5.x] -3. VMware vSphere: Optimize and Scale [V5.x] -4. VMware vSphere: Troubleshooting Workshop [V5.x] -5. vSphere with Operations Management: Fast Track [V5.x] - -ただし、日本で開催されているトレーニングは3つしかないようですが...。 - -## 試験内容 -### 試験時間 -120分 -(+非英語圏の人は、+30分? 聞いている話だと日本語で受験できるはずなので、受験してみて確認します) -### 問題数 -135問 -### 合格点 -300/500点 - -## 試験勉強に役立つもの -### pre-test -[VMware Certification](http://mylearn.vmware.com/mgrSurvey/assessLogin.cfm?item=24908&refer=0&p=0&ui=www_cert) - -### vCenter5.5 + ESXi環境 -実機検証が何より役立つと思う。 -あと5.5だとWeb Clientからしか使えない機能も増えているので、Web Clientを使っておいたほうが良いと予想している。 - -### 書籍 -[マスタリングVMware vSphere 5.5](http://www.amazon.co.jp/gp/product/4798136808?adid=0GAHXG5HH7D1X9B0CH58&camp=1027&creative=7407&creativeASIN=4798136808&linkCode=as4&tag=test045d2-22) - -個人的には、この本が一番良いと思っている。試験勉強中は、参照用に置いておくとはかどる。 -実務でも役立つこと請け合いなので、試験が終わっても、とりあえず手元に持っておくと便利。 diff --git a/content/diary/2014/20141231_matome.md b/content/diary/2014/20141231_matome.md deleted file mode 100644 index 8c2820c2..00000000 --- a/content/diary/2014/20141231_matome.md +++ /dev/null @@ -1,78 +0,0 @@ -Title: 2014年のまとめをしておかねば -Date: 2014-12-31 18:05 -Category: blog -Tags: KPT - -今年1年は反省の多い年だったので、きちんと書いて残しておく。 - -[TOC] - -## 2014年面白かった技術、触りたかったソフトウェア -### 新たに導入したもの -1. Ansible -2. Ceph -3. Pelican(このブログを生成してるやつ) -4. Flask -### ちょっとしか触れず... -0. VyOS -1. Consul -2. Fluentd -3. Golang -4. Docker -5. CoreOS -6. Hashicorpのツールその他 -7. Hadoop -### 触りたかったけど、触らず -1. Strom -2. Rust - -## 2014年のトピックス -思い返すと1月のこととかは何年も前に感じるが、今年は割と色々あった。 -自分の中でトピックとして大きい出来事を中心に書いてみる - -1. GGJに参加した -2. 配属されたこと -3. 仕事全般 - -### GGJに参加した -研修で滞在していた北海道で、Global Game Jamというイベントに参加した。 -作ったゲームはこれ。 [http://www.kawaz.org/projects/weaver/](http://www.kawaz.org/projects/weaver/) - -右も左もわからない状況で参加したが、3日間のなかにゲーム開発の流れがつまっていたと感じる。 -私が担当していたのはパーティクルつくるのとレベルデザインの一部だけだけど、レベルデザインは奥が深くて面白かった。 -ユーザーに対して、いかに自然にギミックを伝えるか、というデザインが非常に大事で、目から鱗だった。 - -こういうハッカソンに時々出ると、できないならできないで色々学ぶ事はあるし、できるようになればもっと楽しいと思うので、来年も時間を見つけて出たい。 -GGJについては、2014年は周囲の人の力を借りまくっただけなので、2015年はリベンジしたい。 - -### 配属とスクラム -4月に配属された。 -チームの人数は少ないけど、業務の"種類"が多くて(未だに戸惑うこともあるが)配属当初は戸惑っていた。 -誰が何をやっているかわからなかったし、何よりわからなかったのが、自分が今やっていることをどうやって共有すれば良いのか、がわからなかった。 - -良い機会だったので、チームでスクラムをやろうと思い、導入してみたが、最終的には中途半端になってしまった。 - -よかった点としては、朝会ができたことで、誰が何をやっているのか新鮮な情報がもらえ、割り込みが入った時でも状態がわかりやすくなったこと。 -うまくいかなかった原因としては、スクラムマスターをやっていた自分が、業務にかまけてしまったことで、イテレーションをきちんとまわせなかったことが大きい。 -他には、そもそも他のチームからの割り込みが多すぎて、バックログ消化できないとか、実質的なPMがいないことなどがあった。 - -若干スクラムっぽいのは、まわりのチームでも始まっているので、いろんな人と意見を交換しながら、徐々にチーム活動を改善していく予定。 -とりあえずは、カンバンのような、割り込みが多くても管理しやすい手法を、もう少し実践する。 - -### 仕事全般 -自覚はあるが仕事自体が基本的に遅いこともあり、自分の時間を作ることができていなかった。 -プログラミングもインフラも初心者なので、もっと学習やOSSへ時間を確保したい。 - -gitの使い方とかスクラムはチームで広めるために、業務時間中に資料をまとめたので、 -そんな感じで、業務と自分のやりたいことをうまくミックスして、業務時間でも時間を確保しようと思う。 - -仕事納め以降、自分の気持ちが上向きになって、エンジニアリングにも良い影響が出ている。 -やはり去年までと比べても、今年触ったツールや技術は浅くなりがちだし、毎日を17時退社の気持ちで(18時退社になるように)仕事に臨もうと思う。 - -## 2015年に向けて -### 目標 -1. fluentd + Consul(などのオーケストレーションツール) で設計したシステムを真面目に運用する -2. Golangで書いたライブラリを公開する -3. ConsulなどのOSSソフトウェアのソースを読んで、パッチを書く。マージしてもらえるように頑張る -4. 分散システムの論文を5本以上読む - diff --git a/content/diary/2014/reading_input_fluent-plugin-secure-forward.md b/content/diary/2014/reading_input_fluent-plugin-secure-forward.md deleted file mode 100644 index 4a28b161..00000000 --- a/content/diary/2014/reading_input_fluent-plugin-secure-forward.md +++ /dev/null @@ -1,228 +0,0 @@ -Title: fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編) -Date: 2014-12-17 23:45 -Category: blog -Tags: Ruby, Fluentd - -本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。 -ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。 - -[TOC] - -## 基本情報 - -1. lib/fluent/plugin/{TYPE}\_{NAME}.rb 以下がプラグインの本体。 - - - TYPE : in, out, buf,... etc - - NAME : プラグインの名前 - -2. pluginを書く時のお約束 - - - Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する - - 設定ファイル中で ``type hoge`` と書きたいなら、``Fluent::Plugin.register_input('hoge', self)`` をクラス定義中に書く - - ``config_param`` を使うと、インスタンス変数が宣言できる。(実装はまだ読めていない) - -3. Fluentdの起動順序 : See [docs.fluentd.org - plugin-development](http://docs.fluentd.org/articles/plugin-development) - - 1. Fluent::Supervisor#run\_configure - - 1. require - 2. new - 3. configure(conf) - - 2. Fluent::Supervisor#run\_engine - - 1. start - 2. shutdown - -## fluentd-plugin-secure-forward を読み始める - -### 準備 -何はともあれ、クローンしてきます。 - -```bash -$ git clone https://github.com/tagomoris/fluent-plugin-secure-forward.git -$ cd fluent-plugin-secure-forward -``` - -さて、ライブラリの本体は、以下の通りです。 - -```bash -$ ls lib/fluent/plugin/ -in_secure_forward.rb input_session.rb openssl_util.rb out_secure_forward.rb output_node.rb -``` - -これを見ると、 - -- in_secure_forward.rb -- out_secure_forward.rb - -があるので、このプラグインは、 input, outputについてプラグインを作っているようです。 - -### in\_secure\_forward を読む - -#### require & new -さっそく中を見てみます。 - -```rb -require 'fluent/mixin/config_placeholders' -``` -これは、[github.com/tagomoris/fluent-mixin-config-placeholders](https://github.com/tagomoris/fluent-mixin-config-placeholders/blob/master/lib/fluent/mixin/config_placeholders.rb)を読んでいます。 -動作については、[http://d.hatena.ne.jp/tagomoris/20120820/1345455837](http://d.hatena.ne.jp/tagomoris/20120820/1345455837)に書いてありますが、fluentdの設定ファイル中のプレースホルダ(${...}みたいなの)を展開した状態で、変数に格納してくれるものらしいです。 - -secure\_forwardを使うときには、 ``self_hostname`` で自分のホスト名を宣言しますが、その時にhostnameコマンドの結果で定義したいのが人情というものなので、その時に使われていそうです。 -とりあえず、設定ファイル中の値を参照できることとして(configureメソッドの``super``が呼ばれてから参照できます)、次に進みます。 - -```rb -module Fluent - class SecureForwardInput < Input - end -end -``` -これはお約束みたいなやつで、Inputプラグインは、Fluentモジュールの、Inputを継承したクラスとして定義するようです。中身は後で定義されています。 - -先に進みます。 - - -```rb -require_relative 'input_session' -``` -これは暗号化するためのセッションを扱うものなので、後で考えます。 - -```rb -module Fluent - class SecureForwardInput < Input - DEFAULT_SECURE_LISTEN_PORT = 24284 - - Fluent::Plugin.register_input('secure_forward', self) - - config_param :self_hostname, :string - include Fluent::Mixin::ConfigPlaceholders - ... -``` -ここで大事そうなのは、 ``Fluent::Plugin.register_input('secure_forward', self)``です。 -これを書いておくと、fluentd.conf(のinputセクション)で ``type secure_forward`` と書いたとき、このプラグインを使います。 - -```rb - # Define `log` method for v0.10.42 or earlier - unless method_defined?(:log) - define_method("log") { $log } - end -``` - -昔はlogを出すときに$logと書いていたけども、今はlogと書く、という差を吸収するための設定みたいです。 - -#### configure - -```rb - def configure(conf) - super - ... - @clients.each do |client| - ... - @nodes.push({ - address: source_addr, - shared_key: (client.shared_key || @shared_key), - users: (client.users ? client.users.split(',') : nil) - }) - end - - @generate_cert_common_name ||= @self_hostname - self.certificate - ... - end -``` - -最初の superで、fluent/mixin/config\_placeholders を使って、hostnameのプレースホルダーを展開した値を参照できるようになりました。次に、``@clients`` になにが入ってるかといえば、 -```rb - config_section :client, param_name: :clients do - config_param :host, :string, default: nil - config_param :network, :string, default: nil - config_param :shared_key, :string, default: nil - config_param :users, :string, default: nil # comma separated username list - end -``` -というのがあるので、設定ファイル中 <client>セクションで定義している中身が入っていることになります。 -source_addrというのは、クライアントのアドレス、またはネットワークアドレスで、shared\_keyとuserと一緒にpushしています。 - -``self.certificate``というのを見てみると、@certと@keyが宣言されていないとき、証明書とキーを生成して、@cert, @keyとして定義するものです。このときコモンネームは、``@generate_cert_common_name ||= @self_hostname``から決まっているので、指定がないならホスト名になります。 - - -#### start & shutdown -さて、configureは読んだので、実行時の挙動を調べます。 - -```rb - def start - super - OpenSSL::Random.seed(File.read("/dev/urandom", 16)) - @sessions = [] - @sock = nil - @listener = Thread.new(&method(:run)) - end - - def shutdown - @listener.kill - @listener.join - @sessions.each{ |s| s.shutdown } - @sock.close - end -``` - -特に、変なところはないですが、``@listener, @session`` の中身が気になるところです。早速 runの中身を見てみましょう。 - -```rb - def run # sslsocket server thread - log.trace "setup for ssl sessions" - cert, key = self.certificate - ctx = OpenSSL::SSL::SSLContext.new - ctx.cert = cert - ctx.key = key - - log.trace "start to listen", :bind => @bind, :port => @port - server = TCPServer.new(@bind, @port) - log.trace "starting SSL server", :bind => @bind, :port => @port - @sock = OpenSSL::SSL::SSLServer.new(server, ctx) - @sock.start_immediately = false - begin - log.trace "accepting sessions" - loop do - while socket = @sock.accept - log.trace "accept tcp connection (ssl session not established yet)" - @sessions.push Session.new(self, socket) - - # cleanup closed session instance - @sessions.delete_if(&:closed?) - log.trace "session instances:", :all => @sessions.size, :closed => @sessions.select(&:closed?).size - end - end - rescue OpenSSL::SSL::SSLError => e - raise unless e.message.start_with?('SSL_accept SYSCALL') # signal trap on accept - end - end -``` -あまりOpenSSL:SSL::SSLserverについて調べていないですが、パッと見、 - -1. 設定されている証明書, キーでSSLサーバーを立てて、loopで待ち続ける -2. テキトーなポート,バインドでリッスンする -3. TCPコネクションが確立されるごとに @sessions に格納していく (``@sock.start_immediately = false``としているので、[SSLはまだハンドシェイクできてない](http://docs.ruby-lang.org/ja/2.1.0/method/OpenSSL=3a=3aSSL=3a=3aSSLServer/i/accept.html)) -4. セッションが切れるたびに、@sessionsから削除する - -という動作みたいです。特に3.について、なぜこの実装なのかはわかっていないです。 -あと、ここで ``@sessions.push Session.new(self, socket)``という部分がありますが、ここのSessionは、input_session.rb で定義されているものです。 -こっちの方がこのプラグインの肝な感じですが、Fluentdのプラグインの作り方とはあまり関係ないので、見ないことにします。(最初にping pongをやって、それが終わってから、ソケットを読みにいってはon_messageを呼ぶ、みたいなことをしているみたいです) - -とりあえず、以上でざっくりと Inputプラグインの中身がわかりました。 - -## まとめ -Inputプラグインの場合は、 - -1. configure(config) -2. start -3. stop - -に集中して読み始めるとわかりやすいと思いました。 -その他は割と雑多なので、困った時に読めば良さそうです。 - -## 追記(2014-12-18) - - - diff --git a/content/diary/2014/reading_output_fluent-plugin-secure-forward.md b/content/diary/2014/reading_output_fluent-plugin-secure-forward.md deleted file mode 100644 index 0f0c2562..00000000 --- a/content/diary/2014/reading_output_fluent-plugin-secure-forward.md +++ /dev/null @@ -1,106 +0,0 @@ -Title: fluentd-plugin-secure-forward のソースを読んでみる(Output プラグイン編) -Date: 2014-12-18 10:03 -Category: blog -Tags: Ruby, Fluentd -Status: draft - -[昨日の続き]({filename}/diary/2014/reading_input_fluent-plugin-secure-forward.md)で、次はOutput部分の処理を見ようと思います。 -Fluentdプラグイン自体の読み方はだいぶわかったので、今日はもう少し詳しいロジックを見ていこうと思います。 - -[TOC] - -## さっそく読む -### initialize - -```rb - def initialize - super - require 'socket' - require 'openssl' - require 'digest' - require 'resolve/hostname' - end -``` - -必要なライブラリをrequireしています。 -こういうのって、クラス定義やファイルに書かずに、initializeでやると嬉しいことがあるんでしょうか。 -あまり深く考えてないですが、それほど気にしなくとも良いかな、と思っています。 - -### configure - -```rb - def configure(conf) - super - ... - @nodes = [] - @servers.each do |server| - node = Node.new(self, server) - node.first_session = true - @nodes.push node - end - ... - @next_node = 0 - @mutex = Mutex.new - ... - true - end -``` - -``@servers``に何が入っているか考えてみます。例によって、 -```rb - require 'fluent/mixin/config_placeholders' - ... - module Fluent - class SecureForwardOutput < ObjectBufferedOutput - include Fluent::Mixin::ConfigPlaceholders - ... - end - end -``` -という風に書かれているので、super以降は、プレースホルダーが展開されています。そういうわけで、``@servers``には、設定ファイル中のserverディレクティブの設定値が展開された状態で入っています。 -server情報を1つずつ、output_nodeとしてインスタンスを作成していき、``@nodes``には、各server情報から作成した、output_nodeを格納しています。 -[Mutex](http://docs.ruby-lang.org/ja/2.1.0/class/Mutex.html)を使っているのは、output先が複数あるときに、競合しないようにするためだと思います。 - -### start - -startを見ると、``:node_watcher``を新しいスレッドで実行します。 -なので、node_watcherを見てみましょう。 - -```rb - def node_watcher - ... - loop do - ... - (0...nodes_size).each do |i| - ... - next if @nodes[i].established? && ! @nodes[i].expired? - - next if reconnectings[i] - - reason = :expired - - unless @nodes[i].established? - log.warn "dead connection found: #{@nodes[i].host}, reconnecting..." - reason = :dead - end - - node = @nodes[i] - log.debug "reconnecting to node", :host => node.host, :port => node.port, :expire => node.expire, :expired => node.expired? - - renewed = node.dup - renewed.start - - Thread.pass # to connection thread - reconnectings[i] = { :conn => renewed, :at => Time.now, :reason => reason } - end - ... -``` -各output_nodeは、 -- established -- expired -- reconnecting - - - - -### stop diff --git a/content/diary/2015/20150105_vcloud_air.md b/content/diary/2015/20150105_vcloud_air.md deleted file mode 100644 index 29bfaa6b..00000000 --- a/content/diary/2015/20150105_vcloud_air.md +++ /dev/null @@ -1,64 +0,0 @@ -Title: vCloud Airの価格感を調べる -Date: 2015-01-05 17:35 -Category: blog -Tags: VMware, クラウド - -[TOC] - -## 資料 -- [VMware vCloud Air](http://www.vmware.com/jp/products/vcloud-air) -- [VMware vCloud Air 価格ガイド](http://vcloud.vmware.com/jp/service-offering/pricing-guide) - -## vCloud Airとは -VMwareが提供している、ハイブリッドクラウドのサービス。 - -特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、 -vSphere Clientのプラグインと統合して操作ができることが挙げられる。 - -日本では、[ソフトバンクと提携しているようだ](http://www.atmarkit.co.jp/ait/articles/1407/17/news039.html)。 - -## vCloud Air の価格感を調べる -大前提として、一般的なクラウドサービスと異なり、従量制ではない、というところは気をつけたい。 - -### プラン -ざっくり3つのタイプがあるということらしい。 -前者2つがコンピュートリソース、つまり普通にサーバーなどを立てるために使うもの。 -3つ目は普段オンプレにあって、オンプレが災害などで落ちたときに使われるもの。 - -- Dedicated : 物理的に分離。いわゆる、物理専有タイプ。 -- Virtual Private : 論理的に分離。いわゆる、リソース専有タイプ -- Disaster Recovery : 困った時にだけ起動するタイプ。 - -以下ではDRタイプのものを調べたい。 - -### DRの価格帯系 -[VMware vCloud Air 価格ガイド](http://vcloud.vmware.com/jp/service-offering/pricing-guide) を参考にすると良い。 - -DRの場合の契約期間は、1, 12, 24, 36ヶ月なので、それほど問題にならないと思う。 - - -| サービス | 含まれるリソース | 価格 (月額) | 単価 | -|----------|------------------|--------------|-------| -| プロセッサ、メモリ | 20GB vRAM, 10GHz CPU | ¥26,014 | ¥1.78/GB/時 | -| ストレージ&サポート | 1TB Storage | ¥30,503 | ¥30.5/GB/月 | -| 帯域幅 | 10Mbps | ¥26,359 | ¥3.61/Mbps/時 | -| グローバルIPアドレス | IPアドレス単位 (含む 2 ) | ¥5,756 | ¥2,878 都度 | - -| オプション サービス | | | | -|---------------------|--|--|--| -| データプロテクション | 1TB | ¥49,495 | ¥49.5/GB/月 | -| ダイレクトコネクトポート | 1Gbps | ¥8,633 | ¥11.83/Gbps/時 | -| ダイレクトコネクトポート | 10Gbps | ¥28,776 | ¥3.94/Gbps/時 | -| オフラインデータ転送 | 11TB One time Data Transfer | ¥28,776 都度 | ¥28,776 都度 | - -さすがに基本プランだと、あまり使えないので、だいたいオプションに申し込むことになるのだと思う。 - -割と安いけども、当然ながら、制約があるっぽい。 -特に、実際にDRとして使う場合には、30日間しか連続起動できない。 - -## 所感 -- 最小構成は安いが、すべてをDRしようとすると、いろいろ高くなりそう。 -- 取捨選択をして情報資産の棚卸を一緒に行えば、かなり便利。 -- 特にDRできるか、実際にテストできる機能が便利。 - - diff --git a/content/diary/2015/20150106_esxi_kickstart.md b/content/diary/2015/20150106_esxi_kickstart.md deleted file mode 100644 index 7f44946c..00000000 --- a/content/diary/2015/20150106_esxi_kickstart.md +++ /dev/null @@ -1,73 +0,0 @@ -Title: ESXiをkickstartでインストールする -Date: 2015-01-06 23:38 -Category: blog -Tags: VMware, ESXi - -ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。 - -[TOC] - -## 利用OS -- ESXi 5.5 -- Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる) - -## DHCP, TFTP, HTTPサーバーの準備 -### 必要なソフトウェアのインストール - -```sh -apt-get install tftpd-hpa isc-dhcp-server xinetd apache2 -``` - -### DHCPサーバーの設定 -BOOTPでインストールするため、あまり自由度がない。 - -[gist:id=b4e9a0e8e0ef68af1d6f,file=dhcpd.conf] - -### TFTPサーバーの設定 - -適当なディレクトリ以下を公開する。 -ここでは、/srv/tftp とする。 - -### kickstartイメージの準備 - -まずESXiのイメージの内容をもらってくる - -```sh -cd /srv/tftp/ -mkdir esxi -mount -o loop .iso -rsync -a /mnt/esxi/ -``` - -次に、pxe boot用のイメージを準備する。 -必要なのは、pxelinux.o, pxelinux.cfg/ - -```sh -wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz -tar xvf netboot.tar.gz -``` - -### PXEブートの設定ファイル -* pxelinux.cfg/default - -[gist:id=b4e9a0e8e0ef68af1d6f,file=default in pxelinux.cfg] - -* esxi/boot.cfg - * もともとあるファイルの / を除去していく - * prefixを代わりに設定 - -[gist:id=b4e9a0e8e0ef68af1d6f,file=boot.cfg] - -### kickstart file - -以下のファイルを /var/www/servers/ks.cfg として保存。 -(ここでは、httpでやっているが、tftpでやっても良い。) - -[gist:id=b4e9a0e8e0ef68af1d6f,file=ks.cfg] - -以上で、キックスタートの準備が終わる。 - -## 考えること -- サーバーごとの個別設定の渡し方 - 事前にMACアドレスがわかっている場合にはできるけど、そうでない場合には、難しい。 - diff --git a/content/diary/2015/20150116_vmware_vcp.md b/content/diary/2015/20150116_vmware_vcp.md deleted file mode 100644 index 35e62e24..00000000 --- a/content/diary/2015/20150116_vmware_vcp.md +++ /dev/null @@ -1,53 +0,0 @@ -Title: VCP5-DCV取得した -Date: 2015-01-16 23:48 -Category: blog -Tags: VMware, VCP - - -最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。 -VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。 - -[TOC] - -## VCPトレーニングと試験内容のギャップ -トレーニングを受講しても、おそらく言われると思いますが、 -VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたことがないので、わかりません) - -聞いた内容では、ベンダーの資格試験は、トレーニング内容だけで合格ラインか、合格ライン+αくらいまではいけるのが普通だけど、 -VMwareの試験はトレーニングの内容だけでは5割くらいしか取れなくて、自分で調べないと厳しい、という話でした。 - -とはいえ、実際に自分が受けた試験は、トレーニングの内容をきちんと理解していれば6割はギリギリ行けそうかな、という風に感じました。 -自分は5.5対応の試験を受けたのですが、聞いたのは5.1までの試験のことだったのかもしれません。 - -ただ、トレーニング内容と試験にギャップがあること自体は感じたのは、同じでしたので、 -個人的にトレーニングを受講した後、実際の試験までにどのあたりの項目について気をつけるべきか、書いておきます。 -ただ、もう試験の問題については覚えていないし、具体的に書くのもダメなので、ざっくり所感程度の形で書いておきます。 - -## 具体的に感じたギャップ - -- VMware Data Recovery (VDR) - 少し古いからか、自分が受けたトレーニングではほとんど重要視されていないように見えた。 - でも、試験には出てきた。 - -- VMware Data Protection(VDP), VMware Data Protection Advance - 上述のData Recoveryの後継。 - Data Recoveryからの新機能、Advanceとのライセンス上の違いまで含めて知っておくと良さそう。 - -- VMware Update Manager(VUM) - VUMで何が管理できるか、VUMの設定方法は必須のよう。 - -- vSphere ClientとvSphere Web Clientの差 - 上述のVDRやVDPはWeb Clientをメインにしているが、VUMはvSphere Client からしかできない操作があるためだと思う。 - 常用している人でも、両方のクライアントを使っている人はあまりいないと思うので、気をつけておくと良い。 - -## VCP-DCVを取得して -自分自身があまり資格に興味がないこともあり、あまりキャリアについての有用性はわかりません。 -ただ、VMware環境を運用するのに重要な知見を学ぶ機会は得られたかな、と感じています。 -また、vCenterは、5.1, 5.5でアーキテクチャが大きく変わった部分があり、古い情報からの変更点を知るのにも役立ちました。 -あとは、普段読む気にならないドキュメントをいろいろ読む機会にもなりました。 - -そういう意味では、資格取得は良いきっかけになったと思っています。 - -VCPのトレーニング受講だけでも高いので、会社などで機会をもらえる人は、自分の運用を見直すきっかけとして利用できると思います。 - - diff --git a/content/diary/2015/20150125_vmware_beta.md b/content/diary/2015/20150125_vmware_beta.md deleted file mode 100644 index 7ea11b3f..00000000 --- a/content/diary/2015/20150125_vmware_beta.md +++ /dev/null @@ -1,46 +0,0 @@ -Title: vShere Beta Program の注意点 -Date: 2015-01-25 21:01 -Category: blog -Tags: VMware - -VMware のBetaプログラムの利用について、基本的なルールがあるので、忘れないようにまとめた。 -ここに書いてあることは、オレオレ要約なので、きちんと自分で確認してください。 - -ざっくり言うと、「ここで知ったことは他で話すなよ」ってことでした。 - -[TOC] - -## 資料 -- [vSphere Beta Program](https://communities.vmware.com/community/vmtn/vsphere-beta) - -## 利用方法 -上記ページから"Join Now!"して、規約に同意すれば良い。 -規約は以下の2つあるので、それぞれ同意することになる。 - -- [VMware Master Software Beta Test Agreement(MSBTA)](https://communities.vmware.com/servlet/JiveServlet/previewBody/27069-102-1-36216/VMware%20MSBTA.pdf) -- [vSphere Program Rules](https://communities.vmware.com/servlet/JiveServlet/previewBody/27070-102-1-36217/VMware%20vSphere%20Beta%20Program%20Ground%20Rules.pdf) - -## vSphere Program Rules の内容 -MSBTAの方は、一般的な利用規約に近いもののようなので、省略。 -ライセンスは限定的な利用に限るだとか、そういったことが書かれている。 - -vSphere Program Rulesについては、以下のような内容になっている。 - -### VMware vSphere Beta Program Ground Rules - -- ベータプログラムの情報を受け取ることへの同意 -- フィードバックや質問は、Beta communityを使うこと。issueなどは、Support Requestを使うが、その解決はSLAなし -- フィードバックに対して、VMwareから反応があることもあるし、ないこともある -- バージョン番号とか付いているかもしれないけど、リリース版でどうなるかは謎なので、注意 - -### VMware vSphere Beta Program Confidentiality Rules - -#### 許可されて**いる**こと -- Beta Program参加者と、このプログラムについて話すこと -- 保護されているプライベートなディスカッションフォーラムに投稿すること -- VMwareとのNDAの範囲内でサーバーベンダーとこのプログラムについて話すこと - -#### 許可されて**いない**こと -- このプログラムについて、公に議論すること -- 上記(たぶん許可されていることのリスト)のリスト以外の人と、プライベートに議論すること - diff --git a/content/diary/2015/20150126_dns_server.md b/content/diary/2015/20150126_dns_server.md deleted file mode 100644 index cbc87e27..00000000 --- a/content/diary/2015/20150126_dns_server.md +++ /dev/null @@ -1,41 +0,0 @@ -Title: DNS サーバーの比較資料集め -Date: 2015-01-26 03:12 -Category: blog -Tags: DNS, Debian - -自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。 -DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。 -以下に、参考ページを列挙する。 - -[TOC] - -## 参考になるページ -### 権威サーバ -- [DNSサーバパフォーマンス評価](http://jprs.co.jp/enum/enum_jprs/activity/pdf/N+I-20050610-C24.pdf) -- [NicTool](https://github.com/msimerson/NicTool/wiki/Install-Nameserver) -- [PowerDNS + NSD で DNS を構築する](http://blog.akagi.jp/archives/4072.html) -### キャッシュサーバ -- [DNSキャッシュサーバ 設計と運用のノウハウ](http://dnsops.jp/event/20140626/DNS-design-operation-higashi.pdf) -- [DNSキャッシュサーバ チューニングの勘所](http://www.slideshare.net/hdais/dns-32071366) -- [日本Unboundユーザー会](http://unbound.jp/unbound/) - -## 内容 -### 権威サーバ -BIND, PowerDNS, NSD, Knot, Yadifaなどの実装がある。 -BINDしか知らない人に対する注意点として、上記のDNSサーバの多くは、権威サーバとしてしか動作しない、ということがある。 - -BINDではしばしば問題にされているのを見るが、権威サーバとキャッシュサーバは分けておくほうがセキュリティ上のリスクは減るので、いっそ異なるサーバを使うようにしたいと思う。 - -特に、NSD, Knot, Yadifaはパフォーマンスが優れている。 -パフォーマンスについては、以下のページを見ると良い。 - -- [Benchmark - Knot DNS](https://www.knot-dns.cz/pages/benchmark.html#tab-response-rate) -- [Benchmark - Yadifa](http://www.yadifa.eu/benchmark) - -### キャッシュサーバ -BIND, Unboundなどがあるよう。 -[Unbound/NSD最新情報(OSC 2013 Tokyo/Spring)](http://www.slideshare.net/ttkzw/unboundnsdosc-2013-tokyospring-16708977)を見ると、Unbound(, NSD3, NSD4)の概要がわかる。 - - - - diff --git a/content/diary/2015/20150129_debian_docker_proxy.md b/content/diary/2015/20150129_debian_docker_proxy.md deleted file mode 100644 index 9343b4ce..00000000 --- a/content/diary/2015/20150129_debian_docker_proxy.md +++ /dev/null @@ -1,18 +0,0 @@ -Title: Dockerのプロキシ設定 -Date: 2015-01-29 07:54 -Category: blog -Tags: Docker, Debian - -自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。 -bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、 -あらためて考えると解決できた。 - -結論は、dockerのデーモンが起動するときに、プロキシの設定をしておく必要がある、というだけでした。 -/etc/default/docker に以下を記載します。 - -```shell - export http_proxy="プロキシのIP" -``` - - - diff --git a/content/diary/2015/20150130_cross.md b/content/diary/2015/20150130_cross.md deleted file mode 100644 index 4969fa9b..00000000 --- a/content/diary/2015/20150130_cross.md +++ /dev/null @@ -1,124 +0,0 @@ -Title: CROSS2015の運営をしたので、やったこととわかったことを書いておく -Date: 2015-01-30 22:09 -Category: blog -Tags: CROSS, 勉強会, 運営 - -[TOC] - -## わかったことざっくり -- 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない) -- 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す -- 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。 - -## 経緯 -2015年の1/29に大さん橋ホールにて、[CROSS2015](http://2015.cross-party.com/) というイベントの運営をしてきました。 -当日は都心から離れているにも関わらず、たくさんの参加者に来ていただいたのですが、どうにか大きなトラブルはなく、無事に終えることができました。 -1日中立ちっぱなしだったり、細かい備品調整の話があって、大変なのは大変でしたが、半年前くらいから準備をしていたこともあり、なんとかやりきった、という気持ちが強い状況です。 - -## やったこと -1000人規模のイベントをやるには、おそらくみなさん1年前~9ヶ月前くらいには準備を始めていると思います。 -ただ、今年のCROSSは開始が遅く、半年前からの準備になりました。 -時系列順に私がやっていたこと・やるべきだったことをまとめておきます。 - -### 全体的な役割 -1. 会場の手配 -2. 会場に用意する備品・機材の手配 -3. 他の係が使用するリソースの調整 -4. 当日のネットワークをつくっていただくCONBUとのやりとり -5. 当日は雑用。備品調整, ケータリングの搬入, ゴミ捨て, etc... - -### スタート時期 : 半年前~5ヶ月前 -とにかく会場を探す。 -CROSSの場合は、イベンターさんにお願いしつつ、自分達でも探してみていた。 -この時期には、基本的に会場が埋まっているため、会場スペックの優先度をつけ、評価基準を決める。 -評価パラメータとしては、 - - - 広さ, 天井の高さ - - 交通アクセス - - 料金 (会場のみパターン, 設営業者を含めたパターン) - - 最大利用時間 - - 搬入のしやすさ(駐車場から会場までの通路の広さなど) - - 受付(を設営するであろう)場所の広さ ← 参加者が受付に並ぶことになるので。 - - スピーカー、電源などの位置と数 (工事費に関わる。この段階では工事の見積もりはもらえないことが多いので、参考に知っておく) - - 回線があるか。自分で引けるかも確認。 - - ... - -などがあります。 -全部を満点にする会場はないので、重視する項目を考えておく必要があります。 -ただ金額が大きくなるため、料金をどれだけ優先するかなど、 -概して会場担当に決定権はないので、事前に意思決定者に確認しておきましょう。 - -### 会場決め(遅い) : 5ヶ月前~4ヶ月前 -会場を絞り、現地に観に行くなどして、会場を決めます。 -それと同時に、当日のレイアウトの概要を仮決めします。 - -おそらく、企画系の係については、まだ具体的なことが決まっていないため、意見を聞いても無駄です。 -聞かれた方も困るので、とにかく先に会場レイアウト案を作って、不満点を聞くのが良いようです。 - -このあたりから、実際の金額の見積もりをして、いくらに収めれば良いのか、もう一度確認をしておきましょう。 -会場やイベンターさんから(ざっくりでも良いので)見積もりをもらえるようにしておきましょう。 -会場費はハコの値段であって、下がらないのが普通のようです。 -その他の部分として、業者を会場指定の業者にしたら下がらないか、とか、細かいことは聞いてみた方が良いです。 -(大さん橋ホールは設営・工事について、特に指定はありませんでした。) - -### 折衝の時期 : 3ヶ月前~2ヶ月前 -この時期になると、会場のことはほとんど見えてきているはずです。 - -他の係や業者との折衝が主な役目になってきます。 -特に企画系のものが具体的になり始めるため、こういうことをやりたいのでスペース欲しいです、などの話が来ます。 -最低限、以下の項目は確認しましょう。 - -- 広さ -- 時間 -- 必要な備品 -- たくさん人が来そうか -- セッション会場の近くに置いて良いか - -特に騒がしいものは、実際にやってみないと影響は読みづらいので、できるだけ離しましょう。 -ただ、相手の方もやるなら良い場所を、という風に思っているようなので、交渉になると思います。 - -自分の場合、どうしても外に出てやってほしい企画があったのですが、話し合いの末折れてしまいました。 -結果論ですが、話し合いの最想定していた以上に騒がしくなってしまい、周囲の参加者に不便をかけてしまったのは、無責任だったと反省する点です。 - -### 2ヶ月前~1ヶ月前 -自分はこの時期、ほとんど参加できませんでした。 -なので、見ていた限りの話になります。 - -1ヶ月前になってしまうと、備品・工事など、いろいろな調整ができなくなってくるので、 -FIXするための駆け込みの確認・変更が増えます。 - -もしかすると、Q&A票を用意して、3,4日に一回そのまま会場などに聞ける体制を用意した方が良いかもしれません。 -今回は、質問を会場係が受け取り咀嚼して、改めて会場などに電話・メールで聞く、というフローになっており、ボトルネックが会場係になりかねない状況でした。 -できるなら、初めからQ&A票でやりとりしておき、その票で直接答えてもらうようにしておくと、負担は減ると思います。 - -### 直前 -当日のフローの確認がメインです。 -だいたい何を言われても、調整できることは限られているので、できる範囲でやりましょう。 - -### 前日・当日 -やるだけ。 -自分が意識してやったことは、以下の通り。 -だいたいトラブルが起きた時のフローは、自分の中で確認しておく。 -連携のために、各担当者のうち少なくとも2人ずつくらいは名前を覚えておく。 -明らかに作業担当が1人になっている作業は、手伝って、SPoFを減らす。 - - -### つらいこと -- 昨年ベースのことが多すぎて、わからない - 自分は昨年参加していないのだけど、 昨年の資料から読み取れることが少ない。 - そのため、一切相談なく、「こうやるもんでしょ」みたいな言い方をされることがある。 - だいたい別に確認したら、昨年がそうだった、という話。 - そういうこともあるんだな、くらいに受け止めるようにする。 - -- 事前に意思決定者に相談していても、なかったことになっている - 人数が多い会議あるあるなので、特にいうことはない。 - つらいことではあるけど、そういう場合は証跡を残していない自分のせいもある。 - -## 感想 - -書いているうちに取り留めのない感じになってしまいました。 -とりあえず、半年間準備して、無事終わることができて、 -CROSSに来ていただいた人、一緒に活動したスタッフ、関係してくださった全ての人にお礼が言いたいということで。 -ありがとうございました。 - - diff --git a/content/diary/2015/20150131_cross_unconference.md b/content/diary/2015/20150131_cross_unconference.md deleted file mode 100644 index e630fad4..00000000 --- a/content/diary/2015/20150131_cross_unconference.md +++ /dev/null @@ -1,20 +0,0 @@ -Title: CROSS 2015のアンカンファレンスで話しました -Date: 2015-01-31 03:20 -Category: blog -Tags: 勉強会, 脆弱性 - -CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。 -スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。 -たぶんプレゼン作成時間30分くらい。 - - - -書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。 -自分自身は何か情報系の教育を受けてきたわけでもなく、我流で対応しているのですが、未だに目安として定量的に判断する方法を持っていない。(ただしCVSSスコアを除く)。 - -会社としては、どんだけバズった脆弱性でも対応しないとなったら、説明責任があるので、そういうときに説明できるような基準を自分で持たないといけないな、と最近は思っているわけです。(話題になってないけど、対応した、みたいなのも、本当は理由をもっておくべきだけど、優先度は低いはず...。) -何か良い方針があれば、教えてください。 - - -あと、最後のページに書いてある本を輪読会したいので、興味がある方がいれば、[@\_hitsumabushi\_](https://twitter.com/_hitsumabushi_)まで。 -やるとしたら、平日は新宿・渋谷とかの辺が良いです。 diff --git a/content/diary/2015/20150201_consistent_hash.md b/content/diary/2015/20150201_consistent_hash.md deleted file mode 100644 index 1aa5bd24..00000000 --- a/content/diary/2015/20150201_consistent_hash.md +++ /dev/null @@ -1,18 +0,0 @@ -Title: Consistent Algorithm -Date: 2015-02-01 00:33 -Category: blog -Tags: Algorithm, papers, 論文 - -Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。 -たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。 - -## 読んだ内容 -pandoc+beamerを試してみるついでに、スライドにまとめた。 - - - -## 疑問点 - -1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ? -2. ノードを削除するとき、ノード側でリバランスする必要があるが、その場合には別途方法を考える必要があるように思う。(IDの再計算はそんなに難しくはなさそうに思う) - diff --git a/content/diary/2015/20150207_easter_egg.md b/content/diary/2015/20150207_easter_egg.md deleted file mode 100644 index 04274f06..00000000 --- a/content/diary/2015/20150207_easter_egg.md +++ /dev/null @@ -1,94 +0,0 @@ -Title: Easter Egg Collections -Date: 2015-02-07 21:44 -Category: blog -Tags: 遊び - -イースターエッグは、見つかるとよく話題に上がっているけど、 -実際にどんなものがあるのか、よく知らないなー、と思ったので集めようと思う。 -ただ、調べてみると、昔あったものがなくなってたりして、このリストも最新状態に保つ必要があるので、なくなってたら教えてほしいです。 - -とりあえずは、いろいろ見つけるたびに徐々に更新していきたいと思います。 - -[TOC] - -## イースターエッグたち -### Vim -最初にこれを書くきっかけになったものを挙げておこう。 - -- [:h quotes.txt](http://vim-jp.org/vimdoc-ja/quotes.html) : [プログラマーがじゃぶじゃぶコード書きたく鳴るような射幸心を煽りまくるvimの説明文](https://github.com/vim-jp/issues/issues/699) が見られる。 -- [:h 42](http://vim-jp.org/vimdoc-ja/usr_42.html#42) もある。 - -### Emacs -こいつは何がイースターエッグなのかわからない。 -ゲームができるのは、普通だし、何を挙げれば良いんだろうか。 - -- ``M-x doctor`` -- ``M-x butterfly``: これは探してて面白かった。元ネタは[これに説明されてるっぽい](http://xkcd.com/378/) - -### apt, aptitude -Debian/Ubuntuなどでよく見る、``This aptitude does not have Super Cow Powers.``, ``スーパー牛さんパワーなどはありません。``という文章、この周辺のイースターエッグがある。 -最近のAPTには、よく使われるコマンドがapt-get, aptitude, apt と3種類あるので、それぞれ調べよう。 - -- ``apt-get moo``, ``aptitude moo``, ``apt moo`` -- ``aptitude upgrate`` -- ``apt-get | tail -1`` -- ``aptitude -v moo`` -- ``aptitude -vv moo`` -- ``aptitude -vvv moo`` -- ``aptitude -vvvvv moo`` -- ``aptitude -vvvvvv moo`` - -(apt コマンドだけ少ないなー、と思って、ちょっとずるをしてしまって、aptコマンドのmoo周りのソースを読んでしまった。 -実際に自分が実行してその文が表示されるまで、ここには書かないで楽しみとして取っておきたいと思います。) - -### Google -1. 検索結果系 - - [do a barrel roll](https://www.google.co.jp/search?q=do+a+barrel+roll):画面がまわる - - [tilt](https://www.google.co.jp/search?q=tilt), [askew](https://www.google.co.jp/search?q=askew): 画面が傾く - - [Google Gravity](http://mrdoob.com/projects/chromeexperiments/google-gravity/): 崩れる。しかも普通に使える - - [recursion](https://www.google.co.jp/search?q=recursion): もしかして、が再帰 - - ``999999..999999`` と検索するとエラーになる -2. ゲーム - - [zerg rush](https://www.google.co.jp/search?q=zerg+rush) - - [atari breakout](https://www.google.co.jp/search?q=atari+breakout&tbm=isch) - - [Pacman](https://www.google.com/doodles/30th-anniversary-of-pac-man) -3. google map - - [この場所で、街灯の下の白いバッテンをクリックする](https://www.google.com/maps/@51.492137, -0.192878, 3a, 75y, 291.8h, 71.14t/data=!3m6!1e1!3m3!1sc9UMhWP_MWm9U0L48xEjYw!2e0!3e5!4b1?hl=en) -4. 電卓系: 検索すると電卓の結果がでる - - [人生、宇宙、すべての答え](https://www.google.co.jp/search?q=%E4%BA%BA%E7%94%9F%E3%80%81%E5%AE%87%E5%AE%99%E3%80%81%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E7%AD%94%E3%81%88)=42 - - [the loneliest number](https://www.google.co.jp/search?q=the+loneliest+number)=1 - - [a bakers dozen](https://www.google.co.jp/search?q=a+bakers+dozen)=13 - - [number of horns on a unicorn](https://www.google.co.jp/search?q=number+of+horns+on+a+unicorn)=1 - - [once in a blue moon](https://www.google.co.jp/search?q=once+in+a+blue+moon)=1.16699016 × 10-8 ヘルツ -4. 表示言語の設定におかしいものがいくつかある。 - - [Bork, bork, bork!](http://www.google.com/intl/xx-hacker/) - - [Hacker](http://www.google.com/intl/xx-hacker/) - - [クリンゴン語](http://www.google.com/intl/xx-klingon/) - - [ラテン語風](http://www.google.com/intl/xx-piglatin/) -5. イースターエッグを調べていてたまたま見つけた、[昔のグーグルっぽいページ](http://www.google.com/intl/en/heart/) - -おまけ) [過去のDoodle](http://www.google.com/doodles/) - -### Python -- pythonのインタプリタとかで``import this``とやる - -### Chrome -- ネット接続していないとき(Developer tooolsでも可)に、ページを検索してエラーページを出す。スペースキーを押せば、ゲームができる。 - -### nmap -- ``nmap -oS - example.com`` : Hacker語での表示 - -### telnet? というか何というか -- ``telnet towel.blinkenlights.nl`` - -### rails -- ``forty_two`` : (1..42).to\_a.forty\_two # => 42 - -## 資料集 -1. http://nanapi.jp/30883 -2. http://allabout.co.jp/gm/gc/296865/ -3. http://toomva.blog60.fc2.com/blog-entry-278.html -4. http://www.techgyd.com/google-easter-eggs-tricks/12438/ -5. http://emacsredux.com/blog/2013/04/03/easter-eggs/ -6. http://d.hatena.ne.jp/mickey24/20080808/1218161057 -7. https://www.digitalocean.com/community/tutorials/top-10-linux-easter-eggs diff --git a/content/diary/2015/20150207_hatena_engineer.md b/content/diary/2015/20150207_hatena_engineer.md deleted file mode 100644 index 46e9c099..00000000 --- a/content/diary/2015/20150207_hatena_engineer.md +++ /dev/null @@ -1,113 +0,0 @@ -Title: Hatena Engineer Seminar #4に行ってきました -Date: 2015-02-09 22:45 -Category: blog -Tags: 勉強会 - -[TOC] - -## Intro -タイトルどおり、行ってきました。 -目当ては、mackerelの話だったんですが、思ったより他の話も面白かったです。 -今回は抽選だったし、参加できなかった人のためにも、メモと感想を書いておきます。 -序盤の話はTwitterでつぶやいているので、参考までに。(後半はPCの電源が死んだのでないです) - -資料は見つけたら追加します。 - -### 開会の挨拶 -はてなの東京オフィスが増床するらしい。 -今回の会場は、その増床先のオフィスで、まだ机など入れる前にやってみよう、という感じでした。 -普通のオフィスとして使った時はどんな風になるのかわからないですが、今までのオフィス(今回の会場の1階下にあたる)も使うらしいので、ゆったりできそうです。 - -### Goで書かれたmackerel-agentのOSS化や自動化にまつわるあれこれ(@Songmuさん) - -[資料はこれ](http://songmu.github.io/slides/hatenatech-4/#0)。 - -自分もためにmackerel-agentのソースを見たりしているので、この話を一番楽しみにしていた。 -タイトルの通り、[mackerel-agentをOSS化](https://github.com/mackerelio/mackerel-agent)するにあたって、どういうことを考えているか、というお話でした。 - -[mackerel-agent-plugins](https://github.com/mackerelio/mackerel-agent-plugins)との対比もあって、微妙な違いがあり面白かったです。 -個人的に一番興味を持って聞いていたのは、Travis CIを使ったリリースの自動化でした。 - -それぞれのリポジトリの.travis.ymlファイルを見ているとわかりますが、タグを打たれたときに、自動でテストしてデプロイしているみたいです。 -それ自体はわりと珍しくもないと思いますが、OSSだからこそ大事だという話をされていて、なるほど、となりました。品質のためももちろんあると思うのですが、テストとかそういうものを整備して客観的な基準を作ることで、レビュー時のコミュニケーションロスを減らす目的のようです。 - -あと、なかなか真似できないですが、ユーザーがhackする余地を残す、というのもとても共感できました。 -ちょっと頑張ればhackできそう、という雰囲気を出すのが、難しいと思うんですが、mackerelはとっても良く出来ていてすごいです。 - -あと、WindowsようにAppVeyorを使っている、と言っていたんですが、このサービスを初めて知りました。 - -### はてなのサービスの開発環境(@astjさん) - -まず、2013年11月の段階のこのスライドを最初に読んだほうが良いです。 -[Vagrant と Chef でつくるはてなブックマークの開発環境](https://speakerdeck.com/aereal/vagrant-to-chef-detukuruhatenabutukumakufalsekai-fa-huan-jing) -
- -
- -半分は、この話からのアップデート+詳細という形式の話でした。 -上記のスライドは、どちらかというとツールのインストールまわりで困ります、という話だったんですが、今回は一歩進んで実際のミドルウェア設定まで考えた時に、本番との差異をどう吸収するのか、という話が聞けました。 - -ただ、個人的に悩みどころの、開発用DBのメンテの話とかはなかったので、あんまりちゃんと覚えられてないので、割愛します。(間違ったことを書きそうなので。) - -個人的に気になったのは、chefでプロビジョニングすると古いものの依存関係を解決するのが大変、みたいな話があったんですが、packerとかでイメージ作っても良いのかな、と思いました。 -ただ、hatenaでは、本番に使う用の古いライブラリrpmがあるみたいなので、どっちでもコストは大して変わらんのだろうな、という印象。 - -### はてなブックマークの新機能における自然言語処理の活用(@skozawaさん) - -この話は最近[はてなブログに追加されたトピックという機能](http://blog.hatena.ne.jp/-/topic/)の実装の話です。 -この話は自分自身が咀嚼できていないことが多いのですが、ざっくり流れをまとめてみます。 - -大きくわけて、トピック生成の話と、トピックタイトル生成の話でした。 - -トピック生成の裏側は、Elastic Searchで、[significant\_terms](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-significantterms-aggregation.html)を2層にして使っているようです。 -significant\_termsを使うと、重要語みたいなの(これをトピックとする)がわかるので、それを2層にすることで、特徴語を見つけることができることになります。 -トピックに属するエントリの判定は、この特徴語を用いて決めることができて、特徴語のスコアが80を超えたら、などの基準で、分類を行います。 - -ここまででトピック生成と、トピック内のエントリを分類できました。 - -次にトピックタイトルの生成です。 -実際にページを見ればわかりますが、トピックは単語ではなく、文章です。 - -記事タイトルを持ってくるのが楽そうなのですが、例えば新聞名が入っていたりとかするので、うまく処理しないといけません。 -処理の流れは、以下です。 - -1. 重要語抽出: ESの機能のほか、TopicSumという考え方も利用 -2. 重要文抽出: タイトルのスコアを計測、スコアが高いものを利用 -3. 文圧縮: 係受け解析をする(Cabocha & ipadic) : 媒体名を除くなどのため。 - -実際に文圧縮するには、係り受け解析をしたりして、重要な部分だけを切り取っているそうです。 -このあたりは試行錯誤の塊っぽいので、細かいことはフォロー出来ませんでした。 - -このお話は、試行錯誤の結果が見え隠れしていて、エキサイティングでした。 -こういう仕事ができるエンジニアになりたいですね。 - -### はてなのiOSアプリとSwift(@yashiganiさん) - -[資料というか本人のエントリ](http://yashigani.hatenablog.com/entry/hatena-engineer-seminar-4) -
- -
- -正直、Swiftとかアプリとかあんまり興味ないな、とか思っていたんですが、発表者の話が面白すぎて、今はちょっとSwift書こうかと思っています。 - -Swiftの良いところ、悪いところ、実際に使うと困るところまで、コードベースで話していて、これは今からObjective-Cは書かないな、むしろSwiftって良い言語じゃね、くらいまで思わせられました。 - -詳しくは本人のエントリを読むのが良いです。 - -### TypeScriptで実現するMVPアーキテクチャパターン(@nanto\_viさん) - -この話は、[たしかこれ](http://rookie.shonenjump.com/)の実装話だった気がする。 -(あまりちゃんとサイトまで見てなかったので、間違っていたらすみません...。) - -MVPモデルで実装することにした理由、またその中でTypeScriptを選択した理由、というお話を聞いていました。 -自分はあまりフロントの話はわからないのですが、MVP自体は知識として知っているものの、どういう背景で出てきたモデルなのかよく知らなかったです。(というか自分がフロントの勉強し始めた時には、すでにMVVMがあるような時代だった。) -今回の話では、フレームワークは最小限でやっていたので、そのあたりの細かい話から聞けました。(ロジックとビューの分離をしてテスト可能にしたい。表示位置などのプレゼンテーションロジックもテストしたい、など。) - -TypeScriptの話もaltJSとしては、とても使いやすそうに聞こえていて、今後自分がJSを書くとすれば生JSではなくて、TypeScriptにしようかな、と思います。(少なくとも型のある言語にしたいです。) - -## まとめ -今回はHatena Engineer Seminar #4は、はっきり言って全部の話が面白かったです。 -Hatenaはやっぱり良い会社だと思うし、そういう会社で働いている人と切磋琢磨できるように、自分も面白いことをやっていかねば、と思わずにはいられない感じでした。 -コーディング欲が増したので、懇親会には参加しませんでしたが、きっと懇親会も楽しい感じだったんだと思います。 -またあったら参加したいですね。 - diff --git a/content/diary/2015/20150209_fio.md b/content/diary/2015/20150209_fio.md deleted file mode 100644 index 9eebec30..00000000 --- a/content/diary/2015/20150209_fio.md +++ /dev/null @@ -1,111 +0,0 @@ -Title: fioを使ったベンチマーク -Date: 2015-02-09 22:27 -Category: blog -Tags: fio, benchmark - -[TOC] - -## Intro - -ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。 -今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。 -ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。 - -## オプション - -### オプションの与え方 -以下の2つが使える。 - -- コマンドラインオプションで与える -- オプションを記述したファイルを引数にする - - [global] - rw=randread - size=256m - directory=/tmp/fio-test - ioengine=libaio - iodepth=4 - invalidate=1 - direct=1 - - [random-read] - rw=randread - size=128m - directory=/tmp/fio-test - - [random-write] - rw=randwrite - size=128m - directory=/tmp/fio-test - -### 主なオプション - -| option | value | 意味 | -|-------|--------|-----| -| rw | read, write, randread, randwrite, randrw | ベンチマークの内容を決める。randrwはMixさせるもの。rwmixread=40でread 40%。| -| bs | [, ] (default: 4k) | ブロックサイズ。2つ与えられていると、read, writeになる。 | -| size | , 64\{k,M, G, T, P\}, 10% など | Job全体のIOサイズ。単位はb。| -| numjobs | (default: 1) | 同じワークロードを実行するスレッドをいくつ生成するか。 | -| directory | | fioで使うファイルのプレフィックス。| -| name | | ジョブ名を上書きする | -| ioengine | sync, psync, vsync, libaio, ... | Job IOをどのように行うかを決める。 | -| iodepth | (default: 1) | ファイルに対するIO書き込みのユニット数。IO waitを作り出すのに使ったり、複数のヘッドがあるときに使われる? | -| direct | 0 or 1 (default: 0) | 1、つまりtrueの時、 non-buffered IOを使う。(たいていは O\_DIRECT) | -| invalidate | 0 or 1 (default: 1) | IO計測の前に、キャッシュを使わないようにしておく | -| runtime | | 実行最大時間 | -| thinktime | | IO発行の間で、Jobを止める。単位は microsecond(μs) | -| fsync | (default: 0) | IOが与えられるたびに、fsyncを呼ぶ。 0の時は呼ばない。 | -| write\_iolog | | IOパターンの書き出し。各Jobで異なるファイルを指定する必要がある。 | -| read\_iolog | | IOパターンの読み出し | - -## アウトプットの見方 -### 実行例 - -
-# fio -filename=/mnt/test2g -direct=1 -rw=randwrite -bs=4k -size=2G -numjobs=64 -runtime=10 -group\_reporting -name=file1
-file1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
-...
-file1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
-fio-2.1.3
-Starting 64 processes
-Jobs: 64 (f=29): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww] [100.0% done] [0KB/315KB/0KB /s] [0/78/0 iops] [eta 00m:00s]
-file1: (groupid=0, jobs=64): err= 0: pid=3845: Mon Feb  9 20:10:11 2015
-  write: io=3256.0KB, bw=307748B/s, iops=75, runt= 10834msec
-    clat (msec): min=7, max=10192, avg=205.55, stdev=1093.89
-     lat (msec): min=7, max=10192, avg=205.55, stdev=1093.89
-    clat percentiles (msec):
-     |  1.00th=[    8],  5.00th=[    9], 10.00th=[   10], 20.00th=[   11],
-     | 30.00th=[   12], 40.00th=[   13], 50.00th=[   13], 60.00th=[   14],
-     | 70.00th=[   15], 80.00th=[   16], 90.00th=[   20], 95.00th=[  586],
-     | 99.00th=[ 6849], 99.50th=[ 9110], 99.90th=[10159], 99.95th=[10159],
-     | 99.99th=[10159]
-    bw (KB  /s): min=    0, max=  332, per=18.29%, avg=54.86, stdev=114.66
-    lat (msec) : 10=11.30%, 20=78.99%, 50=3.07%, 100=0.12%, 250=0.12%
-    lat (msec) : 750=2.95%, 1000=0.37%, 2000=0.25%, >=2000=2.83%
-  cpu          : usr=0.00%, sys=0.00%, ctx=1726, majf=0, minf=1909
-  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
-     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
-     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
-     issued    : total=r=0/w=814/d=0, short=r=0/w=0/d=0
-
-Run status group 0 (all jobs):
-  WRITE: io=3256KB, aggrb=300KB/s, minb=300KB/s, maxb=300KB/s, mint=10834msec, maxt=10834msec
-
-Disk stats (read/write):
-  sdc: ios=0/801, merge=0/2, ticks=0/10620, in\_queue=10624, util=98.48%
-
- -### 実行結果の意味 - -| key | value | -|-----|-------| -| bw | バンド幅 | -| clat | completeion latency。リクエスト送信から終了までの遅延時間 | -| IO depths | 実行時のリクエスト待機状態。submit 以下の行は、IOリクエストまでに要したレイテンシ情報。この例では、0ms~4msですべて処理されている。 | -| WRITE | ここのスレッドにおける、帯域幅の平均など | - -## 資料 -- [man fio](http://linux.die.net/man/1/fio) -- [ファイルシステムのベンチマーク集](http://www.nminoru.jp/~nminoru/unix/fs_benchmarks.html) -- [fioを用いたディスクIOのパフォーマンス測定](http://sourceforge.jp/magazine/08/05/22/0127246) -- [Provisioned IOPSの検討 - JPOUG Advent Calendar 2012](http://d.hatena.ne.jp/sh2/20121217) diff --git a/content/diary/2015/20150209_infra_design_pattern.md b/content/diary/2015/20150209_infra_design_pattern.md deleted file mode 100644 index a8f323b9..00000000 --- a/content/diary/2015/20150209_infra_design_pattern.md +++ /dev/null @@ -1,19 +0,0 @@ -Title: インフラデザインパターン -Date: 2015-02-09 12:52 -Category: blog -Tags: 本, Infrastructure -Status: draft - -## メモ -### 1. インフラデザインパターンとはなにか。 -- 要件定義→ 設計→ 構築→ テスト -- 要件定義 - - 機能要件 - - 非機能要件 - + 非機能要求グレード - + [[http://www.ipa.go.jp/sec/softwareengineering/reports/20100416.html]] - + [[http://www.ipa.go.jp/sec/softwareengineering/std/ent03-b.html]] - + [[http://www.ipa.go.jp/sec/reports/20130311.html]] - -### 2. 可用性要件の実現策 - diff --git a/content/diary/2015/20150316_VMware_NSX.md b/content/diary/2015/20150316_VMware_NSX.md deleted file mode 100644 index 729a6ff0..00000000 --- a/content/diary/2015/20150316_VMware_NSX.md +++ /dev/null @@ -1,81 +0,0 @@ -Title: VMware NSX -Date: 2015-03-16 09:58 -Category: blog -Tags: VMware, NSX -Status: draft - -[TOC] - -## 資料 -1. VMware NSX Network Virtualization Design Guide - -## VCP-NVの概要 -1. 言語: 英語 or 日本語 (日本語はしょぼそう) -2. 時間: 120分 -3. 問題数: 120問 -4. 問題形式: 選択式 - -## NSX Network Virtualization Design Guide -### Overview -Network Virtualizationの気持ちは、Server virtualizationと並行して理解すると良い。 -- Server virtualizationによって、CPU, Mem, Storageのことが、物理層と仮想層で分離された。VMからはハイパーバイザで抽象化されている -- Network virtualizationによって、物理ネットワークと仮想ネットワークを分離したい。VMからは仮想ネットワークプラットフォームで抽象化したい - + VMから見えるのは、IP transport層だけ - + CPU poolに対応するもの = transport capacityのpool - + スナップショット、削除、リストアをsoftware-definedでやる - -### Introduction to Network Virtualization - -1. Network Stacks - - | Layer | Components | - |----------|---------| - | Cloud Consumption | any apps. | - | Management Plane | NSX Manager | - | Control Plane | NSX Controller | - | Data Plane | destributed services, hypervisor kernel modules(Logical SW, Destributed LR, FW), NSX Edge, ESXi | - | Physical Network | physical components | - -2. Planes - - Control Plane - + 3台以上の奇数台をデプロイする - + 以下の制御を行う - - multicast freeなVXLAN - - DLR, DFWなどのプログラマブルな要素 - - Data Plane - + NSX vSwitchから成る。 - - NSX vSwitchは、vSphere vDSとサービスを有効にするためのコンポーネントを合わせたもの - - 追加のコンポーネントは、HypervisorにVIBとしてインストールされる - - DLR, DFW, VXLAN bridging用のVIBがある - + VXLANをオーバーレイネットワークのために利用 - - port mirroring, netflow/IPFIX, QoS, LACP, backup&restore, Health Check, ... - + VLAN-VXLAN間のgatewayもData Planeに含まれる - - これは、L2でも、L3でもありうる。(L2: NSX bridging, L3: NSX routing) - - Management Plane and Consumption Platforms - + REST APIや、UIなどを提供 - + Integrationに利用できるものとして、vCloud Automation Center(vCAC), vCloud Director(vCD)などがある - -3. NSX Functional Services - - Switching - - Routing - + overlay network上のトラフィックが、物理ルータに出ないようなルーティングをする - - FW - + vNICレベルでのFW - - LB - + L4-L7 load balancing - + SSL termination - - VPN - + SSL VPN to enable L2, L3 VPN - - Connectivity to Physical - + L2, L3 Gateway functions - -### NSX-v Functional Components -NSXは、Hypervisor Access Layerと、Gateway Access Layerという、2つのネットワークアクセスのレイヤを作っている。 -Hypervisor Access LayerはVMが使うためのもので、Gateway Access Layerは、Edge Gatewayが使うためのもの。 -つまり、物理層から見た時、オーバーレイのことを知らないとすれば、ハイパーバイザと通信しているか、ゲートウェイと通信しているか、の2つのトラフィックしかない。 - -1. NSX Manager - Management Plane。vCenterと1:1になる。 - - - diff --git a/content/diary/2015/20150316_VMware_NSX_configuration.md b/content/diary/2015/20150316_VMware_NSX_configuration.md deleted file mode 100644 index b7288117..00000000 --- a/content/diary/2015/20150316_VMware_NSX_configuration.md +++ /dev/null @@ -1,65 +0,0 @@ -Title: VMware NSX Configuration -Date: 2015-03-16 13:45 -Category: blog -Tags: VMware, NSX -Status: draft - -[TOC] - -## 知っておくこと -1. コマンドのあと、"?"をつけると、ヘルプ - -## コマンド -### Controller -1. Cluster status - - ```sh - # controllerのクラスタ参加やサービスの状況がわかる。 - # クラスタIDは、最初のコントローラと同じ。 - show control-cluster status - # ActiveなコントローラのIPを表示 - show control-cluster startup-nodes - # 各ロールごとのステータスがわかる。マスター情報もある - show control-cluster roles - # connectionのlistening, openingの状況がわかる - ## master nodeでは、 server, client, systemの数が上がる - ## slave nodeでは、electionの数が上がる - show control-cluster connections - ``` - -### LDR -1. DIの確認 - ESXi上で、net-vdrコマンドを利用 - - ```sh - net-vdr --lif ... - ``` - -### ESG -1. パケットのキャプチャ - - ```sh - debug packet display interface vNic_0 port_80 - ``` - -## メモ -- LIFの用途 - 1. 内部向け - - 各ESXiで同じvMAC, 同じIPを利用 - 2. アップリンク - - pMAC(not vmnicのMACアドレス)として、物理ネットワークから認識される - - 各ESXiごとに異なるpMACを利用する。IPは同じ。 - - DI: designated instance:(ARPの応答をするやつ。IPが同じ、異なるMACのLIFがあるので、必要) -- LIFの種類 - 1. VLAN LIF - vDS/vSSに接続。UpLinkではDIが選出。 - 2. VXLAN LIF - LSWに接続し、DIを選出しない -- LSWには、DLRのLIFは1つまで。もっとルータが欲しかったら、ESGWをつける。 - - -- DLR固有のもの - 1. プロトコルアドレス - ルーティングプロトコルのために、コントロールVMが利用 - 2. 転送アドレス - データプレーンのために、分散ルーターカーネルが利用 diff --git a/content/diary/2015/20150322_golang_linux_cmd.md b/content/diary/2015/20150322_golang_linux_cmd.md deleted file mode 100644 index 882b6f07..00000000 --- a/content/diary/2015/20150322_golang_linux_cmd.md +++ /dev/null @@ -1,78 +0,0 @@ -Title: GolangでLinuxコマンドを書いた時のメモ -Date: 2015-03-22 11:38 -Category: blog -Tags: golang -Status: draft - -[TOC] - -## やり始めて困ったこと -1. ディレクトリ構成をどうすべきか? - loggerなど、共通のモジュールをどう配置するべきか迷った。 - - ``` - - src - |-- foo - | - foo.go - |-- bar - | - bar.go - L-- util : 共通モジュールはこのディレクトリ以下に - - hogeee.go - ``` - -2. packageの名前分割単位 - ディレクトリ構成から決める。foo以下なら、fooパッケージ。 - -3. コメントの書き方 - 1. 関数のコメント : funcの上に書く - 2. package のコメント: packageの上に書く。(同じパッケージに複数書くと、多分ソートされて最初のやつ。) - -## テスト -1. テストの仕方 - foo/foo\_test.goというファイルで書く。 - - ``` - package foo - - import ( - "testing" - ) - - func TestSetLogger(t *testing.T) { - if logging := SetLogger(); logging == nil { - >-t.Errorf("Cannot Get Logger") - } - } - ``` - -1. 型情報をどうやって取得するのか - reflectパッケージを使う。 - - ``` - reflect.TypeOf(0) // => reflect.Type オブジェクトが返る - reflect.TypeOf(0).Kind() - reflect.TypeOf(0).Name() - reflect.TypeOf(0).NumMethod() // メソッドの数がわかる - reflect.TypeOf(0).Method(0) // reflect.TypeOf(0)(=int)をレシーバとする0番目のメソッド - ``` - -## 実装 -1. 引数の扱い - - 1. os.Argsを使う (全部自分でやるとき) - 2. flag パッケージを使う (ちょっと凝ったことをやるとき) - -2. ファイルの情報を取得 - - 1. os.Stat - 2. io.Ioutil - 3. filepath.Walk - - -## 最低限やること -1. 引数を見て処理をする -2. 正規表現でやる -3. オプションの実装 -4. 2, 3のオプションの実装 - - diff --git a/content/diary/2015/20150406_xmonad.md b/content/diary/2015/20150406_xmonad.md deleted file mode 100644 index 5d3de875..00000000 --- a/content/diary/2015/20150406_xmonad.md +++ /dev/null @@ -1,75 +0,0 @@ -Title: Xmonadの設定 -Date: 2015-04-05 01:38 -Category: blog -Tags: debian, xmonad - -[TOC] - -## 資料 - -1. [http://xmonad.org/documentation.html](http://xmonad.org/documentation.html) -2. [Archlinux Wiki - Xmonad](https://archlinuxjp.kusakata.com/wiki/Xmonad?rdfrom=https%3A%2F%2Fwiki.archlinux.org%2Findex.php%3Ftitle%3DXmonad_%28%25E6%2597%25A5%25E6%259C%25AC%25E8%25AA%259E%29%26redirect%3Dno) -3. [Xmonad/Config archive/John Goerzen's Configuration](https://wiki.haskell.org/Xmonad/Config_archive/John_Goerzen's_Configuration) -4. [Xmonadの設定 1/3 「基本」編 - ナレッジエース](http://blog.blueblack.net/item_424.html) - -## 環境 -Debian Sid & Xfce4 - -## Install and Initial Configure - -### Package install - -```sh -# basic packages -sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev -# for adding launcher -sudo apt-get install dmenu -# for status bar -sudo apt-get install xmobar -# tools -sudo apt-get install suckless-tools scrot tilda trayer -``` - -### Xsession -1. add `/usr/share/xsessions/custom.desktop` - - [Desktop Entry] - Name=Xsession - Exec=/etc/X11/Xsession - -2. `${HOME}/.xsession` - - xmodmap ~/.Xmodmap - exec xmonad - -### Edit config -```haskell -import XMonad - -main = do -xmonad $ defaultConfig -``` - -### Set xmonad as the default window manager -```sh -$ sudo update-alternatives --config x-window-manager -``` - -デフォルトのキーボードショートカットは、`man xmonad`で見ることができる。 -とりあえず、`Alt + Shift + p`を覚えておけば、ターミナルは起動できるので、困らないはず。 - -### Xmonad Setting w/ Xmonad - -## 設定のためのTIPS -1. xmonadの設定ファイルを書き換えたので反映させたい - - `mod-q` で反映される(restart) - - `xmonad --recompile`で構文チェックできる -1. ショートカットを設定するときのクラス名を知りたい - - xprop というコマンドが役立つ - - xprop | grep WM_CLASS - -1. vmware環境でウインドウサイズの変更に追従してくれない - - vmware-user-suid-wrapper - diff --git a/content/diary/2015/20150509_ravello.md b/content/diary/2015/20150509_ravello.md deleted file mode 100644 index 010fcc06..00000000 --- a/content/diary/2015/20150509_ravello.md +++ /dev/null @@ -1,89 +0,0 @@ -Title: Ravelloが便利 -Date: 2015-05-09 18:22 -Category: blog -Tags: ravello, VMware - -[TOC] - -## VMware環境のテストをしたい -会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。 -今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。 -あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、というのもあって、 -探していたらRavelloというサービスが面白そうだったので、紹介がてら書いておく。 - -## Ravello とは - -[Ravello](http://www.ravellosystems.com/) は、テスト環境を作成するためのクラウドサービス。 -![Ravelloロゴ](http://www.ravellosystems.com/sites/all/themes/ravello/images/new-images/ravello-logo.svg) - -裏では、AWSとGCEを使っているのですが、どちらにデプロイされるかは意識せずに使える。 -というのも、きちんとオーバーレイネットワークだったり、ストレージオーバーレイが行われているため。 -それで、AWSなどでESXiをデプロイする際の最大の問題になるCPUの仮想化支援ですが、Ravelloを使うと良きにはからってエミュレーションして、バイナリ変換してくれるらしい。 -要は、Ravelloを利用すると、Public Cloud上にNested ESXiを構築できるようになるということ。 - -## Ravelloを利用する -### Sign Up -まだ、ESXiをデプロイする機能はベータ版っぽいので、以下のページからSign Upする。 - -http://www.ravellosystems.com/solutions/esxi-cloud/esxi-on-aws - -### 制限事項 -デプロイできるバージョンとしては、5.x, 6.0となっているみたい。 -ただ、以下の通り、6.0ではWindows版のvCenterしか使えない。 -たぶんvCSAのデプロイ方法が変わったせいだと思う。 -6.0をテストしたいときには、Windows Serverが別途必要になるので、気をつけましょう。 - -| _version_ | _is supported_ | -|------------|--------------| -| ESXi 5.x | yes | -| ESXi 6.0 | yes | -| vCSA 5.x | yes | -| vCenter Server 5.x | yes | -| vcSA 6.0 | yes | -| vCenter Server 6.0 | no | - -### 実際の手順 -手順は、公式の資料を読もう。 -1. http://www.ravellosystems.com/blog/create-esxi-5-5-iso-image/ -2. http://www.ravellosystems.com/blog/install-vcenter-server-on-cloud/ -3. http://www.ravellosystems.com/blog/vsphere-lab-environment-cloud/ - -## Price -[Price List](http://www.ravellosystems.com/ravello-price-list)を見る。 - -| _element_ | _price_ | -|----------|------| -| VM(Cost) | $0.14/h ~ | -| VM(Performance) | not fixed | -| Storage | $0.12/GB/month | -| Library | $0.12/GB/month | -| IP | $0.01/VM/hour | -| Network転送量 | $0.15/GB | - -以上のような表になっている。 - -### 試算 - -| _VM_ | _NUM_ | _spec_ | -|------|--------|-------| -| vCenter | 1 | 2vCPU/8GB mem, 125GB storage | -| ESXi | 3 | 4vCPU/8GB mem, 100GB storage | -| NFS | 1 | 2vCPU/4GB mem, 200GB storage | - -という構成で作ると、 - -| _element_ | _price_ | -|----------|------| -| VM(Cost) | $1.25/h | -| Storage | $0.2158/h | -| IP | $0.05 | - -となって、$1.5/hくらいになる。(ただし、Library, Network転送量は除く) -安いコーヒー1杯分くらいで、自宅よりは快適な検証環境が作れそうだ。 -この価格も、そもそもESXiに100GBのストレージとかいらないし、もう少し安くできそうではある。 - -## まとめ的なの -もうちょっとRavelloを使い倒していきたい。 - - - diff --git a/content/diary/2015/20150528_windows_ansible.md b/content/diary/2015/20150528_windows_ansible.md deleted file mode 100644 index ecda46e6..00000000 --- a/content/diary/2015/20150528_windows_ansible.md +++ /dev/null @@ -1,88 +0,0 @@ -Title: WindowsをAnsibleで設定する -Date: 2015-05-28 06:07 -Category: blog -Tags: Windows, ansible - -[TOC] - -# 資料 -[Windows Support — Ansible Documentation](http://docs.ansible.com/intro_windows.html) - -# マシンの準備 -## ansibleコマンドを実行するマシン - -ansibleがすでに実行できる状況であれば、 -```sh -pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm -pip install kerberos # AD accountを使う場合 -``` -とすればOK。 - -## Windowsマシン -### 要件 -1. WinRM がインストール済み -2. PowerShell version > 3.0 - - 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる - - Windows Server 2012ははじめからPowershell 4.0がインストールされている - -### セットアップ方法 -1. [Powershell 3.0にアップデートが必要な場合](https://github.com/cchurch/ansible/blob/devel/examples/scripts/upgrade_to_ps3.ps1) -2. [WinRMのインストール](https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1) -3. `Configure-SMRemoting.exe -get` で有効になっていることを確認 -4. `WinRM get WinRM/config` でWinRMのポートを確認 - -# ansibleの実行方法 -## Inventory -最小構成は以下の通り。 以降は、hostsという名前で呼ぶ。 -``` -[windows] -hostname - -[windows:vars] -ansible_ssh_user=administrator -ansible_ssh_pass=_password_ -ansible_ssh_port=5986 -ansible_connection=winrm -``` - -## 利用可能なモジュール -1. raw, script, slurpなど -2. [Windows用のモジュール](http://docs.ansible.com/list_of_windows_modules.html) - [この辺](https://github.com/ansible/ansible-modules-core/tree/devel/windows)にあるやつはできそう - -# windows machineの facts -`ansible -i hosts _hostname_ -m setup` を実行する。 - -``` - "ansible_facts": { - "ansible_distribution": "Microsoft Windows NT 6.3.9600.0", - "ansible_distribution_version": "6.3.9600.0", - "ansible_fqdn": "_FQDN_", - "ansible_hostname": "_hostname_", - "ansible_interfaces": [ - { - "default_gateway": null, - "dns_domain": null, - "interface_index": 13, - "interface_name": "vmxnet3 Ethernet Adapter #2" - }, - { - "default_gateway": "_GATEWAY_", - "dns_domain": null, - "interface_index": 14, - "interface_name": "vmxnet3 Ethernet Adapter #3" - } - ], - "ansible_ip_addresses": [ - "_local_ipv4_", - "_local_ipv6_", - "_global_ipv4_", - "_global_ipv6_" - ], - "ansible_os_family": "Windows", - "ansible_powershell_version": 4, - "ansible_system": "Win32NT", - "ansible_totalmem": 2147483648 - } -``` - diff --git a/content/diary/2015/20150606_VDI_services.md b/content/diary/2015/20150606_VDI_services.md deleted file mode 100644 index 26557001..00000000 --- a/content/diary/2015/20150606_VDI_services.md +++ /dev/null @@ -1,144 +0,0 @@ -Title: VDI, DaaS市場を調べてみた -Date: 2015-06-07 03:31 -Category: blog -Tags: VDI, DaaS, AWS, Azure, VMware - -最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。 -DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。 -とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。 - -[TOC] - -## 参考資料 -- [http://www.netone.co.jp/report/column/20120302.html](http://www.netone.co.jp/report/column/20120302.html) -- [VSANでの検証](http://www.netone.co.jp/wp-content/uploads/2012/04/7b40e88a83e27031958fd41b697e679d.pdf) -- [アプリケーション仮想化の概説](http://www.dell.com/downloads/jp/solutions/whitepaper/solution/Application_Virtualization_Comparison.pdf) - -## 利用シーン -### 世の中の利用シーン -1. オフィス内からの利用 - - [Cisco WAASなどのTCP圧縮・冗長排除・キャッシュ](http://www.cisco.com/web/JP/news/cisco_news_letter/tech/waas2/index.html) -2. 出先での利用 - - オフィス? - - 映像系の人は? - -## VDIまわりとは一体何か? -- オフラインVDI: ユーザーデータのみロードパターンもある -- VDI: VDI, DaaS -- アプリケーション仮想化: アプリケーションごとの配信。thinappとか -### VDIの特徴 -1. ユーザーごとにデスクトップを割り当て -2. クライアント集中管理 -3. 可用性向上 -### 検討ポイント -1. 動画/Flash利用ユーザーへの配慮 -2. 回線の悪い状況(帯域が狭い場合 / レイテンシが悪い)のユーザー -3. GPUの利用は? -4. マルチデバイスで利用可能か? - - Zero Client みたいなものもある - - Chrome book -## なぜ使うのか、何が課題か -よく書かれているのは、以下の通り。 - -1. 運用コスト - - パッチ当て -2. セキュリティ - - 端末紛失 - + ユーザーのデータを端末に残さない -3. 災害対策・BCP - - 安全なDCを使う -4. ワークスタイル変革 - -## オンプレでやるとすると -### キャパシティプランニング -ブートに必要な領域。さらにメールデータも注意。 -個別のプロファイルを持たせている場合は、そのデータストア、フォルダリダイレクトを行う場合、ファイルサーバーに負担がかかる。 - -1. ストレージ - - IOPS - + 1ユーザーあたりの性能データ取得 - - ユーザー分布を調査 - + 同時接続数の測定 - - バースト時IOPS - + 最大ユーザー数 - + フラッシュストレージの検討 - - 容量 -2. ネットワーク - - CIFSのパケットのやりとりが非常に多い -3. ファイルサーバー - - CIFSで死ぬ - -### 性能検証 -1. ストレージ - - ストレージシステムコントローラ性能 - + SPECやSPCのベンチマーク結果 - + 縮退時のこともあるので、結局N-1~N-2程度での性能 - - ディスクIO性能 - -## 現状のサービス -### Amazon -- Amazon Workspace - + vCPU, mem, storage, office, ...を選択可 - + $35/month~ - + 1ユーザー1台 - + Windows Server 2008R2のみ - + ユーザー領域はS3 - - 12hourごとのバックアップ - + VDIの動的割り当てみたいなものはない - + いつも通りβ版っぽい - - 毎週日曜日 0:00-4:00までは利用不可 - -- Amazon Workspace Application Manager(Amazon WAM) - + アプリケーション仮想化 - + 普通のやつ - + ライセンス管理とかできる?? - - 使用頻度が取れる - + 割とお高い。$5/user - -- Amazon WorkDocs Sync - + ドキュメントストアみたいなやつ -### VMware -- Horizon Air - + http://www.atmarkit.co.jp/ait/articles/1505/21/news054.html - + 4300円/month~ , 50台以上 - + Desktop DRという安価サービスもある。ただ、復帰が24hour以内はつらい... - - とはいえ、事前にセットアップしておける、というのは便利なのかも? - - 700円/month + (起動してる間)300円/日 - - 起動は最低7日なので、起動するには、2100円/月以上 - -### Azure - -### 富士通 -- V-DaaS - + http://fenics.fujitsu.com/outsourcingservice/lcm/workplacelcm/virtualdesktop.html - + VMware Horizon DaaSベース - + 価格は顧客ID数/構成によって異なるが、参考価格はある - - 小規模だと1名あたり5000円/month前後~。大規模だと3000円/month強くらいまでいける。 - - 同時接続数での課金ではなさそう? - + デフォルトだと1台、420MHz/2GB Mem/40GB disk - + 3ヶ月/20ID以上~ - + いろんなオプションはありそうだし、さすがに富士通って感がある - - SIベースなのかな? - -### 新日鉄ソリューションズ -- $M^3$ DaaS@absonne - + http://www.absonne.jp/service/m3daas/menu3.php - + 画面転送、仮想デスクトップ型の2タイプ - + XenApp, XenDesktopベース - + 標準メニューではスペックが低め - - オプションで増やせそうだけど、価格不明 - + オプションはたくさん(書いてある): すべて価格不明 - - スナップショット、定期バックアップ - - ウイルススキャン - - 2要素認証とか、インターネットGW - - MDM - - ストレージサービス - - ADサービス - + 新日鉄という名前が私に、このサービスはSI前提だと囁いている - - 本当のところ、どんなサービスなんだろうか - - DaaSの国内シェアNo.1らしいし、利用者の話を聞いてみたい - -## まとめ -とりとめもなく、ggったことを書いてみたけど、やはりWindows連携が大事にされているっぽい。 -Windowsのことはよくわからないけど、少しオンプレVDIのネットワーク特性については、興味が湧いてきた。 -特性として、概ねブートストームと、CIFSの特性の2つで決まりそうだけど、機会があれば実験したい。(機会はたぶんない。) diff --git a/content/diary/2015/20150614_windows.md b/content/diary/2015/20150614_windows.md deleted file mode 100644 index 4d057f1c..00000000 --- a/content/diary/2015/20150614_windows.md +++ /dev/null @@ -1,13 +0,0 @@ -Title: Windowsの勉強を始めた -Date: 2015-06-15 00:04 -Category: blog -Tags: Windows - -人生で初めて、Windowsの勉強を始めた。 -進捗は以下のgithub pagesから確認できる。 -とりあえず、章立てを書いて、内容を徐々に埋めているところ。 - -- [Windows Server スタートガイド](http://hitsumabushi.github.io/windows_start_guide/) - - -内容の誤りやコメントなどあれば、githubのissueで欲しい。 diff --git a/content/diary/2015/20150623_runc.md b/content/diary/2015/20150623_runc.md deleted file mode 100644 index e214c317..00000000 --- a/content/diary/2015/20150623_runc.md +++ /dev/null @@ -1,132 +0,0 @@ -Title: runCをDebianで実行する -Date: 2015-06-23 20:47 -Category: blog -Tags: runc, debian - -[opencontainers/runc](https://github.com/opencontainers/runc) を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。 - - -[TOC] - - -## runCのインストール -golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。 - -``` -git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc -cd $GOPATH/src/github.com/opencontainers/runc/ -make -sudo make install -``` - -## 状況 -### ディレクトリ構成 -``` -. -├── container.json (とりあえず、runc spec で生成されるものでOK) -└── rootfs (docker exportして、tarを展開したものを置いたディレクトリ) -``` - -### 利用中のカーネル -```sh -% uname -a -Linux debian 4.0.0-2-amd64 #1 SMP Debian 4.0.5-1 (2015-06-16) x86_64 GNU/Linux -``` - - -## 問題 -ここまで準備できるとruncが実行できるはずなのだけど、やってみるとエラーが出る。 - -```sh -% sudo runc --debug -WARN[0000] signal: killed -Timestamp: 2015-06-23 20:50:18.148962383 +0900 JST -Code: System error - -Message: open /sys/fs/cgroup/cpu/user.slice/tmp/cpu.cfs_quota_us: permission denied - -Frames: ---- -0: start -Package: github.com/opencontainers/runc/libcontainer.(*initProcess) -File: process_linux.go@197 ---- -1: Start -Package: github.com/opencontainers/runc/libcontainer.(*linuxContainer) -File: container_linux.go@107 ---- -2: execContainer -Package: main -File: run.go@41 ---- -3: func·006 -Package: main -File: main.go@88 ---- -4: Run -Package: github.com/codegangsta/cli.(*App) -File: app.go@159 ---- -5: main -Package: main -File: main.go@96 ---- -6: main -Package: runtime -File: proc.go@63 ---- -7: goexit -Package: runtime -File: asm_amd64.s@2232 -``` - -## 対処 -### カーネルの再コンパイル -`cfs_quota_us` というのは、CFS Bandwidth Control というカーネルの機能らしく、cgroupなどと一緒に入ったものっぽい。 - -- [Red Hat Customer Portal](https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu.html) -- [Linux 3.2 の CFS bandwidth control (2) - TenForwardの日記](http://d.hatena.ne.jp/defiant/20120116/1326703352) - -とりあえず、カーネルコンパイルする必要がありそうなので、以下を参考に実施する。 - -- [Debian Linux Kernel Handbook - Common kernel-related tasks](http://kernel-handbook.alioth.debian.org/ch-common-tasks.html) -- [カーネルコンパイル -Debian Linux- - GreenLeaf](http://greenleaf.sakuraweb.com/index.php?%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%20-Debian%20Linux-) -- [Debian流Linuxカーネル構築法](http://www.foxking.org/oldsite/pc/kernel-deb.html) - -```sh -sudo apt-get install build-essential kernel-package libncurses5-dev bc -sudo apt-get install linux-source -sudo -s -cd /usr/src -tar xvf linux-source-4.0.tar.xz -cd linux-source-4.0 -cp /boot/config-4.0.0-2-amd64 .config -make oldconfig -make menuconfig -``` -ここで、 '/' を押し、"CFS" などを検索すると CFS Bandwidthの項目が見つかるので、チェックを入れる。 - -```sh -make-kpkg clean -make-kpkg --revision 1.0 --initrd kernel-image -sudo dpkg -i (できた debパッケージ) -``` - -### ブート時のカーネルパラメータ -上記だけでは動かなかったので、さらに、GRUBでカーネルパラメータを追加した。 - -/etc/default/grub を開いて、 -``` -# GRUB_CMDLINE_LINUX="" <-コメントアウト -GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" -``` -編集した後、 `sudo update-grub` をして、reboot。 -これで、`sudo runc` で実行できるようになっている。 - - -open container 自体は、まだspecも公開されていないし、特に遊べることはなさそうだ。 - -## その他の参考資料 -他にもカーネルコンフィグをいじった方が良いかもしれない。 - -- [Check Kernel Config Script for CRIU](https://gist.github.com/mapk0y/2d1b7537b6c6d1c8e7f9) diff --git a/content/diary/2015/20150626_twitter_mail_attack.md b/content/diary/2015/20150626_twitter_mail_attack.md deleted file mode 100644 index af8ece5e..00000000 --- a/content/diary/2015/20150626_twitter_mail_attack.md +++ /dev/null @@ -1,67 +0,0 @@ -Title: Twitterからメールアドレス拾えるんじゃね?的な攻撃について -Date: 2015-06-26 12:50 -Category: blog -Tags: security - -[任意のTwitterアカウントの登録メールアドレス(伏せ字含)を表示させる攻撃が急増中(対策設定有り)](http://did2memo.net/2015/06/24/twitter-one-click-login-attack/) というエントリが盛り上がっていたらしい。(とてもシェアされている) -ただ、自分には有用な攻撃シナリオには見えなかったので、考えを整理するために書いておきます。 -自分はセキュリティ素人なので、間違った考察かもしれません。 - -[TOC] - -## リンク先ブログの主張 -1. Twitterの機能から、(アカウント名, メールアドレスの一部) を取得できる - - メールアドレスは、最初の2文字と、ドメイン名部分はgmailのみ表示されるが、他は最初の1文字のみ。 -2. (アカウント名, メールアドレスアドレスの一部)のリストから、(アカウント名, アカウント名+ランダム列@gmail.com)のリストを生成する - - メールアドレスアドレスの最初の2文字と、アカウント名が一致しているものだけを利用する - - メールアドレスについては、ドメイン部分がgmailしかわからないので、gmail以外には有用でないため -3. 得られた(アカウント名, アカウント名+ランダム列@gmail.com)の情報を利用して、フィッシングメールを送信 -4. フィッシングメールから偽Twitterページに飛ばして、ログイン情報を盗む - -## 攻撃としての問題点 -いずれにせよ、(アカウント名, アカウント名@gmail.com) のリストしか取得できないので、 - -1. Twitterからアカウント名のリストを取得 -2. (アカウント名, アカウント名+ランダム列@gmail.com)を機械的に作成 -3. 得られた(アカウント名, アカウント名+ランダム列@gmail.com)の情報を利用して、フィッシングメールを送信 -4. フィッシングメールから偽Twitterページに飛ばして、ログイン情報を盗む - -としたほうが手間も少ないし、攻撃できる対象は変わらない。 -また、ランダムな文字列を付加せずに、アカウント名@gmail.com固定で送ったほうが効率が良いと思う。 -もっと多くのメールを送ることができるなら、@gmail以外にyahooなどにも送っても良いかもしれない。 - -## 評価 -リンク先ブログの手順をA, このブログで説明した手順をBと書くことにします。 - -1. 攻撃の容易さ - 1. リスト作成 - - A では、Twitterのサイトから有用なメールアドレスを得る必要があるが、条件として以下の2つがある上、Twitterにスパムと思われる可能性がある - - メールアドレスが、アカウント名から始まっていること - - gmailであること - - B では、Twitterのアカウントだけあれば、リストが作成できる - 2. メール送信 - - A のほうがBよりは不要なメールは少ない - - A, Bともある程度の期間で攻撃を達成しようと思えば、大量のメールを送る必要がある - - A, Bともスパム扱いされない工夫が必要 -2. 攻撃可能なユーザー - 1. A, Bとも同じ -3. 攻撃成功時に得られる情報 - 1. A, Bとも同じ - -### 自分的な結論 -自分がこの攻撃を行うなら、Bを採用したいと考えます。 -理由としては、 - -1. Aの攻撃を達成するには、Twitterのスパム判定回避と、gmailのスパム判定回避の2つを実行する必要がありますが、Bであればgmailのスパム判定回避だけで良いこと。 -2. Aの攻撃とBの攻撃で、攻撃可能対象は変わらない -3. Aの攻撃とBの攻撃で、攻撃成功時に得られる情報は変わらない - -という理由からです。 - -セキュリティ詳しい人だと異なる結論なのでしょうか...? - -## まとめ -1. 盛り上がっている内容の割に、特にセキュリティ的なリスクは変わらない -2. Twitterの設定を変えても意味がない。予測可能なメールアドレスを登録している限り、同じ攻撃ができる -3. フィッシングメールには、気をつけよう。パスワード入力する場合は、httpsであることや証明書を確認しよう - diff --git a/content/diary/2015/20150725_resource_allocation.md b/content/diary/2015/20150725_resource_allocation.md deleted file mode 100644 index c1b33a34..00000000 --- a/content/diary/2015/20150725_resource_allocation.md +++ /dev/null @@ -1,13 +0,0 @@ -Title: VM Resource Allocation -Date: 2015-07-26 20:30 -Category: blog -Tags: math, papers, 論文 - -## 資料 -* [stillwell_ipdps12.pdf](http://henricasanova.github.io/papers/stillwell_ipdps12.pdf) -* [Generalized Resource Allocation for the Cloud](http://research.microsoft.com/en-us/um/people/saikat/paper-socc12-rai-wrasse.html) -* [J0411055155.pdf](http://www.ijera.com/papers/Vol4_issue11/Part%20-%205/J0411055155.pdf) -* [Ghostscript wrapper for C:\Documents and Settings\Paolo\Desktop\icas2.pdf - icas_camera_ready.pdf](http://www.ce.uniroma2.it/~lopresti/Articoli/icas_camera_ready.pdf) -* [resilience](http://graal.ens-lyon.fr/~prenaud/Publis/resilience) -* [fetch.php](http://www.cse.iitb.ac.in/synerg/lib/exe/fetch.php?media=public:resources:stage0_5ppt_dhaval.pdf) - diff --git a/content/diary/2015/20150915_docker_memo.md b/content/diary/2015/20150915_docker_memo.md deleted file mode 100644 index f77181e6..00000000 --- a/content/diary/2015/20150915_docker_memo.md +++ /dev/null @@ -1,95 +0,0 @@ -Title: Dockerの細々としたメモ -Date: 2015-09-15 04:21 -Category: blog -Tags: docker, debian - -Debian で利用する際のメモを書いておく。 - -[TOC] - -## grub でのカーネルパラメータ - -1. systemd を利用する設定 -2. cgroups で、メモリに制限をかけるための設定 - -```sh -# quiet はあってもなくても良い -GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd" -GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" -``` - - -## cgroups まわり - -cgroups のディレクトリ配下に設定がある - -```sh -/sys/fs/cgroup/cpu,cpuacct/docker/ -``` - -## network - -[参考: Dockerのネットワーク管理とnetnsの関係](http://enakai00.hatenablog.com/entries/2014/04/24) - -docker コンテナを1つ立ち上げるごとに、vethデバイスができる - -```sh -1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default - link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 -2: eth0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 - link/ether 00:0c:29:e1:2c:42 brd ff:ff:ff:ff:ff:ff -3: eth1: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 - link/ether 00:0c:29:e1:2c:4c brd ff:ff:ff:ff:ff:ff -4: docker0@NONE: mtu 1500 qdisc noqueue state UP mode DEFAULT group default - link/ether ba:fe:c4:10:27:19 brd ff:ff:ff:ff:ff:ff -8: veth279cc5b@if7: mtu 1500 qdisc pfifo_fast master docker0 state UP mode DEFAULT group default qlen 1000 - link/ether ba:fe:c4:10:27:19 brd ff:ff:ff:ff:ff:ff link-netnsid 0 -``` - -### netns : network namespace - -```sh -$ ls -l /proc/{{.State.Pid}}/ns/ -合計 0 -lrwxrwxrwx 1 root root 0 9月 15 04:38 ipc -> ipc:[4026532695] -lrwxrwxrwx 1 root root 0 9月 15 04:38 mnt -> mnt:[4026532693] -lrwxrwxrwx 1 root root 0 9月 15 04:38 net -> net:[4026532599] -lrwxrwxrwx 1 root root 0 9月 15 04:38 pid -> pid:[4026532696] -lrwxrwxrwx 1 root root 0 9月 15 04:38 user -> user:[4026531837] -lrwxrwxrwx 1 root root 0 9月 15 04:38 uts -> uts:[4026532694] -``` - -### iptables - -```sh -$ sudo iptables-save | grep -v "^#" -*nat -:PREROUTING ACCEPT [28:2281] -:INPUT ACCEPT [27:2197] -:OUTPUT ACCEPT [68:6733] -:POSTROUTING ACCEPT [68:6733] -:DOCKER - [0:0] --A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER --A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER --A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE -COMMIT -*filter -:INPUT ACCEPT [16482:42893307] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [12048:507911] -:DOCKER - [0:0] --A FORWARD -o docker0 -j DOCKER --A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT --A FORWARD -i docker0 ! -o docker0 -j ACCEPT --A FORWARD -i docker0 -o docker0 -j ACCEPT -COMMIT -``` - -#### 設定の意味 - -## storage - -- [RHEL7におけるDockerのディスクイメージ管理方式](http://enakai00.hatenablog.com/entry/20140420/1397981156) -- [Resizing Docker containers with the Device Mapper plugin](http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/) - - diff --git a/content/diary/2015/20150917_esxi_ks_iso.md b/content/diary/2015/20150917_esxi_ks_iso.md deleted file mode 100644 index 8c0c42af..00000000 --- a/content/diary/2015/20150917_esxi_ks_iso.md +++ /dev/null @@ -1,50 +0,0 @@ -Title: ESXiのインストールをPXE bootせずに自動化したい -Date: 2015-09-17 09:10 -Category: blog -Tags: VMware, ESXi, automation -Status: draft - -## 動機 -PXEブートによるインストールでは、最初にサーバーとDHCPが通信する場合、サーバー側はVLANを利用できない。 -DHCPサーバー側がVLANセグメントにいると、サーバーの上位スイッチの設定を変更し、untagしてもらう必要がある。 - -そのため、すでにサービス投入されているようなサーバーたちで、untagする用のネットワークがない場合、 -ネットワーク構成を変更しづらいため、PXEブートによるインストールが難しい。 -(と隣のチームの人が困っていた。) - -世の中の企業が使っているような物理サーバーは、リモートからISOがマウントできたりするようなので、そのあたりの機能で自動インストールしてみる。 - -## 方法の概要 -まず、半自動で良いなら、kickstartファイルを指定することで、大部分を自動化できる。 -問題なのは、ISOをマウントする部分と、ISOからブートしたあとkickstartファイルを指定してインストールを進める部分になる。 - -まず、ESXiのISOをカスタマイズして、kickstartファイルを決め打ちで指定するようにし、その後ISOをマウントする部分を検討しよう。 - -### ISOのカスタマイズ - -まずISOの中身を取り出す。 - -```sh -$ sudo mount -o iso9660 -o loop /mnt -$ mkdir /tmp/workdir -$ cp -r /mnt* /tmp/workdir -$ chmod -R +w /tmp/workdir -$ sudo umount /mnt -``` - -次に、boot.cfg を編集する。 - -``` -bootcfgの中身 -``` - -ISOに固める。 - -```sh -$ genisoimage -relaxed-filenames -R -T -J -o custom.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /tmp/workdir -``` - -```sh -$ genisoimage -relaxed-filenames -R -T -J -o ks.iso /tmp/20150917_ks -``` - diff --git a/content/diary/2015/20151031_working.md b/content/diary/2015/20151031_working.md deleted file mode 100644 index 4dea17b6..00000000 --- a/content/diary/2015/20151031_working.md +++ /dev/null @@ -1,99 +0,0 @@ -Title: 最近の仕事の振り返り -Date: 2015-10-31 13:50 -Category: blog - -最近、仕事のやり方について考えている(悩んでいるに近いかも)ことが多いので、 -頭の中を整理するために、文章にしてみようと思う。 - -なので、技術的な内容は一切ない。 - -[TOC] - -## 目次 -1. スケジュール調整と突発案件 -2. エンジニアの成長パス -3. 愚痴とポエム - -## スケジュール調整と突発案件 -### 前置き -どんな仕事にも突発的な仕事は大なり小なりあると思う。 -自分としては精神的に負担が大きいし、元々やっている仕事との切り替えの負荷が高く集中力が削られるので、減らしたいと思っているのだけど、それ自体は無くせないし、仕方ないと思う。 - -一方で、(これはどこの会社も同じかわからないけど、)基本的にサービスの目標リリース日は、開発とか検証をする前に決まっていて、マイルストーンが後になればなるほど、リリース遅延が発生した場合の調整の難度が上がる。 -特に、営業が社外でプレセールスして良いという段階をすぎると、顧客からの信頼にも関わることなので、営業の人は絶対に避けたいだろうし、僕も避けたい。 -そうなると、できる限りリスクを把握して、リリース遅延が発生しうるなら、すぐに周知してマイルストーンを変更する必要があるのだと思う。 -(全部完成してから、というのがもっともリスクが少ない方法だけど、実施されていない理由として、スピード感が失われるし、投資回収が遅くなって良くないのだと思う) - -### 実際に困った状況 -実際に最近困ったシチュエーションは以下のようなものだった。 -体制的には、だいたいマーケティングする人と、開発リーダーと僕を含む開発エンジニアでサービスを作りつつ、プレセールス中は営業の人がフィードバックしてくれる、という体制だと思って読んでほしい。 - -1. 複数のプロジェクトに参加。 - - 優先度最高とされた進行中のプロジェクトは2つ - - プロジェクトAは2人で分業, Bは1人で開発 - - 同じ開発リーダー -3. プロジェクトAで開発以前の遅延があり、大きくずれ込む - - Aのリリース日を延期 -4. 問題があり、プロジェクトAのリリース日をさらに延期 - - Aのリリースがずれ込んだ結果、AとBのリリース日がほとんど近接 - - おそらくこの辺りで、プロジェクトBのリリース時期が営業に伝えられていた -5. 突発でプロジェクトCが舞い込んでくる - - マネージャー権限でプロジェクトA, Bよりも優先して実施することが明言される - - プロジェクトCの全体スケジュールはまだない状況 -6. プロジェクトBのリリース日が変わる様子がなかったので、「やだやだ、開発間に合わないし、絶対無理ですぅ」とリーダーに泣きついて、延期調整をしてもらう - - プレセールスを実施している営業の方から、当然どうにかならないか相談を受ける...悲しい -7. プロジェクトAはリリース日を変えられないと言われて、「やだやだ、たぶん開発間に合わないし、絶対無理ですぅ」ともう一度泣きついて、別の人をアサインしてもらう - - "たぶん"がついているのはプロジェクトCのスケジュールが来ていなかったから - -### 悩んでいること -どうすれば良かったのかが謎。 - -自分としてできることは、次はもっと早い時期に、「リリース日遅らせてくれ」って言って行くしかない。 -でも、それでも限界があるし、余裕を持ちすぎたスケジュールを作ってしまって、スピード感がなくなっても困る。 -開発し始めて、「リリースは来年な」とか言えないし、どうやって複数プロジェクトを並行して開発しつつ、各プロジェクトの遅延とか、突発的なプロジェクトによる差を吸収するのか、本当に難しい。 -自分が他部調整を直接やって、プレセールスする時期を遅らせると、もう少しマシなのかもしれないけど、開発に割ける時間が減って、開発期間長くなるしで、悪循環しかない。 - -### 追記: 2015/11/01 -プロジェクト管理の手法としての、リスク管理を学べばヒントがわかるかも、と気づいたので、以下を読んでみようと思う。 - -- - -## エンジニアの成長パス -### 前置き - という記事が話題になっていたのもあるけど、最近自分のスキルセットについて考えることが多かった。 -この記事では、プライベートを大切にしつつ、仕事中に成長できるようにしよう、と言っていると思う。 -自分もそういう派というか、「自分がプライベート中に勉強するのは良いけど、他の人には強要できないよね。だから仕事中にできるようになろうね」派なので、共感できる。 - -### 悩んでいること -そういう立場だと、仕事中に触れるものは、どういうものなんだろう、と考えることになる。 -自分の会社は、割とインフラをサービスにしていて、かつ、特化型に近いのだけどその中で広くやっている。 -そのため、人によるのだけど、自分の場合は1つのことをやっている期間が短くて、広く浅くやる感じになる。 -その中でエンジニアとしてどういう成長ができるんだろうか。 - -そして、特化してやっている人もいるのだけど、そういう人に対する成長はどうやったら仕事中に実現できるんだろうか。 -特化していると言っても、今やっている仕事に最適化されているだけ、という状況が生まれやすいので、それをどうやって回避して良いエンジニアの成長に繋げられるんだろうか。 -(ジョブローテは僕では実施できる権限がないので...。) - -### 最近やっていること -最近、部内勉強会をやっていて、いろんな理由にかこつけて、普段と違うことをやってもらえる準備をしている。 -今のところは、徒弟制度でやっていて、1ヶ月以上は準備期間が用意できるようにしている。 - -ざっくり言うと、詳しい人を選定してマスターになってもらい、その人と違うチームの人を選んでパダワンになってもらうスターウォーズ制度にしている。 -勉強会も仕事中にやってもらってるし、準備もできる限り仕事中にしてもらえるようにお願いしている。 -準備には知識の伝達と習得の時間がかかるので、1ヶ月以上前からお願いするように心がけている。 - -現状は、まだ試験実施の段階だけど、上司の理解があるおかげで継続はできているし、もう少し形になってきたら、詳しく書こうと思う。 - -## 愚痴とポエム -配属されて結構経って、少しずつ仕事の領域が広がってきたからか、仕事をしていると仕事のやり方について、一緒に仕事をしている人の「悪いやり方」みたいなのが目につくようになってきた。 -属人化して自分の仕事を守っているエンジニアとか、それを今まで放置してしまっているマネージャとか、社外とやり取りしている人からの要求に対して文句を言い続けるエンジニアとか、それを一緒になって言ってるエンジニアとか、問題を隠そうとするエンジニアとか。 -(もちろん、そんな例は少数だから最近まで気づかなかったんだけど。) -たぶんどんな会社にでもいると思うんだけど、自分は「もっとサービスを良くして、世界で勝てるサービスにしたい」と思っちゃってる人なので、邪魔だな、と思うし、仕事中だけは最低限をこなそうぜ、と思う。それで、それができない人がいるんだったら給料を下げるなり解雇してよ、ってマネージャーに対して思う。人が足りないから穏便に、って思うならメンタリングするなりしよう。 - -悪い雰囲気が一回広がっちゃうと立て直すのは難しいと思うし、どうにかしたいなー。 - - - ---- - -最近は仕事で悩みが多いので、地元に帰ってゆっくりと仕事したい。 diff --git a/content/diary/2015/20151208_vsphere6_high_availability.md b/content/diary/2015/20151208_vsphere6_high_availability.md deleted file mode 100644 index 4529d16f..00000000 --- a/content/diary/2015/20151208_vsphere6_high_availability.md +++ /dev/null @@ -1,51 +0,0 @@ -Title: vSphere 6.0 でのHA機能のエンハンスの要点 -Date: 2015-12-08 05:51 -Category: blog -Tags: VMware, vSphere - -[TOC] - -## まとめ - 1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。 - 2. vCenterは watchdogs によりプロセス落下時には再起動される - 3. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある - -## 資料 -1. [VMware vSphere 6 のドキュメント -](http://www.vmware.com/jp/support/support-resources/pubs/vsphere-esxi-vcenter-server-6-pubs) -2. [http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf](http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf) -3. [vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)](http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2081089) - -## vSphere 5.5 までの障害あるある(Part 1) -物理ホストのHBAが死んだり経路上の問題で、特定のホスト群のみストレージへのパスが切れた。 -vSphere 5.5 までは、ストレージへのパスが死んだ場合、HAによる保護ができない障害パターンで、IOが止まっているが、管理者が別のホストに移してから再起動するまでアプリケーションは死んでいた。 - -### vSphere 6になると... -VMCP(Virtual Machine Component Protection) の機能として、ストレージへのパスが切れた時に検知し、挙動を制御できる。 -VMware のドキュメントとしては、`APL` と `PDL` という2つの用語に分かれていて、設定上も異なる設定が可能。 - -- `APL` - - All path down - - 全パスが切れた場合 -- `PDL` - - Permanent device loss - - LUNがぶっ壊れて認識できなくなった場合など - - どういう状態かは[KB 208108](http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2081089)に例がある - -## vSphere 5.5 までの障害あるある(Part 2) -vCenterのプロセスが落ちる。 -仕方ないので、再起動させるスクリプトを書く。 - -### vSphere 6になると... -`Watchdog`がvCenterに組み込まれている。 - `PID Watchdog` と `API Watchdog`があって、それぞれプロセス自身を監視するのか、API経由で監視するのかの違いがある。 `API Watchdog` はデフォルトで起動する。 -`Watchdog` は、vCenterプロセスの再起動してくれる。2回プロセス再起動してもプロセスが上がらない場合には、リブートする。 - -## vSphere 6以降の設計ポイント -(今までもやっていたと思うけど、 )VMCPのおかげで、1クラスタの中でストレージの障害範囲を分けておけば、 HAしてくれるようになった。 -そのため、クラスタ内でストレージ機器への接続で、同一のスイッチを使わないようにするなど、検討する必要がある。 - -ところで、今回はvSphere 6で設計上の大きなポイントになる(と思っている)PSCについて一切触れていない。 -PSCの構成については、[List of recommended topologies for VMware vSphere 6.0.x (2108548)](http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2108548) に詳しく記載されている。 -とはいえ、日本語版はアップデートされていないようだし、気が向いたら書こうとは思う。 - diff --git a/content/diary/2015/20151209_vsphere_network.md b/content/diary/2015/20151209_vsphere_network.md deleted file mode 100644 index 1d876255..00000000 --- a/content/diary/2015/20151209_vsphere_network.md +++ /dev/null @@ -1,14 +0,0 @@ -Title: vSphere環境でのQoS -Date: 2015-12-09 10:05 -Category: blog -Tags: VMware, vSphere, network -Status: draft - -[TOC] - -# 資料 -1. [vSphere 5.5 の新機能紹介 ネットワーク2 (トラフィックのフィルタリングとマーキング)](https://blogs.vmware.com/jp-cim/2013/09/vsphere-55-network02.html) -2. [QoS - DiffServ QoS Model](http://www.infraexpert.com/study/telephony7.html) - -# VMware環境でのパケットのマーキング -vSphere 5.5以降、vDSを利用している場合、ポートグループ単位で、パケットのフィルタリングやマーキングができるようになった。 diff --git a/content/diary/2015/20151217_ipv6.md b/content/diary/2015/20151217_ipv6.md deleted file mode 100644 index 8eed4dc8..00000000 --- a/content/diary/2015/20151217_ipv6.md +++ /dev/null @@ -1,137 +0,0 @@ -Title: IPv6の基本についてまとめる -Date: 2015-12-17 05:54 -Category: blog -Tags: IPv6, network -Status: draft - -[TOC] - -自宅環境をデュアルスタックにしたいので、ルーターのIPv6の設定を調べていた。 -IPv6自体の理解が一部怪しいところもあったので、基本的なところから、まとめていく。 - -## アドレスの表現 -### アドレス形式 -128bitを使ったアドレス。 - -### 表示形式 -`2001:0db8:0:0:1111:2222:3333:9abe` のような8つの16bitの16進数で表示される。 -ただ、ipv6アドレスは長くなりがちであるので、書くのが大変だし読みづらい。 -0が続くフィールドは省略できるように、ということで、[RFC5952](http://tools.ietf.org/html/rfc5952) がある。 -ざっくり言うとルールとしては、以下の3つ。 - -1. 各フィールドの先頭に0がある場合には省略する - - 例えば、 `...:00a2:...` というのは、 `...:a2:...` と書かれる -2. フィールドに0が続く場合、 `::` を使う - - `...:a:0:0:0:b:...` というアドレスがあった時、0がたくさん続くと読みづらい。こういう場合に、`...:a::b:...` と書くことにする。`::`の部分は0が入る。 - - `1::2` とあったら、`1:0:0:0:0:0:0:2` というアドレスになるということ - - `...:a:0:b:...` というような 0のフィールドが続かない場合には、 `...:a::b:...` と書くのはNG。 - - `::`は最も短い表現ができるようにする - - `...a:0:0:0:0:b...` があった時、 `...a:0::b` などの中途半端に `::`で省略するのはNG。 - - 最も0のフィールドが連続している場所に `::` を利用する。例えば、`a:0:0:b:0:0:0:c` というアドレスがあった場合、 `a::b:0:0:0:c` と書くのは許されない。必ず、`a:0:0:b::c` である必要がある。 - + (補足) `a::b::c` と書くのはNG。 元のアドレスが復元できないので。 `a:0:0:0:b:0:0:c`でも同じになってしまう。そのため、 `::` は1度しか使えない。 - - `a:0:0:b:0:0:c:d` のように、省略可能なフィールドが複数あり、長さが同じ場合、先頭にある方を省略する。 つまり、 `a::b:0:0:c:d` と書く。 -3. "A"~"F"の文字は小文字を使う - - `...:123A:...` などは `...:123a:` と書かれる。 - - インターネット上の文書で、これに従っていないものが散見されるので、注意したほうが良い。 - -## アドレスの分類 : [RFC4291](https://tools.ietf.org/html/rfc4291) -### アドレスタイプの分類 -1. ユニキャスト - - インターフェースの識別子になる。 - - ユニキャストアドレスにパケットが送信された場合、対象のユニキャストアドレスを持つ単一のインターフェースにパケットが配送される。 -2. エニーキャストアドレス - - インターフェースの集合の識別子になる。 - - エニーキャストアドレスにパケットが送信された場合、対象のエニーキャストアドレスに所属するインターフェースのうち、1つのインターフェースにパケットが配送される。 - + ルーティングプロトコル上で決まる、**最も近い** インターフェースに配送される -3. マルチキャスト - - インターフェースの集合の識別子になる。 - - マルチキャストアドレスにパケットが送信された場合、対象のマルチキャストアドレスに所属する、すべてのインターフェースにパケットが配送される。 - -IPv4との違いとしては、 -- エニーキャストアドレスという概念ができた -- ブロードキャストアドレスがなく、代わりにマルチキャストアドレスを使う - -### ユニキャスト -#### アドレス形式 -`{n bit: subnet prefix}:{128-n bit: Interface ID}` という形式になっている。 -Interface IDについては、生成方法がいくつかあるけど、ここでは書かない。 - -#### 例 -1. 未指定アドレス - - 0:0:0:0:0:0:0:0 - - インターフェースにアサインされることはない -2. loopback アドレス - - 0:0:0:0:0:0:0:1 - - Link-Local アドレスの1つとして扱われる -3. Link-Local ユニキャストアドレス - - fe80::/10 - - インターフェースは必ず、1つはLink-Localユニキャストアドレスを持つ - - ルーターによって転送されないので、同じL2ドメインにあるノードでしか通信できない -4. ユニークローカル ユニキャストアドレス : [RFC4193](https://tools.ietf.org/html/rfc4193) - - fc00::/7 - - IPv4でいうところのプライベートアドレスとして使う想定で運用される(グローバルで疎通できないようになっているはず) - - アドレス範囲は以下のような分類がある - + fc00::/8 : IANAで管理されるようなので、申請したら取れるようになると思うけど、まだアサインされる方法がないので、使う方法がない。 - + fd00::/8 : 勝手に使って良い。ただ、擬似乱数でsubnet prefixを生成しなければならない。 - - 生成するツールを公開している人もいる -4. Global ユニキャストアドレス - - ルーターによって転送されるなど、ルーティングされる範囲で通信が可能なアドレス - - グローバルに通信ができるかどうかは、上位ルーターの設定次第なので、特に区別はない -### エニーキャスト -ユニキャストのアドレス空間から割り当てられるため、アドレスをみただけでは、エニーキャストかどうか判別できない。 -複数のインターフェースに割り当てられた時点で、エニーキャストアドレスになる。 -割り当てられたインターフェース側では、それがエニーキャストアドレスであることがわかるように構成されなければならない。 - -割り当てられたエニキャストアドレスに足しいて、すべてのインターフェースが属する、トポロジカルな範囲を識別するための、最小のプレフィックスPがある。 -このPの範囲の中では、エニキャストアドレスは、ルーティングシステムとは別のシステムとして(ホストルートと呼ばれる)保守されなければならない。 -Pの範囲の外では、エニキャストアドレスをPのためのルーティングエントリに集約しても良い。 - -#### 例 -サブネットルータ エニキャストアドレスは事前に定義されている。 -`{n bit: subnet prefix}::` というアドレスは、サブネット上のどれか1つのルーターに配送されることになる。 - -### マルチキャスト -`FF00::/8` が利用される。 - -``` -| 8bit | 4bit | 4bit | 112bit | -+--------+------+-------+-----------------------------------------+ -|11111111| flag | scope | group ID | -+--------+------+-------+-----------------------------------------+ -``` - -- flag = 0RPT というビット列 - + R - + 0 : `multicast address that does not embed the address of the RP` (RPはRendezvous Point のこと) - + 1 : `multicast address that embeds the address on the RP.` - + P - + 0 : network prefix ベースでない場合。(network prefix ベースであるときは、group IDの中に、network prefixの情報が埋め込まれている) - + 1 : network prefix ベースの割当。この場合、Tは必ず1になる。 - + T - + 0 : permanent - - "well-known"なものに使う。つまりIANAで管理されている。 - + 1 : non-permanently-assigned -- scope - + 0: reserved - + 1: Interface-Local scope - + 2: Link-Local scope - + 3: reserved - + 4: Admin-Local scope - + 5: Site-Local scope - + 6: (unassigned) - + 7: (unassigned) - + 8: Organization-Local scope - + 9: (unassigned) - + A: (unassigned) - + B: (unassigned) - + C: (unassigned) - + D: (unassigned) - + E: Global scope - + F: reserved - -- group ID - + マルチキャストグループの識別子 - -#### 例 -`FF01::1`, `FF02::1` はそれぞれ、インターフェースローカルか、リンクローカルのすべてのIPv6ノードのグループ。 - diff --git a/content/diary/2015/mscs_cluster.md b/content/diary/2015/mscs_cluster.md deleted file mode 100644 index e61740dc..00000000 --- a/content/diary/2015/mscs_cluster.md +++ /dev/null @@ -1,59 +0,0 @@ -Title:vSphere 5.5環境でMSCSクラスタを組むときの制約 -Date: 2015-01-07 20:29 -Category: blog -Tags: VMware, VCP, Microsoft, MSCS - -[TOC] - -## 資料 -MSCSのサポート状況 - - - [VMware KB: Microsoft Cluster Service (MSCS) support on ESXi/ESX](http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004617) - - [VMware KB: MSCS support enhancements in vSphere 5.5](http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2052238) - -MSCSとは - - - [http://www.atmarkit.co.jp/ait/articles/0812/03/news138\_5.html](http://www.atmarkit.co.jp/ait/articles/0812/03/news138_5.html) - -## MSCS -Microsoft Cluster Serviceのこと。 -MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。 - -複数台について、フェイルオーバー型のクラスタを組める。 -1台だけをマスターにして、他は待機系として構成する。 - -## VMware環境での利用 -### クラスタリング一般の注意 -クラスタリングのハートビートとして、 - -* ハートビート ネットワーク -* 共有ディスク(クォラムディスク) - -が存在するものが多い。 -この2つは構成上重要なので、以下ではここに注目する。 - -### サポートされている構成 -3種類のクラスタリング構成がサポートされている。 - -1. 1つのホストでの MSCS 仮想マシンのクラスタリング (CIB) -2. 物理ホスト間での MSCS 仮想マシンのクラスタリング (CAB) -3. MSCS 仮想マシンを使用した物理マシンのクラスタリング (N+1) - ※ この構成は、スタンバイ用のホスト1台を置いておき、他のホストのものとクラスタリングするもの。 - -### 制約 -| コンポーネント | 条件 | -|---------------|---------------------------------------| -| 仮想SCSIアダプタ | Windows 2003 => LSI Logicパラレル, 2008 => LSI Logic SAS | -| ディスクフォーマット | シックプロビジョニング、かつ、eagerzeroedthick | -| 共有ストレージ (CIB) | 仮想ディスクが推奨。仮想RDMも可 | -| 共有ストレージ (CAB) | 物理RDMが推奨。仮想RDMも可 | -| 共有ストレージ (N+1) | 物理RDMが利用可能 | -| ストレージアダプタ | ざっくりいうと、iSCSI, FCoEはサポートされている | - -### その他の制限事項 -* NFSディスク上のクラスタリングは不可 -* NPIV不可 -* FTとの併用不可 - -など。 - diff --git a/content/diary/2015/vmware_vDS_portbind.md b/content/diary/2015/vmware_vDS_portbind.md deleted file mode 100644 index 51f36e29..00000000 --- a/content/diary/2015/vmware_vDS_portbind.md +++ /dev/null @@ -1,38 +0,0 @@ -Title: vDSのポートバインドタイプ -Date: 2015-01-10 23:49 -Category: blog -Tags: VMware, VCP, vDS - -[TOC] - -## 資料 -[VMware KB: ESX/ESXi でのポート バインド タイプの選択](http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2086886) - -## ポートバインドタイプとは -vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。 -バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。) - -1. 静的バインド (Static Binding) -2. 動的バインド (Dynamic Binding) -3. 短期バインド (Ephemeral Binding) - -### 静的バインド -vNICが作成された段階で、直ちにポートにアサインされ、削除された時に初めて切断される。 -vCenter Server経由の時に利用可能。 - -### 動的バインド -VMがパワーオンされていて、vNICが接続状態の時のみ、ポートにアサインされる。 -パフォーマンスの観点から非推奨。 - -### 短期バインド -VMがパワーオンされていて、vNICが接続されている時に、ポートが作成され、アサインされる。 -VMがパワーオフされるか、vNICが切断された時に、ポートが削除される。 - -短期バインドの場合のみ、vCenterがダウンしている際、VMのネットワーク接続を管理することができる。 -256個までしか作れないとかパフォーマンスの問題から、リカバリ目的にのみ使用することが推奨。 - -## ポート数について -vSphere 5.1以降、静的ポートバインドの利用時、自動的にポートグループを拡張されるようになっている。 -vSphere 5.0では無効だが、MOBのReconfigureDVPortgroup\_Taskを変更して有効にすることもできる。 - - diff --git a/content/diary/2015/vmware_vdp.md b/content/diary/2015/vmware_vdp.md deleted file mode 100644 index 83c0b5ed..00000000 --- a/content/diary/2015/vmware_vdp.md +++ /dev/null @@ -1,37 +0,0 @@ -Title: VMware VDP, VDPA -Date: 2015-01-07 19:24 -Category: blog -Tags: VMware, VCP, VDP - -[TOC] - -## VMware Data Protection -### 資料 -- [vSphere 5.5 の新機能紹介 - VMware Blogs](http://blogs.vmware.com/jp-cim/2013/12/vsphere-55-vdpa.html) -- [VMware vSphere Data Protection のドキュメント](http://www.vmware.com/jp/support/support-resources/pubs/vdr_pubs) - -### 概要 -VMware Data Recoveryの後継みたいなものっぽい。 - -VDRから発展した点としては、以下があある。 - -1. FLR(File Level Restore) をサポート -2. サポート台数の増加 - -### ライセンス体系 - -- VMware Data Protection -- VMware Data Protection Advanced -の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。 - -#### VDPとVDPAの違い -0. dedupストレージの上限拡大(2TBから8TBになる) -1. バックアップ データ レプリケーション -2. Microsoft SharePoint 対応エージェント -3. EMC Data Domain システムへのバックアップ (元々は、vmdkにしか保存できない) -4. 自動バックアップ検証機能 (一時的なVMにリストアして、vmware-toolsのハートビートを検証。NICは抜いてある) - -以下の比較図は、[vSphere 5.5 の新機能紹介 - VMware Blogs](http://blogs.vmware.com/jp-cim/2013/12/vsphere-55-vdpa.html)からのもの。 -![VDP と VDPAの違いの表](/images/2014/vpd_vdpa.png) - - diff --git a/content/diary/2016/20160102_travis_cli.md b/content/diary/2016/20160102_travis_cli.md deleted file mode 100644 index 5999292f..00000000 --- a/content/diary/2016/20160102_travis_cli.md +++ /dev/null @@ -1,91 +0,0 @@ -Title: Travis コマンドでのエラー -Date: 2016-01-02 15:13 -Category: blog -Tags: travis - -[TOC] - -Travis CIでCIする素振りをしていたら、最新版のtravisコマンドでエラーが出るようになった。 - -## 発生した問題 - -```sh -$ travis setup releases -Invalid scheme format: git@github.com -for a full error report, run travis report -``` - -## 問題の解析 - -こういう時には、 -```sh -$ travis report -``` -をして、スタックトレースを見るものらしい。 - -```sh -$ travis report -System -Ruby: Ruby 2.3.0-p0 -Operating System: Mac OS X 10.11.2 -RubyGems: RubyGems 2.5.1 - -CLI -Version: 1.8.0 -Plugins: none -Auto-Completion: yes -Last Version Check: 2016-01-02 14:54:05 +0900 - -Session -API Endpoint: https://api.travis-ci.org/ -Logged In: as "" -Verify SSL: yes -Enterprise: no - -Endpoints -org: https://api.travis-ci.org/ (access token, current) - -Last Exception -An error occurred running `travis setup`: - Addressable::URI::InvalidURIError: Invalid scheme format: git@github.com - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:867:in `scheme=' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:795:in `block in initialize' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:2302:in `defer_validation' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:792:in `initialize' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:135:in `new' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/addressable-2.4.0/lib/addressable/uri.rb:135:in `parse' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/repo_command.rb:71:in `detect_slug' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/repo_command.rb:60:in `find_slug' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/repo_command.rb:21:in `setup' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli/command.rb:197:in `execute' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/lib/travis/cli.rb:64:in `run' - from /Users//.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/travis-1.8.0/bin/travis:18:in `' - from /Users//.rbenv/versions/2.3.0/bin/travis:23:in `load' - from /Users//.rbenv/versions/2.3.0/bin/travis:23:in `
' - - -For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues. -For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email support@travis-ci.com. -``` - -見た感じ、addressable というモジュールでパースに失敗しているらしい。 - -`travis.gemspec` を見ると、確かに、 `addressable` というモジュールがあるけど、 -```ruby -s.add_dependency "addressable", "~> 2.3" -``` -という指定になっている。一方で、上記のスタックトレースでは、`addressable-2.4.0` を使っているので、当たりをつけて以下を実行する。 - -```sh -$ gem uninstall addressable -$ gem install -v2.3.8 addressable -``` - -これで、travis コマンドが正常に実行できるようになる。 - -### ISSUE上での話 - -というところまで来て、改めて、issueを見てみたところ、 で議論されている。 -結論としては、以下の通りで、現状はまだ未修正だった。 -"`addressable`モジュールでは、URIをparseするためのライブラリだけど、SCP styleのURIというのは、RFCにもなってないので、`addressable`モジュールでサポートするものではないよ。なので、 travisコマンド側でハンドルしよう。" - diff --git a/content/diary/2016/20160104_gnome_keyring_via_ssh.md b/content/diary/2016/20160104_gnome_keyring_via_ssh.md deleted file mode 100644 index 36c5e9c1..00000000 --- a/content/diary/2016/20160104_gnome_keyring_via_ssh.md +++ /dev/null @@ -1,73 +0,0 @@ -Title: [WIP] GitをHTTPSで利用するときに、パスワードを記憶させておく via SSH -Date: 2016-01-04 14:37 -Category: blog -Tags: git -Status: draft - -[TOC] - -*まだ設定できていない* - -## 参考 - -- -- -- - -## 概要 - -1. Git側の情報 - 1. gitで認証情報を保存させるためには、credential helper を利用することができる - - キャッシュすることもできる - 2. creadential storeとして利用できるものとして、以下などがある - - Windows : git-credential-winstore, wincred - - OSX : osxkeychain - - Linux : gnome-keyring -2. SSHするときの情報 - 1. SSH利用時は(たぶん、何も設定しない場合には)、DBUSの設定がないために、gnome-keyring-daemon に接続ができない - 2. 要は、DBUSの設定をすれば良い - -## 試した設定方法 -Debian sid (`uname -r # => 4.2.0-1-amd64`) を利用。 - -1. gnome-keyring, gnome-keyring-dev のインストール - - ``` - $ sudo apt-get install libgnome-keyring-dev - ``` -2. git credential のgnome-keyring用モジュールのビルド - - ``` - $ cd /usr/share/doc/git/contrib/credential/gnome-keyring - $ sudo make - ``` -3. git config - - ``` - git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring - ``` -4. Xがない環境へのSSHを行う場合 - 1. ログイン時に、gnome-keyringをstart - 以下を、/etc/pam.d/loginに追加する - - ``` - auth optional pam_gnome_keyring.so - session optional pam_gnome_keyring.so auto_start - ``` - - 2. DBUSの開始 - 以下を、.bashrc などに追加する - - ``` - if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then - eval `dbus-launch --sh-syntax` - fi - ``` - - -### エラー内容 -/var/log/audit.log に以下のような内容のエラーが出る - -``` -couldn't initialize prompt: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.keyring.SystemPrompter exited with status 1 -``` diff --git a/content/diary/2016/20160325_jekyll.md b/content/diary/2016/20160325_jekyll.md deleted file mode 100644 index a3532318..00000000 --- a/content/diary/2016/20160325_jekyll.md +++ /dev/null @@ -1,35 +0,0 @@ -Title: 久しぶりにGitHub Pagesのjekyll触ったので、メモ -Date: 2016-03-25 03:06 -Category: blog -Tags: jekyll, github - -[TOC] - -このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、 -昔とだいぶ状況も変わっていそうだったので、メモをしておく。 - -## gem -とりあえず、Gemfileを用意して、以下の2行を書く - -``` -source 'https://rubygems.org' -gem 'github-pages' -``` - -## 全体的なconfig - -### GFMを使う - -ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、`_config.yml`に以下を追加しておいた方が良さそう。 - -```yml -markdown: kramdown -kramdown: - input: GFM -``` - -### related postを表示する - -```yml -lsi: true -``` diff --git a/content/diary/2016/20160503_yamaha_netvolante_dns_with_niftycloud.md b/content/diary/2016/20160503_yamaha_netvolante_dns_with_niftycloud.md deleted file mode 100644 index e7db1bc4..00000000 --- a/content/diary/2016/20160503_yamaha_netvolante_dns_with_niftycloud.md +++ /dev/null @@ -1,132 +0,0 @@ -Title: YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する -Date: 2016-05-03 06:24 -Category: blog -Tags: vyos,YAMAHA,NIFTY - -[TOC] - -## やりたいこと - -いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。 -ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、 -いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。 -そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更の必要がないようにしようと思う。 - - -## ネットボランチDNSとは -[ネットボランチDNSは、YAMAHAが提供しているダイナミックDNSサービスのこと](http://www.rtpro.yamaha.co.jp/RT/FAQ/NetVolanteDNS/index.html)。 -YAMAHAのルーターで利用可能。 -別にネットボランチDNSじゃなくとも、世の中のDDNSサービスを使えば良いとは思うけど、 -YAMAHAのルーターを使っている場合には、こちらの方が設定が簡単なので、今回はネットボランチDNSを利用する。 - -## 接続までの手順 - -以下は、YAMAHA RTX1200 (Rev.10.01.65) で実施している。 -回線はフレッツ光ネクストで、IPv4側の接続はPPPoEになっている。 -(今回は関係ないけど、IPv6側はIPoE。) - -### ネットボランチDNSの登録 - -1. 登録状況の確認 -今回はまだ何も登録されていないことを確認している。 -``` -# netvolante-dns get hostname list all - -(Netvolante DNS server 1) -``` -2. PPPoEで利用しているIPの登録 -ホスト名を`example-yamaha`とすると以下のようにして登録を行う。 -``` -# pp select 1 -pp1# netvolante-dns hostname host pp example-yamaha -pp1# netvolante-dns go pp 1 - -(Netvolante DNS server 1) -[example-rtx.aa0.netvolante.jp] を登録しました -新しい設定を保存しますか? (Y/N)Yセーブ中... usb1:/config.txt 終了 -``` -3. 登録の確認 -登録状況の確認としては、ネットボランチ用のコマンドで確認することに加え、名前解決しておく。 -``` -pp1# netvolante-dns get hostname list all - -(Netvolante DNS server 1) -PP01 example-rtx.aa0.netvolante.jp -# pp1# netvolante-dns go pp 1 - -(Netvolante DNS server 1) -``` -``` -pp1# show status netvolante-dns pp - -(Netvolante DNS server 1) -ネットボランチDNSサービス: AUTO -インタフェース: PP[01] -ホストアドレス: example-rtx.aa0.netvolante.jp -IPアドレス: <グローバルIPアドレス> -最終更新日時: 2016/05/03 07:23:13 -タイムアウト: 90 秒 - -(Netvolante DNS server 2) -ネットボランチDNSサービス: AUTO -インタフェース: PP[01] -ホストアドレス: -IPアドレス: -最終更新日時: -タイムアウト: 90 秒 -``` -``` -pp1# nslookup example-rtx.aa0.netvolante.jp -<グローバルIPアドレス> -``` - -### ニフティクラウドでVPNゲートウェイを作成する - -細かな作成手順などは、[YAMAHAさんのサイト](http://jp.yamaha.com/products/network/solution/dns_cloud/nifty_cloud/) にキャプチャつきで記載されているのえ、要点だけかいつまんで記載する。 - -カスタマーゲートウェイについては、以下のキャプチャの通りに作成した。 -![](/images/2016/vpn/create_vpn_connection.png) - -また、VPNコネクションについては、以下のキャプチャを参考にしてほしい。 -![](/images/2016/vpn/customer_gateway.png) - -すこしわかりにくいけど、VPNゲートウェイとカスタマーゲートウェイを結ぶ線をクリックすると、 -![](/images/2016/vpn/network_line.png) - -以下のような設定テンプレートをコピーできる -![](/images/2016/vpn/template.png) - -このテンプレートを元に、YAMAHA RTX1200を設定すれば良い。 -基本的には、テンプレートの内容をそのまま書くか、PPPoE用に書けば、だいたい大丈夫。 -テンプレートに含まれていないこととして、フィルタを空けるというのがある。以下のような感じでやれば良い。 -``` -ip pp secure filter in ...(既存のフィルタ) 200080 200081 200082 -ip filter 200080 pass * 192.168.100.1 udp * 500 -ip filter 200081 pass * 192.168.100.1 esp * * -ip filter 200082 pass * 192.168.100.1 udp * 4500 -``` - -## 疎通確認 - -YAMAHA RTX側で以下を実行すると良い -``` -# show ipsec sa -Total: isakmp:2 send:1 recv:1 - -sa sgw isakmp connection dir life[s] remote-id ------------------------------------------------------------------------------ -1 1 - isakmp - 27132 -2 1 - isakmp - 27144 -3 1 2 tun[001]esp send 1944 -4 1 2 tun[001]esp recv 1944 -``` - -さらに、クラウド側のローカルIPに向かって、pingを打って疎通確認をしておけば完璧。 - - -## まとめ - -ネットボランチDNSを使って、ニフティクラウドとIPSecで接続できるようにした。 -IPを変更したり...というテストはそれほどちゃんとやっていないが、まあ通常のVPNの接続断と大差ないので、大丈夫だろうと楽観視している。 -とりあえず、これで自宅環境で検証できることが増えるぞ。 - diff --git a/content/diary/2016/20160616_ansible_windows.md b/content/diary/2016/20160616_ansible_windows.md deleted file mode 100644 index b3fe780e..00000000 --- a/content/diary/2016/20160616_ansible_windows.md +++ /dev/null @@ -1,72 +0,0 @@ -Title: Anisble for Windows -Date: 2016-06-16 06:02 -Category: blog -Tags: ansible, windows - -[TOC] - -久しぶりに ansible で windows を操作するので、メモ。 -実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。 -ansibleは2.1.0を使っている。 - -# やること - -以下を anisble で実行する。 - -1. Windows Update -2. Windows Server 2012 R2 に AD をインストール -3. ADに適当なダミーエントリを突っ込む - -# 初期設定 - -## ansible 実行サーバーの準備 - -winrm経由で実行することになるので、 `pywinrm` が必要。 - -``` -# pip install ansible pywinrm -``` - -## Inventory - -``` -[windows_server] -ad-seed-001 ansible_host=164.70.5.244 - -[windows_server:vars] -ansible_user=adminuser -ansible_port=5986 -ansible_password= -ansible_connection=winrm -ansible_winrm_server_cert_validation=ignore -``` - -## 接続確認 - -``` -# ホスト側のwinrmの初期設定を行っていないと、おそらく失敗する -ansible -i inventory_file all -m win_ping -``` - -## ホスト側の初期設定 - -以下のスクリプトを実行すれば、ひとまずは、上記のpingが通る。 -FWがパブリック/プライベートの両方空いたりするので、必要に応じてスクリプトを変更する。 - -https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 - -再度、接続確認を行えば、おそらく成功する。 - -``` -ansible -i inventory_file all -m setup -``` -などとして、factを確認しておくと便利。 - - -# ansible playbook - -ある程度できたら書きます。 - -# 資料 -- -- http://qiita.com/yunano/items/8bddf084007671a38f57 : スクリプトなどはこちらを参考にした diff --git a/content/diary/2016/20160617_slack_hubot.md b/content/diary/2016/20160617_slack_hubot.md deleted file mode 100644 index 89df5524..00000000 --- a/content/diary/2016/20160617_slack_hubot.md +++ /dev/null @@ -1,144 +0,0 @@ -Title: 会社にslack入ったので、色々やってた -Date: 2016-06-16 14:45 -Category: blog -Tags: slack, hubot - -[TOC] - -勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。 - -# 現在のチャンネル構成 - -* 定常系 - * 分報用のチャンネル。個々人が作る - * 部署用 - * チーム用 - * プロジェクト用 -* 雑多な情報共有用 - * ニュース用 -* トラブル用 -* その他 - * 臨時に必要になるとか - * テストとか - -# やったことメモ - -## RSS を Slack に移行 - -live dwango reader をずっと使っていたのだけど、更新頻度がそこそこで、重要度の高いRSSを Slack で追いかけることにした。 - -### やり方 - -追加自体は簡単で、通知をしてほしいチャンネルで、以下のようなコマンドを打つ。 - -``` -# 通知したいチャンネルで入力 -/feed -``` - -こうしておくと、更新された時に、チャンネルに通知が来る。 - -### コメント - -通知先のチャンネルについては、内容に応じて分けておいた方が良いと思う。 -今まで自分はRSSを読んで、チームで共有するものは個別に共有していたけど、そういう情報源はチームのチャンネルに入れてしまった。 -もしかしたら、別途チームのニュースチャンネルを作った方が良いかもしれない。 -以下のような場合分けにした。 - -* 更新頻度が高すぎる - * RSS のまま - * そのうち、botでサマライズするように変える予定 - * 後述する通り、「RSSを読もう」という remind をしている -* 更新頻度がそこそこ - * 共有したい - * チーム・プロジェクト用のチャンネルへ通知 - * 自分だけで良い - * 分報用チャンネルへ通知 - * 分報用チャンネルはオープンなので、近くのチームの人は入っているので、興味があれば見る人もいるので、RSSよりは良い - -## 予定を remind する - -例えば、新人の日報を見る、とか、毎日RSSを見るとかの予定を Slack で通知させることにした。 -他に、そのうちやろうと思っている短い個人作業(5分以内とかのレベル)のタスクも、面倒なので、言われたその場で、 remindに入れてしまっている。 - -### やり方 - -``` -# 自分用 : 平日は毎日19:00 に "<リマインド>"をする -/remind #<分報用チャンネル> to "<リマインド>" at 17:00 every weekday -# チーム用 : 月曜日は毎日19:00 に "<リマインド>"をする -/remind #<チームチャンネル> to "<リマインド>" at 10:00 every Monday -``` - -### コメント - -``` -/remind me ... -``` -としても、リマインドできるけど、その場合、プライベートチャットでリマインドされる。 -会社のタスクだったり、予定だったりするので、特にプライベートでやる意味がないので、チャンネルに通知することにしている。 - -他の使い方については、helpを見よう。 よく使いそうなのは、 `in` とかだと思う。 - -``` -/remind help -``` -## 実行に時間がかかるコマンドの終了通知 - -検証などで、 ansibleやらを実行するときに、時間がかかるステップがある。(例えば、windwos update。) -実行中は他の作業をしたいので、終了を通知されるようにした。 - -### やり方 - -* Slack 側 : incoming webhook を設定。 - * アイコンは、スクリプト側で指定するので、無視して良い。 - * URLをメモするのと、通知先のチャンネル、ユーザー名を決めておく程度。 -* zsh shell側 : [時間がかかるコマンドの実行結果をSlackに通知する](http://qiita.com/izumin5210/items/c683cb6addc58cae59b6) を参考にした。 - * `SLACK_WEBHOOK_URL` をメモしたURL - * `SLACK_USER_NAME` をメンションしたいユーザー名 - -### コメント - -これは分報用チャンネルに入れた。 - -## GitLab, Jenkins との連携 - -Merge Requestが来たときとか。 -やり方は、割愛。 - -### コメント - -今のところは、複雑なことはやっていない。 -また細かい設定をしたら、書く。 - -## Zabbix などの監視 - -やった。 -ひとまず、alert の発生と収束だけを通知している。 -slackから操作できるようにしたいが、まだやっていない。 - -## Redmine/JIRA 連携 - -これからやるけど、全社共通のものなので、Redmine 側には pluginは入れてくれないかもしれない。 -botでやろうかと思っている。 - -## Office 365 - -できていない。 -メール・カレンダーは連携したい。 -社内ADと連携しているはずなので、社内ADの認証を通してから、APIを叩くbotを作る必要があると思っている。 -でも、APIのたたき方がわからない。まだ調べる気が起きていない。 - -### 暫定対処 - -直接は連携できていないが、ひとまず、メールをSlackに転送するようにした。 - -## bot - -まだ書いてない。 -これから書く。ひとまず、以下のあたりをやるつもり。 - -* 打刻 -* 定時頃になったら、今月の残業時間を通知 -* Redmine連携 - diff --git a/content/diary/2016/20160705_vmware_vcp_nv.md b/content/diary/2016/20160705_vmware_vcp_nv.md deleted file mode 100644 index 1d1323e2..00000000 --- a/content/diary/2016/20160705_vmware_vcp_nv.md +++ /dev/null @@ -1,84 +0,0 @@ -Title: VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる -Date: 2016-07-05 20:40 -Category: blog -Tags: VMware, NSX, VCP - -[TOC] - -## VCP6-NV 受験シリーズ - -+ [VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる]({filename}/diary/2016/20160705_vmware_vcp_nv.md) -+ [VCP6-NV 試験勉強メモ]({filename}/diary/2016/20160705_vmware_vcp_nv_study.md) -+ [VCP6-NV 試験勉強メモ 2日目]({filename}/diary/2016/20160705_vmware_vcp_nv_study_2.md) -+ [VCP6-NV 取得した]({filename}/diary/2016/20160705_vmware_vcp_nv_study_result.md) - -## この記事について - -1. 書くこと - - VCP6-NV の試験要項 - - VCP6-NV の受験方法 -2. 書かないこと - - 試験の勉強方法 - - 試験内容 - -## VCP6-NV について - -VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。 -他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系です。 - -![](/images/2016/vmware_vcp/VCP6-NV.png) - -上記の図を含め、資格と試験の情報は以下にまとまっています。 - -[VMware Certified Professional 6 – Network Virtualization (VCP6-NV)](https://mylearn.vmware.com/mgrReg/plan.cfm?plan=64294&ui=www_cert) - -### 試験について - -まず、今日(2016/07/05) 時点での、試験は、 `2V0-641: VMware Certified Professional 6 - Network Virtualization Exam` です。 -以前の試験から、2015/08/30あたりで切り替わっているようです(詳細は調べていません)。 -そのため、昔の情報を見る場合には、きちんと現行のVCP-NVになっているのか確かめる必要があります。 - -### 受講資格について - -現在、有効なVCPを持っているかどうかによって異なります。 -昔のVCPを持っている人に取っては、あまり馴染みはないですが、現行のVCPの試験には Foundation試験を受けた後、DCVならDCVの試験、NVならNVの試験という風な2段階の試験になっています。 -そのため、必要なトレーニングを受講後、試験2つをパスする必要があります。 -ただし、現在有効なVCP資格を持っている場合、トレーニングもFoundation試験も免除されるため、NVの試験(`2V0-641: VMware Certified Professional 6 - Network Virtualization Exam`) を受けるだけで問題ありません。 - -まとめると以下です。 - -1. 有効なVCPを持っている場合 - 1. `2V0-641: VMware Certified Professional 6 - Network Virtualization Exam` を受験し、合格する -2. VCPを保有していない、もしくは失効している場合 - 1. 対象のトレーニングの受講 - - NSX: Install, Configure, Manage [V6.0] , [V6.1], [V6.2] - - NSX for Internetworking Experts Fast Track [V6.0],[V6.1] - - NSX Troubleshooting & Operations [V6.1] (available as Onsite Training only) - - NSX: Design & Deploy [V6.2] (available as Onsite Training only) - - Security Operations for the Software Defined Data Center - 2. vSphere 6 の Foundation試験を受験し、合格する - 3. `2V0-641: VMware Certified Professional 6 - Network Virtualization Exam` を受験し、合格する - -### 試験の概要について - -このページにまとまっています。 -[VMware Certified Professional 6 – Network Virtualization Exam](https://mylearn.vmware.com/mgrReg/plan.cfm?plan=64297&ui=www_cert) - -抜粋すると、以下の通りです。 - -- 試験時間 : 100分 -- 問題数 : 85問 -- 合格点 : 300点 -- 対象のプロダクト : VMware NSX for vSphere v6 -- 試験費用 : $225 USD - -## まとめ - -とりあえず、これから受けるのでまとめてみましたが、以前のVCPの情報よりよくまとまっていて、資格試験としての体裁が整っている印象です。 -VMwareの人と話していても、資格試験としてまともなっていると聞くので、受ける価値がありそうです。 -(以前のVCPはちょっと・・・という感じの試験内容だった。) - -とりあえず、受けたらまた試験について書きます。 - -## 追記 -[VCP6-NV の試験勉強メモを書いた。](/blog/2016/07/05/2121.html) diff --git a/content/diary/2016/20160705_vmware_vcp_nv_study.md b/content/diary/2016/20160705_vmware_vcp_nv_study.md deleted file mode 100644 index 12ca4dcd..00000000 --- a/content/diary/2016/20160705_vmware_vcp_nv_study.md +++ /dev/null @@ -1,152 +0,0 @@ -Title: VCP6-NV 試験勉強メモ -Date: 2016-07-05 21:21 -Category: blog -Tags: VMware, NSX, VCP - -[TOC] - -## VCP6-NV 受験シリーズ - -+ [VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる]({filename}/diary/2016/20160705_vmware_vcp_nv.md) -+ [VCP6-NV 試験勉強メモ]({filename}/diary/2016/20160705_vmware_vcp_nv_study.md) -+ [VCP6-NV 試験勉強メモ 2日目]({filename}/diary/2016/20160705_vmware_vcp_nv_study_2.md) -+ [VCP6-NV 取得した]({filename}/diary/2016/20160705_vmware_vcp_nv_study_result.md) - -## 資料 - -### 最も公式っぽい資料 -* [VMware Certified Professional 6 – Network Virtualization Exam](https://mylearn.vmware.com/mgrReg/plan.cfm?plan=64297&ui=www_cert) の "How to Prepare" に書いているもの。 -* [Reference Design: VMware® NSX for vSphere (NSX) Network Virtualization Design Guide](https://www.vmware.com/files/pdf/products/nsx/vmw-nsx-network-virtualization-design-guide.pdf) -* [VCP6-NV (2V0-641) Practice Exam](http://mylearn.vmware.com/quiz.cfm?item=57466) - -### ブログ : シリーズものは一通り目を通した方が良い -* [ネットワーク仮想化をネットワークの基本から理解する 〜 第1回:理解するために必要なことを整理する](http://blogs.vmware.com/jp-cim/2015/03/nwv01.html) -* [NSX 6.2 新機能のご紹介 Part 1 〜 Cross vCenter NSX 〜](https://blogs.vmware.com/networkvirtualization/2015/12/2366.html?lang=ja#.V3ve2WiLSUk) - -## NSXの configuration maximums - -[vSphere 製品のように](https://www.vmware.com/pdf/vsphere6/r60/vsphere-60-configuration-maximums.pdf) 公開されているわけではない。 -でも、以下のサイトのように、情報を公開している人はいる。 - -* [NSX-V 6.1 Configuration Maximums](https://d-fens.ch/2015/02/16/nsx-v-6-1-configuration-maximums/) -* [VMware NSX-v Configuration Maximums](https://www.vmguru.com/2015/03/vmware-nsx-v-configuration-maximums/) - -会社でNSX使っている人は、VMwareの人に言えば上限値資料もらえると思うけど、会社外で確認したいときに、便利。 -運用・開発を考える場合でも、上限値系は何も見ずに言えることが望ましいと思う。 -おおざっぱな各上限値のオーダーは頭に入れておきたいところ...なんだけど、NSX 6.1と6.2で数値が違うところがあるんだよなぁ。 - -## VCP6-NV (2V0-641) Practice Exam の問題抜粋 - -* 上限値系 - + Q. "What is the maximum number of VNIs that can be used in a vSphere environment?" - * 10,000 - * これは、NSXの制限というよりは、 vCenterの制限かもしれない※要確認 - * VNIを1つ使うごとにポートグループを作ってしまう。現状のvSphere 6.0では、 10,000 portgroup/vC なので、これ以上作成できることに意味がない、ということと覚えている - + Q. "How many DHCP pools can be created on the NSX Edge?" - * 20,000 - * 覚えるしかない? - * "NSX DHCP service can provide configuration of IP pools, gateways, DNS servers, and search domains." - + Q. "What is the maximum number of audit logs retained by the NSX Manager?" - * 1,000,000 - * 覚えるしかない -* デプロイメント -+ Q. "What is the minimum vSphere configuration needed to deploy NSX?" - * A cluster of ESXi hosts managed by vCenter Server -+ Q. "What is the minimum vSphere 6.0 license edition required to deploy NSX?" - * 今は、any vSphere edition で動作する。Enterprise plus が必要だったのは昔の話。 - * 「いやいや、vDS必要でしょ」と思うかもしれないですが、そのあたりは、 [VMware NSXには、vSphere Enterprise Plusが必要?それは過去の話です。](http://infratraining.blogspot.jp/2015/07/vmware-nsxenterprise-plus.html) に書かれています。 -+ Q. "Which two components are valid minimum prerequisites for installing NSX in a vSphere environment? (Choose two.)" - * VMware vCenter Server 5.5 or later - * VMware Tools 8.6 or later - * ESXi 5.0 or later -+ Q. "What is the packet size of the VXLAN standard test packet when using the Ping test on the logical switches?" - * 1,550 - * VXLAN 分のオーバーヘッドは 50 byteなので。 - - -### 良く意味がわかっていない - -+ Q. "What is the minimum number of vSphere Standard Switches (vSS) that must be configured before deploying VMware NSX for vSphere?" - * 選択肢は、0, 1, 2, 3 のどれかで、正解は0。 - * 解説は、 "NSX includes logical switches. The NSX logical switch creates logical broadcast domains or segments to which an application or tenant virtual machine can be logically wired." となっていた。 - * いまいち問題の趣旨がわかっていない。答えるとしたら 0だけど、解説を読む限りは、「NSX自体をデプロイするのにportgroupが必要になるけど、それはvDSで作れば良い」とかそういう話ではないっぽい。 - -## NSX の概要おさらい - -おさらいなので、一度でもNSXについて理解したことのある人向け。 - -### NSX のアーキテクチャ - -* Management plane - * NSX Manager -* Control plane - * NSX Controller - * 論理ルータコントロール VM -* Data plane - * ESXi カーネルモジュール - * 論理スイッチ - * 分散ルータ - * 分散FW - * Edge - -### NSX のコントローラ - -* コントローラは必ず3つデプロイする。 -* コントロールプレーンとして、4つのテーブルを持つ - * ARP - * MAC - * VTEP - * ルーティング -* コントローラとESXiホストのカーネルモジュールは、分散FWを除いて、netcpaというUWAを通じて通信する。(VXLAN, 論理ルータなど。) - * UWAはカーネルモジュールと通信してよしなにする。 - * 分散FWは、直接カーネルモジュールがvsfwdを通じて、NSX Managerと通信する。 -* コントローラは、Paxos ベースのアルゴリズムで分散処理している - * マスターを選出 - * VXLAN, 論理ルータのそれぞれに対して、スライスを作成し、各コントローラに割り当てて処理させる - * コントローラの追加・削除時には再度スライスの分散が行われる - -## NSX の VXLAN - -### プロトコル概要 -* VXLAN は 24bitのIDを持っていて、VNI という。(つまり、 1677万以上ある) -* VXLAN のオーバーヘッドは、 50byte分ある - + MTUは少なくとも 1550byteである必要がある - + IPv6 のことも考えると、推奨は、1600byte以上らしい - + ジャンボフレームを設定すれば間違いない -* カプセル化後のパケットは、 4789/UDP -* VNI のうち、1NSXでは、10,000までしか利用できない -* VNI のうち、5,000からしか利用できない -* 論理スイッチを作成するとき、レプリケーションモード(マルチキャストモード、ハイブリッドモード、ユニキャストモード)を選択する。それにより、BUMトラフィックのパケットフローが大きく変更される。 - * BUMトラフィックとは、 ブロードキャスト、不明なユニキャスト、マルチキャストのトラフィックのこと - -### トランスポートゾーン - -* トランスポートゾーンは、VNI用の境界になる - * Layer 3/VXLAN ネットワークの境界になるという意味 -* VXLANオーバーレイのメンバーまたは、VTEPを定義している。 - * 異なるvSphereクラスタのESXiホストを含めることができる - * 1個のクラスタを複数のトランスポートゾーンに含めることもできる - -### VTEP,MTEP,UTEP - -* VTEP - * VXLAN のカプセル化、またはカプセル化の解除を行うエンドポイント - * vSphereでは、vDS上の VMkernelポートでカプセル化される - * NSXと連携可能な H/W VTEP も世の中には存在する予定 -* VTEPプロキシ : リモートセグメントにある別のVTEPから受け取ったVXLANトラフィックをローカルセグメントに転送するVTEP。MTEP,UTEPがある。 - -### レプリケーションモード - -* それぞれの場合のBUMトラフィックの図が以下のサイトにある - * [VXLAN simplified - what, why and how ?](http://ccietrip.blogspot.jp/2015/11/vxlan-simply-what-why-and-how.html) -* マルチキャストモード - * Layer 2でIGMPが有効化されていて、かつ、Layer 3でマルチキャストルーティングが必要 - * ローカルもリモートのどちらのトラフィックもマルチキャストのパケットを投げる -* ハイブリッドモード - * Layer 2でIGMPが有効化されている必要 - * ローカルではマルチキャストで投げ、リモートにはMTEPへユニキャストパケットを投げる - * MTEPは受け取ったパケットをローカルセグメントへマルチキャストとして投げる -* ユニキャストモード - * 特に制限はない - * ローカルもユニキャストで投げ、リモートにはUTEPにユニキャストパケットを投げる - * UTEPは受け取ったパケットをローカルセグメントへユニキャストとして投げる diff --git a/content/diary/2016/20160705_vmware_vcp_nv_study_2.md b/content/diary/2016/20160705_vmware_vcp_nv_study_2.md deleted file mode 100644 index dfdf3a96..00000000 --- a/content/diary/2016/20160705_vmware_vcp_nv_study_2.md +++ /dev/null @@ -1,73 +0,0 @@ -Title: VCP6-NV 試験勉強メモ 2日目 -Date: 2016-07-07 07:42:46 -Category: blog -Tags: VMware, NSX, VCP - -[TOC] - -## VCP6-NV 受験シリーズ - -+ [VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる]({filename}/diary/2016/20160705_vmware_vcp_nv.md) -+ [VCP6-NV 試験勉強メモ]({filename}/diary/2016/20160705_vmware_vcp_nv_study.md) -+ [VCP6-NV 試験勉強メモ 2日目]({filename}/diary/2016/20160705_vmware_vcp_nv_study_2.md) -+ [VCP6-NV 取得した]({filename}/diary/2016/20160705_vmware_vcp_nv_study_result.md) - -## 資料 -- [ネットワーク仮想化をネットワークの基本から理解する 〜 第1回:理解するために必要なことを整理する](http://blogs.vmware.com/jp-cim/2015/03/nwv01.html) -- [NSX 6.2 新機能のご紹介 Part 1 〜 Cross vCenter NSX 〜](https://blogs.vmware.com/networkvirtualization/2015/12/2366.html?lang=ja#.V3ve2WiLSUk) - -## NSX におけるVXLAN - -### 関係する要素 -- 論理スイッチ -- 分散論理ルータ -- 論理ルータコントロール VM -- Edge - -### 分散論理ルータ -カーネルモジュール内で動作するルーター。 -各ESXiに分散して存在していて、ヘアピントラフィックを防ぐことができる。 - -分散論理ルータのインターフェースは、LIF(論理インターフェース)と呼ばれる。 - -- LIF - - IPアドレスが割り当てられる - - ARPテーブルはLIFごとに持つ -- vMAC - - LIFが分散スイッチにささっている時のMAC - - 物理スイッチに保存されることはない - - VXLAN LIF の時のMACアドレス - - VLAN LIFと違い、代表インスタンスなどは不要 - - 1つの論理スイッチに接続できるVXLAN LIFは1つ - - トランスポートゾーン全体のDVSに広げることができる -- pMAC - - LIFがポートグループにささっている時のMAC - - 物理スイッチに保存される - - VLAN LIF の時のMACアドレス - - VLAN LIF は1台のDVSにのみ所属できる - - VLAN LIF は代表インスタンスを1つ持ち、ARP要求はその代表インスタンスが処理する - - 疑問: ARP要求は代表インスタンスが答えるが、実際には全てのホストで同じpMACを持っていて、その後のトラフィックは各ホストで処理するということで良いのか? - - 代表インスタンスの選定は、NSX Controllerが行う - -### 制御プレーンについて - -分散論理ルータの制御プレーンは、以下の2つある。 - -- インスタンスごとに作られる、論理ルータコントロール仮想マシン - - Active/Standby 構成にもできる - - ダイナミックルーティング(OSPF, BGP)を処理する - - つまり、隣接ノードから見ると、VLAN LIFとは異なるIPとセッションをはることになる - - 処理したルーティング情報をNSX Controllerへ送る -- NSX Controller - - ルーティング情報を分散ルータへ(つまり対象のすべてのESXiへ)プッシュする - -## L2 ブリッジ - -VXLAN と VLAN の L2ブリッジのみがサポートされる。 -アップリンクをDVSに割り当てておけば、物理機器とVXLANをつなぐような用途で利用できる。 - -L2 ブリッジには分散ルータが必要で、論理ルータコントロール仮想マシンが載っているホストが、ブリッジインスタンスとして、実際のブリッジを行う。つまり、1ホストのラインレートが上限になる。 -スループットを向上させるには、1つのブリッジに対しては1つの分散ルータを作成するようにすることが良い。 - -分散ルーティングと論理スイッチ上のブリッジは同時に有効にできない。 - diff --git a/content/diary/2016/20160705_vmware_vcp_nv_study_result.md b/content/diary/2016/20160705_vmware_vcp_nv_study_result.md deleted file mode 100644 index d6232233..00000000 --- a/content/diary/2016/20160705_vmware_vcp_nv_study_result.md +++ /dev/null @@ -1,43 +0,0 @@ -Title: VCP6-NV 取得した -Date: 2016-07-09 12:32 -Category: blog -Tags: VMware, NSX, VCP - -[TOC] - -## VCP6-NV 受験シリーズ - -+ [VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる]({filename}/diary/2016/20160705_vmware_vcp_nv.md) -+ [VCP6-NV 試験勉強メモ]({filename}/diary/2016/20160705_vmware_vcp_nv_study.md) -+ [VCP6-NV 試験勉強メモ 2日目]({filename}/diary/2016/20160705_vmware_vcp_nv_study_2.md) -+ [VCP6-NV 取得した]({filename}/diary/2016/20160705_vmware_vcp_nv_study_result.md) - -## 結果 - -462 / 500 (合格点: 300) - -## 試験の内容について - -割と事前に学習した内容が出ていたと感じる。 -VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読み返すだけでも、かなり点は取れる気がする。 - -## もっと学習しておくべきだったこと - -* VCNSからのアップグレード条件 - * 3問くらい出てた気がする -* アクティビティモニタリング - * 一般的な使い方を調べておけば良さそう -* トラブルシューティングの方法 - * 特にフローキャプチャについて -* QoS の知識 - * QoSの仕組み - * 物理機器との連携について -* 動的ルーティングプロトコル - * プロトコル自体の一般的な事柄 - -一応、vRealize についての問題も出ていたが、使うつもりがないので、学習しない。 - -## 感想 - -3日間くらいでVCP-NVを学習したけど、普段使っていない機能について振り返りつつ、「こんな感じで導入すれば上手くいきそう、と思ったけど上限にぶち当たるなー」とか考えながらできるので良い。 -やっぱり日常的に使っているプロダクトのベンダー試験は、そこそこの勉強で合格できるようになっているみたいだし、本番である程度運用に慣れてきたら、一度こういう試験を受けるのはアリだと思う。 diff --git a/content/diary/2016/20160710_github_gpg.md b/content/diary/2016/20160710_github_gpg.md deleted file mode 100644 index 2e25ceb7..00000000 --- a/content/diary/2016/20160710_github_gpg.md +++ /dev/null @@ -1,48 +0,0 @@ -Title: GnuPG 2.xでgit commitに署名をしようとするとエラーが出るメモ -Date: 2016-07-10 01:46 -Category: blog -Tags: git, gpg -Status: draft - -[TOC] - -## 参考 - -* http://www.zsh.org/mla/users/2015/msg01173.html - -## エラー内容 - -``` -$ git commit -m "commit" -gpg: signing failed: Inappropriate ioctl for device -gpg: signing failed: Inappropriate ioctl for device -error: gpg failed to sign the data -fatal: failed to write commit object -``` - -## 対処 - -`GPG_TTY=$(tty)` として、ttyを指定すれば良いらしい。 -どうも、署名をするときのパスフレーズを入力する画面を表示しようとしてエラーが出ているように見える。 - -## 余談 - -.gitconfig をgitで管理しているので、マシンに依存する設定を分割している。 -今のところは鍵もわけることにしている。 - -.gitconifg -``` -[include] -path=.gitconfig.local -... -``` - -.gitconfig.local -``` -[user] -signingkey = (鍵ID) -[commit] -gpgsign = true -[gpg] -program = gpg2 -``` diff --git a/content/diary/2016/20160710_own_debian_repository.md b/content/diary/2016/20160710_own_debian_repository.md deleted file mode 100644 index 9f873b68..00000000 --- a/content/diary/2016/20160710_own_debian_repository.md +++ /dev/null @@ -1,145 +0,0 @@ -Title: s3で自前 Debian Package リポジトリを作る -Date: 2016-07-10 03:44 -Category: blog -Tags: debian, apt, s3 - -[TOC] - -## この記事でやること - -* aptly の初歩的な使い方 -* aptly を使ってs3へ自前リポジトリを公開する。 - -自前パッケージの作成については、書かないです。 - - -## 自前 Debian Package リポジトリ - -なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。 - -* カジュアルにパッチを当てて、サーバに適用したい -* 必要なパッケージをフリーズしたいが全てのサーバーで Pin するのは面倒、などの理由で自分でバージョンをコントロールしたい -* 公式パッケージがない場合に、ビルド済みのものをインストールする形式にしたい - -ただし、リポジトリの構成を調べたり、一度手で作ってみるとわかるが、更新がとっても大変です。 -そのため、`aptly` や `reprepro` といったリポジトリを管理するためのツールがあります。 - -## aptly - -![aptly](/images/2016/aptly/aptly_log.png) - -リポジトリ管理を行うツールで、かなりリポジトリ管理のフローを考慮されたツールになっています。 -全く新しくリポジトリを作る場合や、リポジトリのミラーをしたりできます。 -特に個人的に便利に使えそうだと思っているのは、スナップショットの機能で、複数のリポジトリからスナップショットを作成できます。 -スナップショットを作成して、s3(やs3互換ストレージ)やswiftへアップロードすることができます。 - -注意点として、リポジトリのミラーをする場合、現状、自分のGPG keyになってしまうようで、ミラーのためにこのツールを使うのは難しいです。ミラーをしたいだけであれば、 rsync した方が良いです。 -リポジトリのミラーを resign なしで作成できるようにする機能は作成途中のようです。 - -また、今回はs3にアップロードする前提ですが、aptly自体は、自前サーバーで公開するためにも利用可能になっています。 -その場合にもほとんど同じフローでできます。 - - -## インストール - -`sudo apt-get install aptly` すれば良いです。 - -## 自前のパッケージを含むリポジトリをs3へアップロードする手順 - -### 事前作業 - -GPG keyの作成が必要です。 - -``` -gpg --gen-key -``` - -### アップロードするリポジトリの作成 - -まずは、空のリポジトリを作成します - -``` -aptly repo create -distribution=wheezy -component=main -``` - -次に、パッケージをリポジトリに追加します - -``` -aptly repo add -``` - -現状、どんなパッケージが追加されているかは、 `aptly repo show -with-packages ` で確認できます。 - -### スナップショットの作成 - -さて、必要なパッケージ追加でき、リポジトリをアップロードする準備ができたら、スナップショットを取得しておきます。 -最低限、publishする単位ごとにスナップショットを取っておけば良いと思います。 -アップロードするのも、このスナップショットをもとに行います。 - -``` -aptly snapshot create from repo -``` - -スナップショットの一覧は、 `aptly snapshot list` です。 `aptly snapshot show -with-packages ` とすれば各スナップショットの詳細を確認できます。 - -スナップショット名としては、サービスのバージョンと連携してパッケージをpublishするのであれば、そのバージョンをsuffixにつけるのが良いと思います。通常の運用時には、タイムスタンプをsuffixにつけましょう。 - -### aptlyのs3設定 - - -事前にs3のアクセスキーなどを取得している前提です。 -以下のように環境変数に設定します。(後述する、 aptly.confに書くこともできます) - -``` -export AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXX" -export AWS_ACCESS_KEY_ID="YYYYYYYYYYYYYYYYYYYY" -``` - -次に、 `~/.aptly.conf` にバケットの情報を書きます。 - -``` -{ - "rootDir": "/home/hitsu/.aptly", - "downloadConcurrency": 4, - "downloadSpeedLimit": 0, - "architectures": [], - "dependencyFollowSuggests": false, - "dependencyFollowRecommends": false, - "dependencyFollowAllVariants": false, - "dependencyFollowSource": false, - "gpgDisableSign": false, - "gpgDisableVerify": false, - "downloadSourcePackages": false, - "ppaDistributorID": "ubuntu", - "ppaCodename": "", - "skipContentsPublishing": false, - "S3PublishEndpoints": {}, - "SwiftPublishEndpoints": {}, - "S3PublishEndpoints":{ - "" : { - "region": "ap-northeast-1", - "bucket": "<バケット名>", - "prefix": "debian", - "acl": "public-read" - } - } -} -``` - -### スナップショットのアップロード - -スナップショットをpublishします。 -このコマンドを打つと、s3へ自動でアップロードしてくれます。 -s3のWebサイトのホスティングを設定していれば、これでパッケージを公開できたことになります。 - -``` -aptly publish snapshot s3:: -``` - -### リポジトリの更新について - -基本的には、`aptly repo add` → `aptly snapshot create` で良いのですが、アップロードについては、注意が必要です。 - -``` -aptly publish switch s3:: -``` diff --git a/content/diary/2016/20160711_build_own_debian_package.md b/content/diary/2016/20160711_build_own_debian_package.md deleted file mode 100644 index 8e0e97cc..00000000 --- a/content/diary/2016/20160711_build_own_debian_package.md +++ /dev/null @@ -1,46 +0,0 @@ -Title: もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ -Date: 2016-07-11 04:28 -Category: blog -Tags: debian, deb, package, apt - -[TOC] - -## はじめに - -debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。 - -## サンプル - -https://github.com/hitsumabushi/hub - -## 手順 - -```sh -# install -sudo apt install fakeroot - -# tag, release をきれいにする -git tag -l > tag_list -for x in $(cat tag_list); do git push origin :$x ; done - -# 色々リポジトリを整理した後、空っぽの masterを作る -git checkout --orphan master - -# 自前で control, copyright ファイルを書く -# アップストリームのものを持ってくる -# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian -fakeroot dpkg-deb --build pkg tmp - -# 生成された deb ファイルの中身を確認し、install してみる -ar x -# ... check files -sudo dpkg -i -# ... check installation -# dpkg -s -# dpkg -L - -# 問題がなければ -git commit -a -git push origin master -``` - diff --git a/content/diary/2016/20160712_gnupg2.md b/content/diary/2016/20160712_gnupg2.md deleted file mode 100644 index 2aed0e2c..00000000 --- a/content/diary/2016/20160712_gnupg2.md +++ /dev/null @@ -1,127 +0,0 @@ -Title: GnuPGのメモ @ Debian Sid -Date: 2016-07-12 07:42 -Category: blog -Tags: gpg, debian - -[TOC] - -## Debain での GnuPG - -GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。 -Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。 -普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。 -以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思ったら、gpg2 を使うしかありません。 - -## PGP での鍵の使われ方 - -ざっくり言うと、暗号化と署名の場合に鍵を利用することがあると思います。 -説明の都合で、ファイルをAさんからBさんへ送るというシチュエーションで考えてみます。 -(AさんとBさんが同一人物でも同じです) - -* ファイルを暗号化して送信 - * Aさんは暗号化をするとき、Bさんの公開鍵を利用します - * Bさんは復号するとき、 Bさんの暗号鍵を利用します -* ファイルに署名して送信 - * Aさんは署名するとき、Aさんの秘密鍵を利用します - * Bさんは署名を検証するとき、 Aさんの公開鍵を利用します - -### 鍵の管理体系について - -上述の通り、暗号化と署名時に鍵を利用することができますが、事前に公開鍵を配布しておく必要があります。 -このために、公開鍵サーバーを利用することができます。 - -公開鍵をここにアップロードしておき、公開鍵を利用したいユーザーは、鍵ID (16進8桁) を指定するかユーザー情報("名前 <メールアドレス>")の一部を指定して、鍵を受け取ることができます。 -ただ、ユーザー情報から、鍵を検索・受け取ることはできるのですが、第3者が同じ情報を使って別の鍵を登録することもできてしまいます。 -もし、間違って、別の鍵でファイルを暗号化してしまうと、相手は復号できないだけでなく、別の人が復号できていまいます。 - -そういった事態を極力防ぐために、フィンガープリントを確認することが必要になります。 -(鍵ID, ユーザー情報, フィンガープリントの3つを重複させることはめったにできない、という前提です。) -秘密鍵を生成した人は、鍵ID, ユーザー情報のほか、フィンガープリントを提供しておき、公開鍵を利用する人は、公開鍵を受け取ったときにフィンガープリントを確認してから、利用するという手順です。 - -鍵の有効性を確認するための別の考え方として、 web of trust という考え方があり、 [What is not WoT? (In Japanese: WoT とはなんでないか)](http://www.gniibe.org/memo/software/gpg/what-is-not-wot.html) に詳しく載っています。 - -## gpg2の使い方 - -### 鍵の生成 - -```sh -gpg2 --full-gen-key -``` - -### 鍵の失効 - -```sh -# まず失効用の証明書を作成しておく -# 厳重に保管しておく必要がある -gpg2 -o revoke.asc --gen-revoke - -# ... 失効したくなったら -gpg2 --import revoke.asc -``` - -### 公開鍵サーバーの利用 - -アップロード -```sh -gpg2 --send-key -``` - -ダウンロード -```sh -# 検索 -gpg2 --search-keys (|) - -# インポート -gpg2 --recv-keys -``` - -### 鍵を信用する - -``` -gpg2 --edit-key - gpg> trust - ... - gpg> (適切に 1-5 のどれかを選択) - gpg> q -gpg2 --update-trustdb -``` - -### 公開鍵のフィンガープリント - -``` -gpg2 --fingerprint -``` - -### ファイルの暗号化 - -```sh -gpg2 -e -r plain.txt -# 同時署名をする場合 -gpg2 -se -r plain.txt -``` - -### ファイルの復号 - -```sh -gpg2 plain.txt.gpg -``` - -### ファイルの署名 - -```sh -gpg2 -sa plain.txt -``` - -### ファイルの署名の検証 - -```sh -gpg2 -d plain.txt.asc -``` - -## 資料 - -* [GNU Privacy Guard講座 トップ](http://gnupg.hclippr.com/main/) -* [GnuPG で遊ぶ - 暗号化してみる](http://blog.eiel.info/blog/2013/07/31/gpg/) -* [盗難/紛失に備えるGPG鍵の作り方](http://andenkoko.blogspot.jp/2013/09/gpg.html) -* [What is not WoT? (In Japanese: WoT とはなんでないか)](http://www.gniibe.org/memo/software/gpg/what-is-not-wot.html) - diff --git a/content/diary/2016/20160909_windows_sysprep.md b/content/diary/2016/20160909_windows_sysprep.md deleted file mode 100644 index b390c91f..00000000 --- a/content/diary/2016/20160909_windows_sysprep.md +++ /dev/null @@ -1,23 +0,0 @@ -Title: Windowsのsysprepが正常に完了しないときに調べること -Date: 2016-09-09 14:29 -Category: blog -Tags: sysprep, windows -Status: draft - -[TOC] - -## 経緯 - -windows 7 でsysprepが正常に完了しなかった。 -具体的には、unattended.xmlがあるのに、 キーボードやライセンスの設定が表示されていた。 -何が起こっているのか、ログを見たい。 - -## sysprepのログの場所 - -* generalize : `C:\Windows\System32\sysprep\Panther` -* specialize : `C:\Windows\Panther` -* Unattended : `C:\Windows\Panther\UnattendGC` - -## ログファイル - -* `setupact.log` diff --git a/content/diary/2016/20160920_docker_swarm_init.md b/content/diary/2016/20160920_docker_swarm_init.md deleted file mode 100644 index 023f0f86..00000000 --- a/content/diary/2016/20160920_docker_swarm_init.md +++ /dev/null @@ -1,104 +0,0 @@ -Title: docker swarm init on Debian Sid -Date: 2016-09-20 15:07 -Category: blog -Tags: docker, debian -Status: draft - -[TOC] - -## 内容 -Debian Sid (2016/09/20 時点)で、 Docker Engine の swarm mode を初期設定したメモ。 - -## 手順 - -### docker engine の設定 - -[Installation on Debian](https://docs.docker.com/engine/installation/linux/debian/#/debian-wheezy-stable-7-x-64-bit) - -``` -sudo apt-get purge -y "lxc-docker*" -sudo apt-get purge -y "docker.io*" -sudo apt-get update -y -sudo apt-get install -y apt-transport-https ca-certificates -sudo apt-key adv --keyserver p80.pool.sks-keyservers.net --recv-keys 58118E89F3A912897C070ADBF76221572C52609D -echo "deb https://apt.dockerproject.org/repo debian-stretch main" | sudo tee /etc/apt/sources.list.d/docker.list -sudo apt-get update -y -sudo apt-get install -y docker-engine -``` - -### swarm 初期化 - -``` -# Manager -$ sudo docker swarm init --advertise-addr 192.168.253.158 -Swarm initialized: current node (92c34zr76hdav65q97pybnii6) is now a manager. - -To add a worker to this swarm, run the following command: - - docker swarm join \ - --token SWMTKN-1-305k6qcpoghq89avwv0pu6dxj2e00utvno7hx7ctdp5no7meuu-737dwq5cmuab1p30hyx5rpd6t \ - 192.168.253.158:2377 - -To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. -$ sudo docker node ls -ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS -92c34zr76hdav65q97pybnii6 * workdebian Ready Active Leader -``` - -``` -# Add worker nodes to manager -$ sudo docker swarm join --token SWMTKN-1-305k6qcpoghq89avwv0pu6dxj2e00utvno7hx7ctdp5no7meuu-737dwq5cmuab1p30hyx5rpd6t 192.168.253.158:2377 -``` - -### swarm での動作 - -... - -## TIPS - -### systemd unit file の中で、 EnvironmetFile=- というのは一体なに? - -[Custom Docker daemon options](https://docs.docker.com/engine/admin/systemd/) の例で、 `EnvironmetFile=-...` という形式の設定があった。これは一体なにか。 -``` -EnvironmentFile=-/etc/sysconfig/docker -EnvironmentFile=-/etc/sysconfig/docker-storage -EnvironmentFile=-/etc/sysconfig/docker-network -``` - -[systemd.unit(5)](https://www.freedesktop.org/software/systemd/man/systemd.unit.html)には書かれていない。 -`EnvironmetFile` を含むいくつかの設定は、 [systemd.exec(5)](https://www.freedesktop.org/software/systemd/man/systemd.exec.html) というのに書かれている。(exec となっているが、 configurationについてのもの) - -[EnvironmentFile=](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=) によると、 -``` - The argument passed should be an absolute filename or wildcard expression, optionally prefixed with "-", which indicates that if the file does not exist, it will not be read and no error or warning message is logged. This option may be specified more than once in which case all specified files are read. If the empty string is assigned to this option, the list of file to read is reset, all prior assignments have no effect. -``` -と書かれている。 - -### どうして、ExecStart が2行書かれているの? - -Dockerの unti fileを見ると、以下のように、`ExecStart=`が2つあり、1つは空、もう1つが実際に実行したいものを書いている、という設定を見ることになる。 -``` -ExecStart= -ExecStart=/usr/bin/dockerd ... -``` - -これは、こう書かないといけない、という類のものらしい。 -1つ目は設定を消すためのもので消していないと、複数回ExecStartが書かれているという内容のエラーが出る。 - -* [参考情報](https://github.com/docker/docker/issues/14491) - -### tar.gz をダウンロードして、どこかのディレクトリに展開する - -下記のように、curl でダウンロードしたものを標準出力に出して、それを tar で受けるのが、docker iamgeを小さく保つのには良さそう -``` -RUN curl -sL "https://github.com/.../archive/${VERSION}.tar.gz" | tar -xzC "${APACHE_WEBROOT_DIR}" --strip-components=1 -``` - -tar のオプションとして、 `-C` でディレクトリを指定していて、 これだけだと、ディレクトリの下に、解凍時に(割と一般的に)作成されるトップのフォルダができてしまうので、 -`--strip-components=1` にして、トップのフォルダを無視する。 - -ちなみに、デバッグしたくなったら、以下のように `od` をすると便利そう。 -``` -RUN curl -sL "https://github.com/.../archive/${VERSION}.tar.gz" > /tmp/x && od -c /tmp/x | head -``` - diff --git a/content/diary/2016/20160927_dockerhub_hook.md b/content/diary/2016/20160927_dockerhub_hook.md deleted file mode 100644 index fd289751..00000000 --- a/content/diary/2016/20160927_dockerhub_hook.md +++ /dev/null @@ -1,56 +0,0 @@ -Title: DockerHub で docker build のオプションを設定したい -Date: 2016-09-27 14:45 -Category: blog -Tags: docker, dockerhub - -[TOC] - -## 参考リポジトリ -* https://github.com/hitsumabushi/docker-phpipam - -## 目的 -* Dockerfile の中で、 ARGを使いたい。 - * LABEL としてビルドした日付や、 VCSのリビジョンを入れたい - * ソフトウェアのバージョンをARGで指定したい - -## やること - -1. Dockerfile と同じ場所に、 `hook` ディレクトリを作成する。 -2. `hook` ディレクトリ以下に、 `build` というファイルを作成する。 - * `build` には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。 - * 自分で docker build ... というコマンドを書く - -## TIPS - -### Dockerfileを別の場所に置く場合 - -https://github.com/hitsumabushi/docker-phpipam では、 Dockerfile を、`/dockerimages/phpipam/` 以下に置いている。 -その場合であっても、 Dockerfileと同じディレクトリに、 `hook` ディレクトリを作成すれば良い。 -その上で、 DockerHub の Build Settings の Dockerfile Location にて、 `/dockerimages/phpipam/Dockerfile` とすれば良い。 - -注意点としては、実際にビルドされるとき、 `/dockerimages/phpipam/` 以下でビルドされることになるのだけど、 -上位(例えば、リポジトリルート) のファイルなどはビルド中アクセスできない。 -もし必要なファイルがあるのであれば、Dockerfileと同じか、そのサブディレクトリに置く必要がある。 - -### build 中の環境変数の参考 -printenvなどすればわかる。 -色々便利な環境変数がセットされていて、例えば、以下のようなものが便利そう。 - -* `GIT_SHA1` : revision の sha-1 ハッシュ -* `GIT_MSG` : commit メッセージ -* `SOURCE_BRANCH` : git branch -* `DOCKER_REPO` : DockerHubで公開されるときのURL -* `DOCKER_TAG` : ビルドに成功したときに利用されるタグ (Build Settingsで設定できる。) -* `IMAGE_NAME` : イメージ名 ( `index.docker.io/hitsumabushi/phpipam:latest` のようになる。) - -### Dockerfile のラベルについて - -Dockerfile には `LABEL` を追加することでメタ情報をつけておくことができる。 -フォーマットに関して指定はないが、以下のようなラベルをつけるのも良さそう。 - -http://label-schema.org/rc1/ - -### その他のhook -もし、build の前に何かやりたいなどあれば、 `pre_build` などのhookもある。 -その他の hook については、 [thibaultdelor/testAutobuildHooks](https://github.com/thibaultdelor/testAutobuildHooks) が参考になる。 - diff --git a/content/diary/2016/20161005_ansible_test_kitchen.md b/content/diary/2016/20161005_ansible_test_kitchen.md deleted file mode 100644 index 59c1e747..00000000 --- a/content/diary/2016/20161005_ansible_test_kitchen.md +++ /dev/null @@ -1,15 +0,0 @@ -Title: test-kitchen のメモ -Date: 2016-10-05 00:28 -Category: blog -Tags: ansible, tdd, test-kitchen -Status: draft - -[TOC] - - -* [GETTING STARTED GUIDE](http://kitchen.ci/docs/getting-started/) -* [github.com/neillturner/kitchen-ansible](https://github.com/neillturner/kitchen-ansible) -* [github.com/test-kitchen/kitchen-docker](https://github.com/test-kitchen/kitchen-docker) -* [kitchen-dockerでコンテナ間を接続する](http://qiita.com/marcy-terui/items/92a67bd67a62978131fa) -* [JenkinsでTest-Kitchen複数台構成のCookbookをテストしたいが、ゴミは残したく無い時の実行シェル](http://qiita.com/marcy-terui/items/e711826e05492f711ea5) -* [TestKitchenとDocker・Serverspecで作るAnsibleTDD環境](https://tech-sketch.jp/2015/11/ansible_tdd.html) diff --git a/content/diary/2016/20161110_git_bisect.md b/content/diary/2016/20161110_git_bisect.md deleted file mode 100644 index 0ff71d23..00000000 --- a/content/diary/2016/20161110_git_bisect.md +++ /dev/null @@ -1,187 +0,0 @@ -Title: git bisect でバグ/仕様変更のコミットを探す -Date: 2016-11-10 03:52 -Category: blog -Tags: git, ansible - -[TOC] - -## まとめ -* git bisect が便利 -* ansible 2.1.0 -> 2.1.1 で group名に `/` を入れるとうまく動かないケースが存在する - - [ansible](https://github.com/ansible/ansible) リポジトリでbisect すると対象のコミットは `7287effb5ce241ce645d61e55e981edc73fa382a` - - group名には `/` を入れないように、 `group_vars` 以下はフラットな構成にしよう - -## 遭遇した問題 -ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、 -複数のリージョンやゾーンにまたがるシステムのため、うまく設定を見やすくするために、 -以下のように `group_vars` 配下にディレクトリ構造を作っていた。 - -### 再現環境 - -#### ディレクトリ構成 -用途やrole, ノードの場所などで、グルーピングして、`group_vars` 以下のディレクトリを作成する。 - -``` -. -├── group_vars -│   ├── env -│   │   ├── production -│   │   └── staging -│   │   ├── app.yml -│   │   (└── vault-pass.yml ※今回は関係ないが暗号化したい情報。ansible-vault で作成。) -│   ├── region -│   │   └── region-1.yml -│   ├── role -│   │   └── web.yml -│   └── zone -│   └── zone-1.yml -├── inventories -│   └── sample.ini -├── library -├── roles -└── site.yml -``` - -#### group\_vars - -``` -$ cat env/staging/app.yml ---- - -app_name: "sample_app_name" -``` - -#### inventory -各ノードの状況に応じて、`env/staging` や `region/region-1` などにノードを所属させていた。 - -``` -$ cat inventories/sample.ini -[env/staging] -app_server-1 -db_server-1 - -[region/region-1:children] -zone/zone-1 - -[zone/zone-1] -app_server-1 -db_server-1 - -[role/web] -app_server-1 - -[app] -app_server-1 ansible_host=localhost - -[db] -db_server-1 ansible_host=example.com -``` - -#### playbook -``` -$ cat site.yml ---- - -- hosts: app - gather_facts: no - tasks: - - debug: msg="{{ app_name }}" -``` - -### 問題の再現 -ansible `2.1.0.0` だと `app_name` を参照できている。 - -``` -$ ansible --version -ansible 2.1.0.0 -... -$ ansible-playbook -i inventories/sample.ini site.yml - -PLAY [app] ********************************************************************* - -TASK [debug] ******************************************************************* -ok: [app_server-1] => { - "msg": "sample_app_name" - } -... -``` - -ansible `2.1.1.0` だと `app_name` を参照できず、未定義になっている。 -``` -$ ansible --version -ansible 2.1.1.0 -... -$ ansible-playbook -i inventories/sample.ini site.yml - -PLAY [app] ********************************************************************* - -TASK [debug] ******************************************************************* -fatal: [app_server-1]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'app_name' is undefined\n\nThe error appears to have been in '/home/hitsu/tmp/blog/site.yml': line 6, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - debug: msg=\"{{ app_name }}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"} - -... -``` - -## コミット履歴の調査 -コードを読むと[この辺](https://github.com/ansible/ansible/blob/devel/lib/ansible/inventory/__init__.py#L797)が怪しいというのはわかるが、コードを順番に読んでいくと時間がかかるので、調査する範囲を絞りたい。 -そこで、どのコミットまで正しく動作していて、どのコミットから挙動が変わっているのかを知りたい。 -最初、手作業で二分探索していたが、Twitterで mapk0yさんに`git bisect` を教えてもらった。 - - - - -## git bisect での調査 -### リポジトリのクローン -```shell -git clone https://github.com/ansible/ansible.git -``` -### テストスクリプトの準備 -```shell -$ cd ansible -$ cat check.sh -#!/bin/sh - -PATH_TO_PLAYBOOK="${HOME}/tmp/sample" -PATH_TO_ANSIBLE="${HOME}/tmp/ansible" - -cd "${PATH_TO_ANSIBLE}" -git submodule update --init --recursive -pip uninstall -y ansible; pip install "${PATH_TO_ANSIBLE}" -cd "${PATH_TO_PLAYBOOK}" -ansible-playbook -i inventories/sample.ini site.yml -``` - -### git bisect の実行(自動) -現在、すでに 2.1.0.0 と 2.1.1.0 の間で動作が変わっていることがわかっている。 -タグとしては、 `v2.1.0.0-1` と `v2.1.1.0-1` の間になる。 - -まずは、 2分探索をどの範囲で実施するか設定して、開始する。 -`git bisect start "壊れているコミット" "正しく動作しているコミット"` の順番で指定する。 -```shell -$ git bisect start v2.1.1.0-1 v2.1.0.0-1 -``` - -次に、各コミットに対して、 good/bad の判断を行うため、テストスクリプトを指定する。 -これで、自動的にテストスクリプトを実行して、2分探索を行ってくれる。 -あとは、結果が出るまで待てば良い。 -```shell -$ git bisect run ./check.sh -... -7287effb5ce241ce645d61e55e981edc73fa382a is the first bad commit -commit 7287effb5ce241ce645d61e55e981edc73fa382a -... -``` -これで、 commitが特定できた。あとは、内容の変更を精査すれば良い。 - -### 片付け -調査が終わったら、 `git bisect reset` して、終わってしまえば良い。 - ---- - -`git bisect` 便利!! - - -## 参考資料 -- [問題のあるコミットを特定する ( git bisect )](http://qiita.com/Shaula/items/1e13808946d8ca8bacbc) -- [github.com/ansible/ansible](https://github.com/ansible/ansible) -- [add\_host module in v2.1.1.0 does not follow paths with forward slash #16881](https://github.com/ansible/ansible/issues/16881) - diff --git a/content/diary/2016/20161121_vsphere_test.md b/content/diary/2016/20161121_vsphere_test.md deleted file mode 100644 index b05a5b85..00000000 --- a/content/diary/2016/20161121_vsphere_test.md +++ /dev/null @@ -1,35 +0,0 @@ -Title: VMware Product ごとのtest 方法について -Date: 2016-11-21 14:14 -Category: blog -Tags: VMware, test -Status: draft - -[TOC] - -## 参考にしたリポジトリ - -* https://github.com/vmware/pyvmomi -* https://github.com/vmware/govmomi -* https://github.com/vmware/vic - -## pyvmomi - -[vcrpy](https://pypi.python.org/pypi/vcrpy) を利用している。 -元々は、 [vcr](https://github.com/vcr/vcr) というruby製のツールだったもののpython版らしい。 -他の言語でも同様のツールはあって、例えば、Go だと [DVR](https://github.com/orchestrate-io/dvr) というのがある。 - -## govmomi - -`vcsim` を使っている。 -ただ、vcsim はvSphere 5.5 までしか対応しておらず、6.0以降のためのテストは難しい。 -このこと自体は割と前から Issue には挙がっているが、まだ対応はされていない。 -https://github.com/vmware/govmomi/issues/358 - -## vic - -自前でテスト用のオブジェクトを作っている。 -https://github.com/vmware/vic/tree/master/pkg/vsphere/simulator -vcsim の中で、これを -https://github.com/vmware/vic/blob/master/cmd/vcsim/main.go - - diff --git a/content/diary/2016/20161215_reflect_on_teaming_action.md b/content/diary/2016/20161215_reflect_on_teaming_action.md deleted file mode 100644 index 1f9065ff..00000000 --- a/content/diary/2016/20161215_reflect_on_teaming_action.md +++ /dev/null @@ -1,106 +0,0 @@ -Title: チーム活動で失敗したことの振り返り -Date: 2016-12-15 00:00 -Category: blog -Tags: teaming - -[TOC] - ---- - -これは、 [NIFTY Advent Calendar 2016](http://qiita.com/advent-calendar/2016/nifty) の15日目です。 - -[@plan0213](http://qiita.com/plan0213) さんの [『ネットワーク機器へのコマンド入力自動化』](http://qiita.com/plan0213/items/97374e6600bfaa25dd1d)でした。 -ネットワークインフラエンジニアが大好きな話でしたね。 - -## はじめに - -今日の記事ですが、私が社内でやっていたチーム活動について振り返りを書きます。 -特に、失敗した点に注目して共有することで役に立てばと思っています。 -大前提としては、私は一般社員であり、チームのマネジメント等を行う立場ではありません。 -あくまでボトムアップからの活動です。 - -## パダワン制度という取り組みについて - -1年~1年半前あたりに始めた取り組みです。基本的な制度設計は、期間を区切った徒弟制度になっています。 -徒弟制度といえば、[ペパボのブログで書かれていたもの](http://blog.kentarok.org/entry/2015/02/19/210316)もあったりしますが、 -パダワン制度は、トランザクティブ・メモリーの文脈で ["組織内で『誰が何を知っているか』を把握すること"](http://business.nikkeibp.co.jp/article/opinion/20130925/253852/) が大切だ言われているのを意識していました。 - -### 組織構造について - -
-
-
- -* 部全体では30~40人程度の時期 -* 各プロジェクトごとに、関係するチームの人がアサインされる - * 1チームからは1人か2人 -* タスクの進捗については、行われている - * 実際の活動内容は、同じプロジェクトにアサインされいてるか、同じプロジェクトに入っていないとわかりづらい - -### 当時の課題 - -* 新しいツールや仕組みを導入する人が偏っている - * 世の中の流れにキャッチアップできている人が限られている - * キャッチアップする人には常に最高速を出せる状態にあって欲しいが、質問が集中して負荷が高い -* 導入した後の手離れが悪い - * いつまで経っても、質問がその人に集中する -* ヨコ展開がない/少ない - * 導入済み環境で利用している人も、自分で導入しようとしていない - * そもそも新しい取り組みについて知らない - * 個人のスキルから組織のスキルにできていない - -### 試み - -当時、以下のような資料を作成して、パダワン制度を始めました。 - -![](/images/2016/advent-calendar/03.png) -![](/images/2016/advent-calendar/04.png) - -マスターがパダワンを教育する期間は、適当に区切っていました。 -教育期間の終わりに勉強会を部内向けに行い、その時点でパダワンは独り立ちする、としています。 -また、マスターがパダワンへ教育した後は、パダワンが他の人から質問を受けることにしていました。 -パダワンの選定については、マスターと異なるチームから選ぶことにしていました。 - -### 結果 - -* 無事に特定メンバーへの質問を減らすことができた - * とはいえ、あまり口うるさく言わない -* パダワンを『○○に詳しい人』と部内で認知させることができた - * 新しく使い始める人が、パダワンへ相談することができるようになった - -### 反省 - -まず、この活動ですが、現在は継続していません。 -それに関しては、以下のような理由があります。 - -* マスター/パダワンの負荷がとても大きい - * 自由活動としてやっていたため、既存業務と並行して行っていた - * きちんと業務として考慮されるように調整すべきだった -* マスター/パダワン選択の難しさ - * 業務に余裕のある人でないとできない - * 一通り聞いた後は、メンバーが聞きたいことが先立って、それほど詳しくない状態のトピックが挙がるようになった - * これ自体は良いことだけど、マスターが学習・習得・教育を一気に行うことになるので、落ち着きたい - * それほど深い話も聞けないので、あえて弟子を取る必要が無い - -また、成果物の扱いが曖昧になってしまった、という反省があります。 -これは会社の文化だと思います。 - -* 成果物の扱いが曖昧で、成果物が社内でしか閲覧できない - * 内容的には、社内に限定する意味はないので、社外公開したい - * 最終的には社外へ公開しましょう、というのを明示しておかないといけなかった - -一方で、個人的な思いとしては、一通り問題の大きい部分は解消できたという思いも半分あって、新しいマスターが生まれるような活動を進めたいなぁ、というのが最近の気持ちです。 -ただ、そのためには、組織構造や仕事の仕方を変えることも含めて考える必要があると思っていて、個人的に得意ではない『ご説明』をしないといけないのかなぁ、と考えている今日この頃です。 - -## 終わり - -良いチームで良い活動を行うことが、エンジニアにとってもサービスにとっても大事だと思っているので、 -今よりうまくチームとして活動することを常に目指していきたいです。 -貪欲に改善活動をしていきたい所存なので、上手くいった話ばかりではなくて、 -もっと失敗談とか、どういう準備をすべきだった、という振り返りが共有されると良いなぁ、と思います。 - ---- - -明日は、 [@qrac](http://qiita.com/qrac)さんの『リメイクUIコーディング』です。 -qracさんは、 [Yaku Han JPというWebフォント](https://qrac.github.io/yakuhanjp/)を作ったりするほど、デザインやUIガチ勢です。 -そんなqracさんのUIコーディングの話が読める、明日のAdvent Calendarはとても面白そうなので、ぜひ見てください。 diff --git a/content/diary/2016/config.txt b/content/diary/2016/config.txt deleted file mode 100644 index 60006921..00000000 --- a/content/diary/2016/config.txt +++ /dev/null @@ -1,140 +0,0 @@ -#10 1 65 0 -ip route default gateway pp 1 filter 500000 gateway dhcp lan2 -ip route 172.16.0.0/16 gateway tunnel 1 -ip keepalive 1 icmp-echo 10 5 dhcp lan2 -ipv6 prefix 1 ra-prefix@lan2::/64 -ip lan1 address 192.168.100.1/24 -ip lan1 secure filter in 100000 100001 100002 100003 100004 100005 100006 100007 100099 -vlan lan1/1 802.1q vid=101 name="Standard Network" -ip lan1/1 address 192.168.101.1/24 -ipv6 lan1/1 address ra-prefix@lan2::1/64 -ipv6 lan1/1 rtadv send 1 o_flag=on -ipv6 lan1/1 dhcp service server -vlan lan1/2 802.1q vid=102 name="IO Network" -ip lan1/2 address 192.168.102.1/24 -vlan lan1/3 802.1q vid=103 name="Management Network" -ip lan1/3 address 192.168.103.1/24 -vlan lan1/4 802.1q vid=104 name="Global Network" -ip lan1/4 address 192.168.104.1/24 -vlan lan1/5 802.1q vid=105 name="Private Network" -ip lan1/5 address 192.168.105.1/24 -ipv6 lan2 secure filter in 1010 1011 1012 2000 -ipv6 lan2 secure filter out 3000 dynamic 100 101 102 103 104 105 106 -ipv6 lan2 dhcp service client ir=on -pp disable all -pp select 1 - description pp PRV/PPPoE/0:NIFTY - pp keepalive interval 30 retry-interval=30 count=12 - pp always-on on - pppoe use lan2 - pppoe auto disconnect off - pp auth accept pap chap - pp auth myname - ppp lcp mru on 1454 - ppp ipcp ipaddress on - ppp ipcp msext on - ppp ccp type none - ip pp mtu 1454 - ip pp secure filter in 200002 200020 200021 200022 200023 200024 200025 200030 200032 200080 200081 200082 - ip pp secure filter out 200012 200020 200021 200022 200023 200024 200025 200026 200027 200099 dynamic 200080 200081 200082 200083 200084 200085 200098 200099 - ip pp nat descriptor 1 - netvolante-dns hostname host pp server=1 <ネットボランチDNS名> - pp enable 1 -no tunnel enable all -tunnel select 1 - ipsec tunnel 101 - ipsec sa policy 101 1 esp aes256-cbc sha-hmac - ipsec ike duration ipsec-sa 1 3600 - ipsec ike duration ike-sa 1 28800 - ipsec ike encryption 1 aes256-cbc - ipsec ike group 1 modp1024 - ipsec ike hash 1 sha - ipsec ike keepalive use 1 on dpd - ipsec ike local address 1 192.168.101.1 - ipsec ike pfs 1 on - ipsec ike pre-shared-key 1 text - ipsec ike remote address 1 <クラウド側VPNゲートウェイのグローバルIP> - tunnel enable 1 -ip filter 100000 reject * * udp,tcp 135 * -ip filter 100001 reject * * udp,tcp * 135 -ip filter 100002 reject * * udp,tcp netbios_ns-netbios_dgm * -ip filter 100003 reject * * udp,tcp * netbios_ns-netbios_dgm -ip filter 100004 reject * * udp,tcp netbios_ssn * -ip filter 100005 reject * * udp,tcp * netbios_ssn -ip filter 100006 reject * * udp,tcp 445 * -ip filter 100007 reject * * udp,tcp * 445 -ip filter 100099 pass * * * * * -ip filter 200000 reject 10.0.0.0/8 * * * * -ip filter 200001 reject 172.16.0.0/12 * * * * -ip filter 200002 reject 192.168.0.0/16 * * * * -ip filter 200010 reject * 10.0.0.0/8 * * * -ip filter 200011 reject * 172.16.0.0/12 * * * -ip filter 200012 reject * 192.168.0.0/16 * * * -ip filter 200020 reject * * udp,tcp 135 * -ip filter 200021 reject * * udp,tcp * 135 -ip filter 200022 reject * * udp,tcp netbios_ns-netbios_ssn * -ip filter 200023 reject * * udp,tcp * netbios_ns-netbios_ssn -ip filter 200024 reject * * udp,tcp 445 * -ip filter 200025 reject * * udp,tcp * 445 -ip filter 200026 restrict * * tcpfin * www,21,nntp -ip filter 200027 restrict * * tcprst * www,21,nntp -ip filter 200030 pass * 192.168.0.0/16 icmp * * -ip filter 200031 pass * 192.168.0.0/16 established * * -ip filter 200032 pass * 192.168.0.0/16 tcp * ident -ip filter 200033 pass * 192.168.0.0/16 tcp ftpdata * -ip filter 200034 pass * 192.168.0.0/16 tcp,udp * domain -ip filter 200035 pass * 192.168.0.0/16 udp domain * -ip filter 200036 pass * 192.168.0.0/16 udp * ntp -ip filter 200037 pass * 192.168.0.0/16 udp ntp * -ip filter 200080 pass * 192.168.100.1 udp * 500 -ip filter 200081 pass * 192.168.100.1 esp * * -ip filter 200082 pass * 192.168.100.1 udp * 4500 -ip filter 200099 pass * * * * * -ip filter 500000 restrict * * * * * -ip filter dynamic 200080 * * ftp -ip filter dynamic 200081 * * domain -ip filter dynamic 200082 * * www -ip filter dynamic 200083 * * smtp -ip filter dynamic 200084 * * pop3 -ip filter dynamic 200085 * * submission -ip filter dynamic 200098 * * tcp -ip filter dynamic 200099 * * udp -nat descriptor type 1 masquerade -nat descriptor masquerade static 1 1 192.168.101.1 udp 500 -nat descriptor masquerade static 1 2 192.168.101.1 udp 4500 -nat descriptor masquerade static 1 3 192.168.101.1 esp -ipsec auto refresh on -ipv6 filter 1010 pass * * icmp6 * * -ipv6 filter 1011 pass * * tcp * ident -ipv6 filter 1012 pass * * udp * 546 -ipv6 filter 2000 reject * * * * * -ipv6 filter 3000 pass * * * * * -ipv6 filter dynamic 100 * * ftp -ipv6 filter dynamic 101 * * domain -ipv6 filter dynamic 102 * * www -ipv6 filter dynamic 103 * * smtp -ipv6 filter dynamic 104 * * pop3 -ipv6 filter dynamic 105 * * tcp -ipv6 filter dynamic 106 * * udp -dhcp service server -dhcp server rfc2131 compliant except remain-silent -dhcp scope 1 192.168.100.31-192.168.100.200/24 gateway 192.168.100.1 -dhcp scope option 1 router=192.168.100.1 dns=192.168.100.1 ntp_server=192.168.100.1 -dhcp scope 101 192.168.101.31-192.168.101.200/24 -dhcp scope option 101 router=192.168.101.1 dns=192.168.101.1 ntp_server=192.168.101.1 -dhcp scope 102 192.168.102.31-192.168.102.200/24 gateway 192.168.102.1 -dhcp scope 104 192.168.104.31-192.168.104.200/24 gateway 192.168.104.1 -dhcp client hostname lan2 primary "YAMAHA RTX1200" -dns server pp 1 -dns server dhcp lan2 -dns private address spoof on -snmp sysname yamaha-rtx1200 -schedule at 1 */* 01:44:00 * ntpdate pool.ntp.org syslog -schedule at 2 */* 03:15:20 * copy config 0 usb1:/config.txt -external-memory config filename usb1:/config.txt,*:config.txt 0 -statistics cpu on -statistics memory on -statistics traffic on -statistics qos on -sntpd service on -sntpd host any diff --git a/content/diary/2017/20170130_docker_vlan.md b/content/diary/2017/20170130_docker_vlan.md deleted file mode 100644 index 4e8c171a..00000000 --- a/content/diary/2017/20170130_docker_vlan.md +++ /dev/null @@ -1,54 +0,0 @@ -Title: docker: メモ -Date: 2017-01-30 18:12 -Category: blog -Tags: docker -Status: draft - -[TOC] - -## Docker 検証 -### vmx -* 踏み台: nic 3本で検証 - * SSH用 - * VLAN=279 - * VLAN trunk - -### VLAN設定 -#### 資料 -https://wiki.archlinuxjp.org/index.php/VLAN - -#### やったこと -SSHでログインして以下を実行 -```sh -## module -sudo lsmod | grep 8021q -sudo modprobe --first-time 8021q -sudo lsmod | grep 8021q - -## valn device -sudo ip link add link eth2 name eth2.279 type vlan id 279 -sudo ip addr add 192.168.16.32/24 dev eth2.279 -ip a show eth2.279 -## 6: eth0.279@eth0: mtu 1500 qdisc noop state DOWN group default qlen 1000 -## link/ether 00:50:56:ba:1c:cd brd ff:ff:ff:ff:ff:ff -## inet 192.168.16.32/24 scope global eth0.279 -## valid_lft forever preferred_lft forever -sudo ip link set dev eth2 up -sudo ip link set dev eth2.279 up -``` - -片方のインターフェースからのpingが返ってこない... -* http://d.hatena.ne.jp/hirose31/20120822/1345626743 -* http://e-garakuta.net/techinfo/doku.php/linux/advanced-routing - -```sh -ip rule show -## 0: from all lookup local -## 32766: from all lookup main -## 32767: from all lookup default -sudo ip rule add from 192.168.16.31 table 200 prio 200 -sudo ip route add default dev eth1 src 192.168.16.31 table 200 -sudo ip rule add from 192.168.16.32 table 300 prio 300 -sudo ip route add default dev eth2.279 src 192.168.16.32 table 300 -``` - diff --git a/content/diary/2017/20170131_retire.md b/content/diary/2017/20170131_retire.md deleted file mode 100644 index 284eafb6..00000000 --- a/content/diary/2017/20170131_retire.md +++ /dev/null @@ -1,40 +0,0 @@ -Title: ニフティ株式会社を退職しました -Date: 2017-01-31 19:36 -Category: blog -Tags: - -[TOC] - -本日最終出社日でした。 - -## ニフティでやったこと - -ニフティでは、ニフティクラウドのIaaSを中心に仕事をしていました。 -基本的にずっと [@ysaotome](https://twitter.com/ysaotome) さんの下で働いており、 -チームメンバーも優秀だったので、とても面白い環境でした。 - -本来は仮想ネットワークチームという名前だったのですが、割と何でもやるチームで、 -自身がやっていた仕事も、仮想ファイアウォールやIPアドレスの払い出しに関する諸々、 -DRサービスやデスクトップサービスなど、色々なことをやらせてもらったと思います。 -技術/ツール的には、 vSphere関係のことについてはかなり詳しくなりましたし、 -ansible, python, golang, ...といったものを使いつつ、運用改善やサービス化のためのツールを書くことができました。 - -特に自分として印象に残っている仕事としては、DRサービスというサービスの課金情報を作るための仕組みを、golangで実装したことでしょうか。 -β版をリリースした段階で離れてしまったのですが、、 -[ここにも記載されている通り](http|//www.nifty.co.jp/cs/newsrelease/detail/150331004415/1.htm)、VMwareのプロダクトを利用していて、 -当時は『インフラ部分も大体作り方理解したし、さーて実装するかー』と製品仕様調査をしていたところ、 -展示会に間に合わせたいと言われ、2,3週間で一気に実装しきった記憶があります。 -課金に必要な情報を色々なイベントから取得すればできることがわかった後も、 -VMwareがどのように実装しているかわからないため、 -どの操作でどんなイベントが出て、どんなイベントが出たらどんなことが起こっているのか、ということをひたすら調べて実装していました。 -golangで(運用ツールではなくて、)プロダクション環境で動くコードを書いた最初の機会だったので、今も印象に残っています。 - -また退職日当日、[会社再編を行うことが発表され](http://pr.fujitsu.com/jp/news/2017/01/31.html)、 -会社の事業が売却されることについて、労働契約承継法という法律の存在を教えてもらうなどし、 -なかなか貴重な体験ができました。 - -## 明日から - -明日から次の会社で働く予定です。 -通勤経路がほとんど変わらないので、寝ぼけて前の会社に出社してしまいそうで怖いです。 - diff --git a/content/diary/2017/20170207_rust_hello_world.md b/content/diary/2017/20170207_rust_hello_world.md deleted file mode 100644 index ef2989d8..00000000 --- a/content/diary/2017/20170207_rust_hello_world.md +++ /dev/null @@ -1,58 +0,0 @@ -Title: Rust を始めるための設定 -Date: 2017-02-07 23:55 -Category: blog -Tags: rust, vim - -[TOC] - -### rust のインストール - -公式からインストールのためのスクリプトが提供されている。 -これを使うと、rustup というrustのマネージャが使えるようになって、 -rustc のバージョンアップや切替なんかができるらしい。 - -``` -## rustup のインストール -curl https://sh.rustup.rs -sSf | sh - -## これを .zshrc などに加える -source ${HOME}/.cargo/env -``` - -### rust のツールのインストール - -cargo というので、いろんなライブラリとかツールをダウンロードできるらしい。 -go get 的なノリだと思う。 -ひとまず、補完とフォーマットのために以下の2つをインストールする。 - -``` -## 割と時間がかかるので注意 -cargo install rustfmt -cargo install racer -``` - -### vim の設定 - -[rust.vim](https://github.com/rust-lang/rust.vim), [vim-racer](https://github.com/racer-rust/vim-racer) の2つをインストールする。 -設定は以下の通り。 -``` -" Rust -let g:rustfmt_autosave = 1 -set hidden -let g:racer_cmd = "${HOME}/bin" -``` - -### hello world - -例えば、以下のようなわざとフォーマットが崩れた状態のファイルを保存すると、保存時にフォーマットされる。 -```rust -fn main() {println!("Hello, world!"); -} -``` - -最低限これで十分使えるけど、定義ジャンプとかもできたりするらしいので、その辺のショートカットの設定と、syntax エラーがわかるように設定をしたい。 - - -### 参考 - -* [気付いたらRustの環境構築がかなり楽になってた](http://keens.github.io/blog/2016/12/29/kizuitararustnokankyoukouchikugakanarirakuninatteta/) diff --git a/content/diary/2017/20170208_home_coreos_memo.md b/content/diary/2017/20170208_home_coreos_memo.md deleted file mode 100644 index 9ad172d5..00000000 --- a/content/diary/2017/20170208_home_coreos_memo.md +++ /dev/null @@ -1,138 +0,0 @@ -Title: 自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ -Date: 2017-02-08 22:31 -Category: blog -Tags: coreos, containerlinux - -[TOC] - -## 構成 - -Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。 - -## OSイメージ -VMware用のイメージを利用。 -`/usr/share/oem/cloud-config.yml` に vmware tools周りの設定が入っているので便利。 - -## password の変更 - -grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。 - -## 初期設定: cloud-config - -`/var/lib/coreos-install/user_data` を編集する。 -(作法を無視すれば、 `/usr/share/oem/cloud-config.yml` でも良いはず。) - -``` -#cloud-config -coreos: - units: - - name: docker-tcp.socket - command: start - enable: true - content: | - [Unit] - Description=Docker Socket for the API - - [Socket] - ListenStream=2375 - BindIPv6Only=both - Service=docker.service - - [Install] - WantedBy=sockets.target - - - name: ens192-static.network - runtime: false - content: | - [Match] - Name=ens192 - - [Network] - Address=192.168.101.11/24 - Gateway=192.168.101.1 - DNS=8.8.8.8 - DNS=8.8.4.4 - - name: down-ens192.service - command: start - content: | - [Service] - Type=oneshot - ExecStart=/usr/bin/ip link set ens192 down - ExecStart=/usr/bin/ip addr flush dev ens192 - - name: ens224-static.network - runtime: false - content: | - [Match] - Name=ens224 - - [Network] - Address=192.168.105.11/24 - - name: down-ens224.service - command: start - content: | - [Service] - Type=oneshot - ExecStart=/usr/bin/ip link set ens224 down - ExecStart=/usr/bin/ip addr flush dev ens224 - - name: systemd-networkd.service - command: restart - -ssh_authorized_keys: - - "ssh-rsa ..." -hostname: "coreos-00x" -users: - - name: "hitsumabushi" - passwd: "hashed password: https://coreos.com/os/docs/latest/cloud-config.html#users" - groups: - - "sudo" - - "docker" - ssh-authorized-keys: - - "ssh-key ..." -write_files: - - path: "/etc/resolv.conf" - permissions: "0644" - owner: "root" - content: | - nameserver 8.8.8.8 - nameserver 8.8.4.4 -``` - -## もうすこし設定する - -### NTP -デフォルトで、 systemd-timesyncd が上がっていて、 /etc/ntp.conf をみると `[0-3].coreos.pool.ntp.org` へ接続している。 - -### etcd2 - -``` -coreos: - etcd2: - # generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3 - discovery: "https://discovery.etcd.io/" - # multi-region and multi-cloud deployments need to use $public_ipv4 - advertise-client-urls: "http://192.168.101.11:2379" - initial-advertise-peer-urls: "http://192.168.105.11:2380" - # listen on both the official ports and the legacy ports - # legacy ports can be omitted if your application doesn't depend on them - listen-client-urls: "http://0.0.0.0:2379,http://0.0.0.0:4001" - listen-peer-urls: "http://192.168.105.11:2380,http://192.168.105.11:7001" -... - units: -... - - name: etcd2.service - command: start -... -``` - -### locksmith -``` -coreos: - update: - reboot-strategy: "best-effort" -... - units: -... - - name: locksmithd.service - command: start -``` - diff --git a/content/diary/2017/20170208_reading_rust_programming.md b/content/diary/2017/20170208_reading_rust_programming.md deleted file mode 100644 index 6d5d24a8..00000000 --- a/content/diary/2017/20170208_reading_rust_programming.md +++ /dev/null @@ -1,53 +0,0 @@ -Title: Rust の学習メモ -Date: 2017-02-08 00:42 -Category: blog -Tags: rust -Status: draft - -[TOC] - -## 資料 - -* https://doc.rust-lang.org/book/ - * 日本語訳(バージョンが違うかも) : https://rust-lang-ja.github.io/the-rust-programming-language-ja/1.6/book/ - -## getting started - -* `println` と `println!` は違う - * `!` があるとマクロ呼び出し -* Rust の特徴 - * Rustは `expression-oriented` で 末尾に `;` が入る - * 式なので、返値を持つということだと思う -* コンパイル - * rustc でコンパイルすると、 実行ファイルはデフォルトでは、 xxx.rs なら xxx になるっぽい -* Cargo - * コードのビルド、ライブラリのダウンロード、ライブラリのビルドが管理できる - * ディレクトリ構成の制約がつく。 - * 直下に `Cargo.toml` や README.md, LICENCEなどのファイル - * `src/` 以下にソースコード - * Cargo.toml : プロジェクト設定ファイル - * `packages` に name, version, authors などを記載 - * `cargo build` すると、 `target/debug/_name_` としてバイナリが作成される - * 直接実行しても良いが、 `cargo run` すれば良い - * リリースビルドのためには、 `cargo build --release` - * リリースビルドは、実行速度は速くなるが、コンパイル時間が長くなる - * さらに、 `Cargo.lock` ファイルが作成される - * 依存関係の追跡をするために必要 -* Cargo を使って、新しいプロジェクトを作成することもできる - * 実行ファイルを作成したい場合、 `cargo new _name_ --bin` - * ライブラリの場合には、 `cargo new _name_` - -## Syntax and Semantics - -* "1つの値に対して、複数の名前が対応することはない" っぽいことが書いてあったけど良くわかっていない - * http://qiita.com/cactaceae/items/2c70a9947364c60ec100 この辺を読めば例が書かれていそう -* 型アノテーション を最低限入れておけば型推論してくれる - * 整数型として可能なサイズは、8, 16, 32, 64bitで、最初に iがついていれば符号付き、そうでない場合には u をつける。 -* 束縛はデフォルトで immutable - * もし mutable にしたいのであれば、 `let mut x=5; x=10;` など、`mut` をつける - * `let x=100; let x=10;` みたいなのは書けるけど、どう考えれば良い? - * shadowing というらしい。全然違う型でも被せられる - * 良いことなのか...? -* 変数を初期化せずに宣言できるが、それを初期化しないまま使うことは許されていない -* 文字列フォーマット: [https://doc.rust-lang.org/std/fmt/](https://doc.rust-lang.org/std/fmt/) -* `ブロック` というもの ( `{` と `}` で囲まれた範囲 ) があって、 変数のスコープになる diff --git a/content/diary/2017/20170425_sakura_terraform.md b/content/diary/2017/20170425_sakura_terraform.md deleted file mode 100644 index 043eedef..00000000 --- a/content/diary/2017/20170425_sakura_terraform.md +++ /dev/null @@ -1,31 +0,0 @@ -Title: さくらのクラウドでterraformを利用するメモ -Date: 2017-04-25 09:25 -Category: blog -Tags: sakura,terraform -Status: draft - -[TOC] - -## 資料 - -* terraform の公式ページ: https://www.terraform.io/ -* さくらのクラウド用terraform providerのドキュメント: https://yamamoto-febc.github.io/terraform-provider-sakuracloud/ -* best practice: https://github.com/hashicorp/best-practices - -## 確認するシナリオ - -1. 新しくサーバー、ルーター、スイッチを作成する - * 3層構成 - * DNS -2. 既存の3層構成のリソースをimportして - 1. サーバーをスケールアウトしてみる - 2. 別のゾーンに作ってみる - -## 困った時は -### terraform で管理してるリソースをコンパネ/APIから直接削除してしまった -terraform state rm ... とかで削除してしまうと良いと思う - -### `terraform import sakuracloud_disk.disk_import ...` みたいなのをしたら、terraform planで差分が出る -ディスク修正機能で実現されているものは、すべてAPIが返ってこないので、SSH key や source archive が差分になってしまう。 -どうしても設定したい場合には、 直接stateファイルに書くしかない。 - diff --git a/content/diary/2017/20170510_start_ios_application.md b/content/diary/2017/20170510_start_ios_application.md deleted file mode 100644 index 432ee8ad..00000000 --- a/content/diary/2017/20170510_start_ios_application.md +++ /dev/null @@ -1,24 +0,0 @@ -Title: アプリ開発初心者がiOSアプリをリリースするまでの履歴 -Date: 2017-05-10 01:43 -Category: blog -Tags: ios,mobile,application,swift -Status: draft - -[TOC] - -## 前提 -* Androidアプリ開発歴3日 -* Androidで作ったものの、iOS版を作るので、作るものは決まっている -* Swiftも知らない -* 当初はiOS版を作るつもりがなかったが、会社のお金でiPhoneを入手したので、作ろうと思っている - -## Day 1 -まずは swiftの実行環境を整えようと、Xcode をインストールする。 -インストールに時間がかかるので終わり。 - -## Day 2 -[The Swift Programming Language (Swift 3.1)](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-ID1) をクラウドEXPOの出展の合間に読む -これで大体Swiftの文法を理解した。 -感想としては、割と書きやすそう。何よりMaybe型というかOptional型というかがちゃんとあるのが良い。 -読み終わってないけど、お酒も飲んだしやめる。 - diff --git a/content/diary/2017/20170515_api_validation.md b/content/diary/2017/20170515_api_validation.md deleted file mode 100644 index 04ede3d3..00000000 --- a/content/diary/2017/20170515_api_validation.md +++ /dev/null @@ -1,109 +0,0 @@ -Title: 手で書かれたswagger fileを元にAPIをテストする -Date: 2017-05-15 15:08 -Category: blog -Tags: api, swagger -Status: draft - -[TOC] - -## 背景 - -テストされていないコードにテストを追加する活動をする。 -* サービス開発に参加したのは、リリース2ヶ月前 -* コードのメインは、API・バックエンドのコード -* コード自体は、Github Enterprise にホストされている -* リリースに向けて、不足している機能もあるため、開発しつつ改善活動をする -* 既存のコードもかなり大きいので、一から書き換えるのは時間的な制約から難しい - -## 課題 - -機能追加されたり、UI側の要望などでAPIを変更した場合に、全体として追従できない。 -ドキュメントが更新されなかったり、CLIが更新されなかったりしている。 -何を更新しないといけないか把握できていて、アクションできている人がいない。 - -## 改善 - -1. 不整合が起きたことを **テスト** によって把握できるようにする -2. 不整合が起きない/起きにくいようにする - -## 活動 - -0. [X] CI環境の整備 -1. [X] 課金情報周りの Unitテストを書く活動 -2. [X] 謎の手で書かれたswagger fileを正しいswagger fileにする -3. [X] API周りのテスト活動 -4. [ ] インフラリソースを管理できるようにする活動 - * 片っ端から terraform import して、不整合は直す -5. [ ] APIドキュメント生成する活動 ← イマココ - -### 活動の詳細 - -#### 0. CI環境の整備 - -CIするためのビルドサーバーがなかった。 -何を始めるにも、自動でビルドできるサーバーが必要なので、 -お手軽にJenkinsを立てた。 - -最近のJenkins は `.Jenkinsfile` ファイルを書くことで、ビルド内容を定義できるため、手で色々やる必要がない。 -dockerコンテナを利用してビルドする、簡単な `.Jenkinsfile` の例を書いて、共有しておき、pushやPRのタイミングで自動ビルドできるようにした。 - -#### 1. 課金情報周りの Unitテストを書く活動 - -リリースまで時間も限られているので、最も優先度の高い部分のテストを書くことにした。 -そもそもテストしづらいタイプの大きなメソッドを分割することことから始めて、00% → 80%↑ 程度までテストを書いた。 - -#### 2. 謎の手で書かれたswagger fileを正しいswagger fileにする - -謎の手書きswagger fileがあった。 -swagger fileとしてパースできるが、APIドキュメントとしては不備があって、invalid だった。 -(例えば、401が返る場合のbodyがundocumentedだったり、エラー構造体が定義されていないなど) -まず swagger fileとして正しくすることから始めた。 -一旦、これは目で見て確かめて書いていく感じにした。(もちろんソースコードを見ることができるので、ソースコードから補完していく感じ。) - -swaggerの仕様的に、どうしても表現できないものは諦めた。 -(request bodyに依存して、レスポンスのschemaが変わる場合など。) - -## 色々と試行錯誤 - -### swagger-test を使ってテストケースを書く - -オリジナルのままだと headerとかも全部deepequalになってるので、 -実稼働しているAPIサーバーに対して叩いたりはできない。 - -また、x-ampleに具体的な例を突っ込む必要があるので、公開するときに表示できないものを削除したりする必要がありそう。 -ただ、最初から swagger-test 使うつもりで準備していれば便利そう。 - -今回は、ちょっと取り回しが悪そうなので、やめた。 - -### swaggerfile をパースして json schema としてvalidation - -x-examplesにリクエストの具体的なパラメータを突っ込んで、 -swagger-parse を使って、リクエスト・レスポンスをJSON Schemaから検証した。 -required など書き方が違うものがあり、いろいろな書き方を許容してしまうとまずい印象。 - -JSON Schemaに詳しくなっている時間が惜しいため、最小限だけ実装してみたけど、 -dredd を見つけたので、お蔵入り。 - - -### dredd の検証 - -``` -% dredd init -? Location of the API description document swagger.yml -? Command to start API backend server e.g. (bundle exec rails server) -? URL of tested API endpoint https://api-dev.sakura.io -? Programming language of hooks python -? Do you want to use Apiary test inspector? No -? Dredd is best served with Continuous Integration. Create CircleCI config for Dredd? Yes - -Configuration saved to dredd.yml - -Install hooks handler and run Dredd test with: - - $ pip install dredd_hooks - $ dredd -``` - -``` -$ pip install dredd_hooks -``` diff --git a/content/diary/2017/20170519_openapi_3.0rc1.md b/content/diary/2017/20170519_openapi_3.0rc1.md deleted file mode 100644 index 1a89095e..00000000 --- a/content/diary/2017/20170519_openapi_3.0rc1.md +++ /dev/null @@ -1,54 +0,0 @@ -Title: Open API 3.0 に向けて素振りしていく所存 -Date: 2017-05-19 19:01 -Category: blog -Tags: api,swagger,openapi -Status: draft - -[TOC] - -Open API Speciification(以下 OASと書く。) 3.0 がだいぶまとまってきているようなので、 -そろそろ移行の準備をしようと、調べたことをメモしておきます。 - -## 資料 -* OAS 3.0。現状、 OpenAPI.next ブランチが 3.0 のためのブランチになっている。 - * https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md - * これを書いている時点では、 Version 3.0.0-rc2 になっている -* Open API Initiative のブログ - * https://www.openapis.org/uncategorized/2017/03/09/api-craft-sf-meetup-open-api-specification-3-0 - * https://www.openapis.org/blog/2017/03/01/openapi-spec-3-implementers-draft-released -* 日本語資料 - * OpenAPI 3.0プレビュー: https://www.infoq.com/jp/news/2017/02/openapi-3 - -## Swagger 2.0 (=OAS 2.0) から OAS 3.0.0-rc2の変更点のサマリ - -![全体の構造が大きく変更されて、components に色々突っ込まれた。](/images/2017/openapi/structure_2.0_3.0.png) - -書き方として大きく変わったと感じるのは、 -* request body に入れるparameter(これまで `in: body` と書いていたもの) が、 `requestBody` に入れることになっている -* cookie に入れるパラメータも parameterに書くことになった - -それ以外の点として個人的に嬉しいのは、以下のあたり。 -* anyOf, oneOf, not が追加 -* nullable, deprecated, writeOnly が追加 -* セキュリティ定義まわりの拡張 - -これまでswaggerで表現できなかったような既存のAPIもある程度サポートできるようになってきたように思います。 - -## OAS 3.0書いてみる - -### Swagger 2.0 のサンプル - -よくある petstore サンプルです。 - - - -### Swagger 3.0.0-rc2 へ書き換えてみる - - - -## メモ - -* ファイル名は、 `openapi.json` か `openapi.yaml` というのが推奨 - * `$ref` で参照する先のファイル名は特に推奨はなさそう -* Description は CommonMark 0.27 のフォーマットに従う - diff --git a/content/diary/2017/20170525_puzzle.md b/content/diary/2017/20170525_puzzle.md deleted file mode 100644 index 455e23cc..00000000 --- a/content/diary/2017/20170525_puzzle.md +++ /dev/null @@ -1,205 +0,0 @@ -Title: 同僚からパズルを教わったので解いてみていた -Date: 2017-05-25 02:19 -Category: blog -Tags: go -Status: draft - -[TOC] - - -同僚から、数の粘度という概念を教えてもらいました。 -おもしろい問題だったので、考えたことを忘れないように書き留めておきます。 -最低限しか解いていないので、研究の余地がかなりありそう。 - -## 問題 - - -```math -\def\qed{\hfill $\Box$} - -\newtheorem{Theorem}{定理} -\newtheorem{Example}[Theorem]{例} -\newtheorem{Definition}[Theorem]{定義} -\newtheorem{Lemma}[Theorem]{補題} -\newtheorem{Proof}[Theorem]{証明} -\newtheorem{Problem}[Theorem]{問題} - - -\begin{Definition}[記法について] -ある0以上の自然数 $a \in \mathbb{N}_{\geq 0}$ に対して、以下のような記法を使うことにする。 -\begin{itemize} -\item 10進法で表記したときに大きい桁かから見て $i$ 桁目を単に $a_{i}$ こと書く。 -\item 10進法での表記を下線つきで、 $a = \underline{a_0a_1a_2...a_N}$ と書く。 -\end{itemize} -\end{Definition} - -\begin{Example} -$a=39$ のとき、 $a_0=3$, $a_1=9$ であって、$39 = \underline{39}$ -\end{Example} - -\begin{Definition}[粘度] -ある0以上の自然数 $a \in \mathbb{N}_{\geq 0}$ に対して、粘度 $V(a) \in \mathbb{N}_{\geq 0}$ を以下で定義する。 -\begin{displaymath} -V(a) = \left\{ -\begin{array}{l} -$0$ \hspace{145} \mbox{aが1桁の場合} \\ -\min \{ n \in \mathbb{N} | V(Multi^n(a)) = 0 \} \hspace{10} \mbox{それ以外の場合} -\end{array} -\right. -\end{displaymath} -ただし、 $a = \underline{a_0a_1a_2...a_N}$ に対して、 $Multi(a) := \prod_i a_i$ とする。 -\end{Definition} - -\begin{Example} いくつか計算してみる。 -\begin{itemize} -\item $a=9$ のとき、 $V(a)=0$ -\item $a=100$ のとき、 $Multi(a)=1*0*0=0$ なので、 $V(a) = 1$ -\item $a=33$ のとき、 $Multi(a)=3*3=9$ なので、 $V(a) = 1$ -\item $a=39$ のとき、 $Multi(a)=27, Multi^2(a)=14, Multi^3(a)=4$ なので、 $V(a) = 3$ -\end{itemize} -\end{Example} - -\begin{Problem}[問題] -粘度 $k (0 \leq k \leq 11)$ を持つ最小の自然数 $mV(k)$ を見つけよ。 -\end{Problem} - -\begin{Example} -$mV(0)=0, mV(1)=10, mV(2)=25, mV(3)=39$ -\end{Example} - -\begin{Lemma}[すべての自然数に対して粘度が定義できる] -$a \in \mathbb{N}_{\geq 0}$ に対し、 $V(a) \in \mathbb{N}_{\geq 0}$ が必ず一意に定まる -\end{Lemma} - -\begin{Proof} -ある $n \in \mathbb{N}_{\geq 0}$ について、 $V(Multi^n(a)) = 0$ である場合、 一意性は明らか。\\ -任意の$a \in \mathbb{N}_{\geq 0}$ について、あるnがあって $\exists k \ s.t. V(Multi^n(a)) = 0$ が示されれば良い。 \\ -そのために、 $a>0$ として、 $a > Multi(a)$ を示す。 \\ -($a > Multi(a)$ であれば、 $a > Multi(a) > Multi^2(a) >... \geq 0$ となって、 どこかで $Multi^n(a)$ は1桁の数字になっている) \\ -$a=\underline{a_0a_1...a_N} (a_0 \neq 0)$ と書くとき、 $0 \leq a_i < 10$ でなので、 -$a= \sum_{i=0}^N a_i * 10^{N-i} \geq a_0 * 10^N > a_0 * a_1 * a_2 * ... * a_N = Multi(a)$ なので、$a > Multi(a)$ になっている。 -\qed -\end{Proof} - -\begin{Lemma}[1は含まれないこと] -$k \geq 2$ とする。 $mV(k)=\underline{a_0a_1...a_N}$ について、 $a_i \neq 1 (\forall i)$ -\end{Lemma} -\begin{Proof}背理法による。\\ -もし、 $a_i = 1$ となる $i$ があったとする。これを $j$ とする。 \\ -$\bar{a} := \underline{a_0a_1...a_{j-1}a_{j+1}...a_N}$ を考えると、\\ -$Multi(\bar{a}) = Multi(mV(k))$ なので、 $V(\bar{a}) = V(mV(k)) = k$ かつ $\bar{a} < mV(k)$ である。\\ -これは、$mV(k)$ が粘度 $k$ を持つ最小の自然数であることに矛盾する。 -\qed -\end{Proof} -``` - -```math -\begin{Lemma}[単調列であること] -$k \geq 2$ とする。\\ -$mV(k)=\underline{a_0a_1...a_N}$ について、 $i < j$ ならば $a_i \leq a_j$ である。 -\end{Lemma} -\begin{Proof} 背理法による。 \\ -ある $l a_m$ と仮定する。 \\ -このとき、 $\bar{a} := \underline{a_0a_1...a_{l-1}a_ma_{l+1}...a_{m-1}a_la_{m+1}...a_N}$ とすると、 -$Multi(\bar{a}) = Multi(mV(k))$ なので、 $V(\bar{a}) = V(mV(k)) = k$ かつ $\bar{a} < mV(k)$ である。\\ -これは、$mV(k)$ が粘度 $k$ を持つ最小の自然数であることに矛盾する。 -\qed -\end{Proof} - -\begin{Lemma}[粘度が大きい場合、5と偶数を同時に含むことはないこと] -$k \geq 3$ とする。\\ -このとき、 $mV(k)=\underline{a_0a_1...a_N}$ について、以下のどちらか一方のみが成り立つ。 -\begin{enumerate} -\item $a_i$ はすべて奇数 -\item $a_i \neq 5$ -\end{enumerate} -\end{Lemma} -\begin{Proof} ${a_i}$ のなかに、偶数と5の両方があったとすると、 -$Multi(mV(k)) = 10 * A$ の形で書ける。\\ -つまり、 $Multi^2(mV(k)) = Multi(10*A) = 0$ になり、 $k \leq 2$ になるため。 -\qed -\end{Proof} - -\begin{Definition} -$$[789] := \{\underline{7...78...89...9}\}$$ -ただし、7,8,9 がそれぞれ0個でも良いとする。 -\end{Definition} - -\begin{Example} \ -\begin{itemize} -\item $7 \in [789]$ -\item $7777777779 \in [789]$ -\item $888 \in [789]$ -\item $77789 \in [789]$ -\end{itemize} -\end{Example} - -\begin{Lemma}[数列の簡約] -$k \geq 3$ とする。\\ -このとき、 $mV(k)=\underline{a_0a_1...a_N}$ について、以下のどれか1つのみが成り立つ。 -\begin{enumerate} -\item $a_0=2$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=3$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=4$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=6$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=7$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=8$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=9$ かつ $\underline{a_1...a_N} \in [789]$ -\item $a_0=2, a_1=6$ かつ $\underline{a_2...a_N} \in [789]$ -\item $a_0=3, a_1=5$ かつ $\underline{a_2...a_N} \in [789]$ -\item $a_k=5 (k=0, ...., k_0)$ かつ $\underline{a_{k_0+1}...a_N} \in [789]$ -\end{enumerate} -\end{Lemma} -``` - -``` -\begin{Proof} これまでの補題を使って1つずつ場合分けをして考える。 -\begin{itemize} -\item $a_0=2$ の場合 -\begin{itemize} -\item $\underline{22...}$ の場合、 $\underline{4...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。 -\item $\underline{23...}$ の場合、 $\underline{6...}$ と置き換えれると、上と同様。 -\item $\underline{24...}$ の場合、 $\underline{8...}$ と置き換えれると、上と同様。 -\item $\underline{25...}$ は、偶数と5が同時に含まれており含まれており、補題からありえない。 -\end{itemize} -そのため、 $a_0=2$ の場合には、 $\underline{26...}, \underline{27...}, \underline{28...}, \underline{29...} $ となっている。 -\item $a_0=3$ の場合 -\begin{itemize} -\item $\underline{33...}$ の場合、 $\underline{9...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。 -\item $\underline{34...}$ の場合、 $\underline{26...}$ と置き換えれると、上と同様。 -\item $\underline{36...}$ の場合、 $\underline{29...}$ と置き換えれると、上と同様。 -\end{itemize} -そのため、 $a_0=3$ の場合には、 $\underline{35...}, \underline{37...}, \underline{38...}, \underline{39...} $ となっている。 -\item $a_0=4$ の場合 -\begin{itemize} -\item $\underline{44...}$ の場合、 $\underline{28...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。 -\item $\underline{45...}$ は、偶数と5が同時に含まれており含まれており、補題からありえない。 -\item $\underline{46...}$ の場合、 $\underline{38...}$ と置き換えれると、上と同様。 -\end{itemize} -そのため、 $a_0=4$ の場合には、 $\underline{47...}, \underline{48...}, \underline{49...} $ となっている。 -\item $a_0=5$ の場合 -\begin{itemize} -\item $\underline{55...}$ は、補題からありえない。 -\item $\underline{56...}$ は、偶数と5が同時に含まれており含まれており、補題からありえない。 -\end{itemize} -そのため、 $a_0=5$ の場合には、 $\underline{57...}, \underline{58...}, \underline{59...} $ となっている。 -\item $a_0=6$ の場合 -\begin{itemize} -\item $\underline{66...}$ は、$\underline{49...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。 -\end{itemize} -そのため、 $a_0=6$ の場合には、 $\underline{67...}, \underline{68...}, \underline{69...} $ となっている。 -\item $a_0=7$ の場合には、 $\underline{77...}, \underline{78...}, \underline{79...}$ となっている。 -\item $a_0=8$ の場合には、 $\underline{88...}, \underline{89...}$ となっている。 -\item $a_0=9$ の場合には、 $\underline{99...}$ となっている。 -\end{itemize} -以上を整理して書くと、主張の通りになる。 -\qed -\end{Proof} -``` - -``` -\begin{Lemma}[5は高々1つだけ] -$k \geq 3$ とする。\\ -このとき、 $mV(k)=\underline{a_0a_1...a_N}$ について、 $a_i=5$ となる $i$ は高々1つしかない。 -\end{Lemma} -``` diff --git a/content/diary/2017/20170601_protect_linux_from_attack.md b/content/diary/2017/20170601_protect_linux_from_attack.md deleted file mode 100644 index 9af64e84..00000000 --- a/content/diary/2017/20170601_protect_linux_from_attack.md +++ /dev/null @@ -1,135 +0,0 @@ -Title: Linux を安心して運用するために(Debianを例に) -Date: 2017-06-01 11:33 -Category: blog -Tags: linux -Status: draft - -[TOC] - -## やること - -* 意図しないアクセスを防ぎたい - * Firewall の設定 - * fail2ban - * SSH のパスワード認証の拒否 - * SELinux -* 攻撃の未然防止をしたい - * 脆弱性スキャン - * vuls - * debsecan - * 設定のチェック - * lynis -* ウイルスを検知したい - * Antivirusソフトウェアの実行 -* 攻撃を受けたことに気づきたい - * rootkit 対策(rkhunter, chkrootkit) - * auditd - * tripwire - * 気休め系: debsums, etckeeper -* 設定が悪くないかを見ておきたい - * OpenSCAP - * Debian ではまだ unstable にしかないし、今回はやらない - * ポリシーもRHELの方がサポートされているらしい - * https://wiki.debian.org/UsingSCAP - -## 実行環境 - -``` -$ uname -a -Linux workdebian 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux -``` - -## やったこと - -### clamav - -``` -$ sudo apt install clamav clamav-daemon -$ sudo chmod o+w /etc/clamav/freshclam.conf -$ sudo vim /etc/clamav/freshclam.conf -- DatabaseMirror db.local.clamav.net -+ DatabaseMirror db.jp.clamav.net -$ sudo chmod o-w /etc/clamav/freshclam.conf -$ sudo systemctl restart clamav-freshclam -$ sudo vim /etc/clamav/clamd.conf -$ sudo systemctl restart clamav-daemon -``` - -### etckeeper - -``` -$ sudo apt install etckeeper -``` - -何か変更した時 -``` -$ cd /etc/ -$ sudo git status -$ sudo git commit -am "foo bar" -``` - -どこかに push しておくと便利だと思うけど、今回はやらない。 - -### rkhunter - -``` -$ sudo apt install rkhunter -``` - -定義ファイルの更新 -``` -$ sudo rkhunter --update -$ sudo rkhunter --propupd -``` - -スキャン -``` -$ sudo rkhunter -c --sk --rwo -Warning: Hidden directory found: /etc/.java -Warning: Hidden directory found: /etc/.git -Warning: Hidden file found: /etc/.etckeeper: ASCII text -Warning: Hidden file found: /etc/.gitignore: ASCII text -sudo rkhunter -c --sk --rwo 9.45s user 7.24s system 28% cpu 57.817 total -``` - -Warningの修正(このWarningの内容は問題ないので、次回以降表示したくない) -``` -$ sudo vim /etc/rkhunter.conf -- #ALLOWHIDDENDIR=/etc/.java -- #ALLOWHIDDENDIR=/etc/.git -+ ALLOWHIDDENDIR=/etc/.java -+ ALLOWHIDDENDIR=/etc/.git -... -- #ALLOWHIDDENFILE=/etc/.gitignore -- #ALLOWHIDDENFILE=/etc/.etckeeper -+ ALLOWHIDDENFILE=/etc/.gitignore -+ ALLOWHIDDENFILE=/etc/.etckeeper -``` - -### Lynis - -``` -$ sudo apt install lynis -``` - -スキャン -``` -$ sudo lynis audit system --verbose -``` - -cronの設定 -https://cisofy.com/documentation/lynis/#cronjobs に記載されているとおり、 `--cronjobs` をつけるらしい。 - -### auditd - -``` -$ sudo apt install auditd -``` - -### debsums, debsecan - -``` -$ sudo apt install debsums debsecan -``` - -### vuls diff --git a/content/diary/2017/20170710_usacloud_peco.md b/content/diary/2017/20170710_usacloud_peco.md deleted file mode 100644 index 09ffd2c3..00000000 --- a/content/diary/2017/20170710_usacloud_peco.md +++ /dev/null @@ -1,63 +0,0 @@ -Title: さくらのクラウドを便利に使うためのツールメモ -Date: 2017-07-10 16:00 -Category: blog -Tags: sakura,terraform,peco - -[TOC] - -## 1. CLIで操作したい - -usacloud が今一番良い。 -非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。 - -https://sacloud.github.io/usacloud/ - -### 便利なコマンド - -#### 〇〇の一覧が欲しい - -〇〇 list すれば良い。例えば、以下の通り。 -``` -## サーバー -usacloud server list -## スイッチ -usacloud switch list -``` - -#### サーバーのメンテナンス情報を知りたい -``` -usacloud server maintenance-info -``` - -#### サーバーにSSHしたい -``` -usacloud server ssh -l username example_node -``` - -### peco と usacloud でもっと便利にSSHする - -peco ( http://peco.github.io/ ) をインストールする。 -以下のようなスクリプトを .zshrc に書く。 - - -.zshrc を読み込み直して、 `Ctrl + g` を押すと、サーバー名やIPで絞り込みを行って SSH できる。 -上記スクリプトではタグ情報を入れていないけど、入れたい場合には、 `usacloud server list --output-type json` などにして、出力を `jq` でフィルタして表示するのが良いと思う。 - -## 2. terraform 経由で使いたい - -usacloud と同じ作者が作っている terraform provider がある。 -terraform 公式には入っていないが、インストールも簡単。 - -https://sacloud.github.io/terraform-provider-sakuracloud/ - -ただ、既存リソースをインポートして使うにはなかなか大変。 -色々 tfstate ファイルを生で書き換える必要がある。 -特に、リソースには基本的にIDが必要だけど、さくらのクラウドにIDがないものがある。 -例えば、DNSのゾーンにはIDがあるけど、レコードにはIDがない。 -これを管理するために、terraform provider 側でIDを生成している。 -以下のような形で生成したものをtfstateに書けば良い。 -https://play.golang.org/p/rYk3VNLeGN - -## 3. ansible で便利に使いたい - -TODO diff --git a/content/diary/2017/20170826_marketing.md b/content/diary/2017/20170826_marketing.md deleted file mode 100644 index d5a28abc..00000000 --- a/content/diary/2017/20170826_marketing.md +++ /dev/null @@ -1,109 +0,0 @@ -Title: 読書メモ: いちばんやさしいグロースハックの教本 -Date: 2017-08-26 16:27 -Category: blog -Tags: marketing -Status: draft - -[TOC] - -## 前提 -マーケティングというより、サービスの効果測定を数値で追い、施策を実施、施策の効果を測定する、という一連の流れを行う必要を感じていたので読み始めた。 -念頭にあるサービスは、webサービスではあるけど、オウンドメディアみたいなコンテンツをユーザーに読ませることが主目的ではない。 -マーケティングの知識も経験もなく、3C分析などもこの2日くらいで勉強しはじめて知った。 - -## メモ -### Chapter 1 : グロースハックを理解する - -* サービスの成長を定量化することで、絶対的な成果が見えるようになる - * 投資に対する説明や、メンバーのやる気も上がる -* グロースハッカーとは、サービスの成長に対して責任を持ち責務を果たす人間 - * データからユーザー行動を明らかにする - * いろいろな部署・役割の人と調整することも必要 - * プロジェクトリーダー的な人間が担当することが多い -* グロースハッカーに必要なスキル - * UX の設計は基本 - * データを元に意思決定するスキル - * プロジェクトマネジメントのスキル -* グロースハッカーに必要なマインドセット - * マキャベリストの君主論 - * `国家が聞きに陥った場合、政治家は(国家存続の)目的のために有効ならば、手段を選ぶべきではない` - * 目的達成至上主義 - * 成果という唯一の目的のために、できうるすべてを行動に移す - * 素早く、たくさん、賢く失敗をして、そこから成功を導く - * Fail fast - * Fail often - * Fail smart - * 先にコップの器を大きくする - * 改善に注力するよりも、まずはサービスを大きくして、改善メリットが出るサイズになったら、細かい改善をする -* グロースハックのためには、事業について権限を持つ人をみんな巻き込むこと -* グロースチームの構成 - * 3人で構成する - * ハスラー : まとめ役。for the team。チームをこぶし、社内外の関係者と交渉できることが必要 - * ハッカー : 開発すべてを行うことができるエンジニア。技術的なアプローチで課題を解決し、未知ののものでも挑戦し、学習できることが必要 - * ヒップスター : UI/UX デザイナ。サービスの価値をデザインして、そのインターフェースを設計して実現できることが必要 - * 人数が増えるとコミュニケーションのパスが増える(3人だと3本しかパスがないのに、4人だと6本のパスがある) - * 物理的な距離が近いことも必要 - * とにかくコミュニケーションコストは下げる - * かならず専任にすること - * 全体最適の考えが重要なのに、どこかで兼任していると、兼任先の部署の価値観に引っ張られる - * 限られた時間でスピードを持ってtry&errorするために、意思決定から施策実行までできるチームが、成長施策に100%の時間を使って行う -* グロースチームの作り方 - * 身の回りの小さなことから始める - * 製品開発チームから作る - -### Chapter 2 : 基本のフレームワークを理解しよう - -* AARRR モデル : サービス全体をユーザの行動に合わせて5つのステージに分ける - * Acquisition : ユーザー獲得 - * Activation : ユーザー活性化 - * Retention : 継続 - * Referral : 紹介 - * Revenue : 収益化 -* ARRRA モデル - * AARRR モデルの欠点 - * 施策を行うべき順番ではない - * 離脱率に力点があり、UXの最大化という最も重視すべき点が抜けている - * ARRRA モデルでは、AARRR モデルとステージごとに意味が違う - * Activation : ユーザー活性化 - * 製品の価値が顧客が求めているものか? - * それが初回来訪時にしっかりと伝わっているか? - * Retention : 継続 - * 顧客は使い続けてくれるくらい、製品の価値に満足しているか? - * Referral : 紹介 - * 顧客は友人に伝えたくなるほど、製品の価値に満足しているか? - * Revenue : 収益化 - * 顧客はお金を払ってくれるほど、製品の価値に満足しているか? - * Acquisition : ユーザー獲得 - * 製品の価値をひろめるために、正しいチャネルと訴求軸を選べているか? -* まずは Activation を達成する - * サービスは、「誰の・どんな課題を・どうやって解決するのか」で成り立っているが、そもそもそんな対象が存在していない、という場合がある - * 本格的な開発をするより先に、「そもそも解決しようとしている課題を、本当に顧客が抱えているのか?」「このサービスは顧客が求めるものか?」を検証すること - * ニーズがあることがわかったら、顧客の初回体験時にしっかりと製品の価値が伝わるようにします - * Activation を達成したら、 Retention のための仕掛けを製品に組み込んでいく -* ARRRA モデルと他のフレームワークの比較 - * ARRRA モデルとリーンアナリティクス、グロースピラミッドなどは共通点が多い - * 全て、サービスに価値を感じる顧客の発見、を最初に行う - * リーンアナリティクスでは、 Emphathy - * グロースピラミッドでは、 PSF(Problem Solution Fit) - * 他のステップも似ている -* 今いる成長ステージを確認する - * P.45 のチェックシート -* ARRRA の順で考えるが、最後まで Acquisition を行わない、という意味ではない - * 成長の過程で、何度も A→ R→R→R→A→.A→.. という動きを行う - * サイクルをどういうタイミングで回していくかは、適当にユーザー数などで事前に決めておくと良い - -### Chapter 3 : まずは価値提供から手を付けよう - -* アクティベーション = PSF + ユーザーオンボーディング - * サービスに価値があるのか - * 価値を初回にユーザーに伝えられているか - -#### PSF -以下を検証する -* 顧客は本当にその課題を抱えているか -* 解決法のアプローチが間違った前提に立脚していないか - - -#### ユーザーオンボーディング - - diff --git a/content/diary/2017/20171013_setup_vsphere_on_intel_nuc.md b/content/diary/2017/20171013_setup_vsphere_on_intel_nuc.md deleted file mode 100644 index 8ec0e48d..00000000 --- a/content/diary/2017/20171013_setup_vsphere_on_intel_nuc.md +++ /dev/null @@ -1,114 +0,0 @@ -Title: Intel NUC 上に vSphere 6.5 のVSAN環境を作る -Date: 2017-10-13 01:06 -Category: blog -Tags: vmware - -[TOC] - -あまりVMwareを触らなくなってきて、何も見ずにvCenterの設定とかMaximum configurationsとか言えなくなってきたので、VMware周りのことをメモに残しておくことにする。 -ひとまず、自宅のVSAN環境の構築メモ。 - -## 環境 -以下の構成のIntel NUC 3台にESXiをインストールして、その上にvCenterを立て、VSAN環境を作る。 - -* Machine: NUC6i3SYH [https://www.amazon.com/gp/product/B018NSAPIM](https://www.amazon.com/gp/product/B018NSAPIM) - * Memory: 16GBx2 [https://www.amazon.com/gp/product/B015YPB8ME](https://www.amazon.com/gp/product/B015YPB8ME) - * Cache SSD: Intel 128GB [https://www.amazon.co.jp/gp/product/B01JSJA1Z2](https://www.amazon.co.jp/gp/product/B01JSJA1Z2) - * SSD: Crucial MX300 275GB [https://www.amazon.com/gp/product/B01IAGSD5O](https://www.amazon.com/gp/product/B01IAGSD5O) - * USB storage: SanDisk USB Flash Drive 8GB [https://www.amazon.co.jp/gp/product/B005FYNSUA](https://www.amazon.co.jp/gp/product/B005FYNSUA) - * ESXi インストール用 - * あんまり良くはないけど、省スペースのために妥協 - * USB NIC: StarTech.com USB32000SPT [https://www.amazon.com/dp/B00D8XTOD0](https://www.amazon.com/dp/B00D8XTOD0) - * 一時期、管理ネットワークとVSANネットワークを兼用していたが、すぐにぶっ壊れるので、NICを追加するために購入した - * 4K までだけどJumbo frame がサポートされているので、まあ良さそう。もちろん本当は9K欲しい。 -* NFS サーバー - * vCenter をデプロイしたいだけなので、データストアがVSANと別に作成できれば何でも良い。 - * 外付けHDDとかでもたぶんできるし、vCenterを作成するESXi上ではない場所にデプロイできるならそれでも良い。 - * あと、vCenterデプロイ時にSingle host VSANを構成することができるようになっているみたいだけど、今回はライセンスの適用順とかの問題を考えたくなかったので、使わなかった - -ESXi Customizer を利用する都合上、作業マシンはWindowsである必要がある(と思う)。 - -## 手順 -ここでは、最初に StartechのUSB Ethernet adapterをインストール時点で使うために、ESXiのイメージカスタマイズから行う。 -通常のESXiインストール後にvibでドライバを入れる場合には、 [このブログ](http://www.virtuallyghetto.com/2016/11/usb-3-0-ethernet-adapter-nic-driver-for-esxi-6-5.html) を参照すれば良い。 - -### ESXi用のバンドルファイルのダウンロード -[このブログ](http://www.virtuallyghetto.com/2016/11/usb-3-0-ethernet-adapter-nic-driver-for-esxi-6-5.html) のStep 0 にある、 `ESXi 6.5 USB Ethernet Adapter Driver Offline Bundle` をダウンロードする。 -これを新しくディレクトリを作って(ここでは、 `C:\path\to\pkg` とする)保存しておく。 - -### ESXi イメージの準備 -普通のESXi イメージを使っても良い。 - -[ESXi Customizer](https://www.v-front.de/p/esxi-customizer-ps.html) を使う。 -事前に、 VMware PowerCLI をインストールしておく。 -(VMware PowerCLI の最新版の場所はわかりづらい。たぶん https://www.vmware.com/support/developer/PowerCLI/ あたりに飛んで、新しそうなバージョンのリンクを踏めば良い。) - -ESXi Customizer をインストールした場所で、以下のコマンドを実行する。 -(`C:\path\to\pkg` は、先の手順で作成したディレクトリ) -``` -.\ESXi-Customizer-PS-v2.5.1.ps1 -pkgDir C:\path\to\pkg -nsc -``` - -すると、 `ESXi-6.5.0-20171004001-standard-customized.iso` のような名前のISOファイルができる。 - -### オプション: USBでブートしてインストールできるようにする - -今回は、CDに焼くのが面倒だったのでUSBからブートしてインストールする。 -何かしらのUSBドライブを用意する。 -[UNetbootin](http://unetbootin.github.io/) を利用して、用意したUSBドライブにイメージを書く。 -見たままだけど、ディスクイメージの項目からISOファイルを選んで、USBドライブを選べび、OKを押せば良い。間違って変なドライブを選択しない限りは特に問題はない。 - -以下のインストールでは、このUSBドライブをIntel NUCに挿して行う。 - -### ESXi インストール - -普通にインストールする。 -boot時はF10連打してbootしたいドライブを選ぶ。 -install先はインストール用のUSB(私の構成ではSanDiskのUSBドライブ)を選ぶ。 - -### インストール後の追加の初期設定 - -通常通り、管理ネットワークの設定やホスト名の設定を行う他に、NICを有効にする必要がある。 -手順としては以下の通り。 - -* DCUI(もしくはSSH)に入れるようにして、DCUIに入る -* `esxcli software vib list` して、`vghetto-ax88179-esxi65` というvibが入っていることを確認する -* 以下を実行する -``` -esxcli system module set -m=vmkusb -e=FALSE -``` -* reboot -* 以下をDCUIで実行して、NICが見えていることを確認する -``` -esxcli network nic list -``` - -自分の環境では以下のように見える。 -``` -[root@esxi-01:~] esxcli network nic list -Name PCI Device Driver Admin Status Link Status Speed Duplex MAC Address MTU Description ------- ------------ ------------ ------------ ----------- ----- ------ ----------------- ---- -------------------------------------------- -vmnic0 0000:00:1f.6 ne1000 Up Up 1000 Full b8:ae:ed:eb:0c:11 1500 Intel Corporation Ethernet Connection I219-V -vusb0 Pseudo ax88179_178a Up Up 1000 Full 00:0a:cd:2f:23:6a 1500 Unknown Unknown -vusb1 Pseudo ax88179_178a Up Down 0 Half 00:0a:cd:2f:23:6b 1500 Unknown Unknown -``` - -これを3台とも行う。 - -### NFS のマウント - -vCenter をデプロイする先のデータストアが必要なので、どれか1台でNFSをマウントする。 - -### vCenter のデプロイ && VSANの設定 - -* vCenter は通常どおりデプロイする。CLIからデプロイした。 -* VSANの設定も通常どおり行えば良い。 - * vDSを作って、VSAN用のportgroupを作る。今回の vusb0/1 はMTU4000までいけるので、必要に応じて、MTU4000にしておく - * その後各ホストで、vmkアダプタを作って、VSAN用ポートグループにアサインして、VSANネットワークとして設定する - * HAを有効化するのはVSAN有効化後に行う - - -## 参考 -* ESXi Customizer: [https://www.v-front.de/p/esxi-customizer-ps.html](https://www.v-front.de/p/esxi-customizer-ps.html) -* UNetbootin: [http://unetbootin.github.io/](http://unetbootin.github.io/) -* virtuallyGhetto: [http://www.virtuallyghetto.com/2016/11/usb-3-0-ethernet-adapter-nic-driver-for-esxi-6-5.html](http://www.virtuallyghetto.com/2016/11/usb-3-0-ethernet-adapter-nic-driver-for-esxi-6-5.html) diff --git a/content/diary/2017/20171017_turn_off_submodule_update_on_travis_ci.md b/content/diary/2017/20171017_turn_off_submodule_update_on_travis_ci.md deleted file mode 100644 index 6a04a647..00000000 --- a/content/diary/2017/20171017_turn_off_submodule_update_on_travis_ci.md +++ /dev/null @@ -1,25 +0,0 @@ -Title: Travis CIで git submodule update --init --recursive を止める -Date: 2017-10-17 03:36 -Category: blog -Tags: git, travis-ci - -[TOC] - -## 結論 -- [https://docs.travis-ci.com/user/common-build-problems/#Git-Submodules-are-not-updated-correctly](https://docs.travis-ci.com/user/common-build-problems/#Git-Submodules-are-not-updated-correctly) に書かれている通り、 .travis.yml に以下の行を付け加えれば良い。 -``` -git: - submodule: false -``` -- 個別に `git submodule update --init hoge` していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 `$TRAVIS_BUILD_DIR` を使えば良い。 - -## 経緯 -久しぶりにこのブログを書いたらビルドに失敗していた。 -原因としては、このブログで利用している [getpelican/pelican-plugins](https://github.com/getpelican/pelican-plugins) のsubmoduleの設定によって、 -取得できないsubmoduleがあり、 `git submodule update --init --recursive` に失敗しているという感じだった。 - -## ハマった点 -もともと、自分自身で .travis.yml の `install` で `git submodule update --init --recursive` していて、そこが悪いと思っていた。 -そのため、必要なsubmoduleについて、個別に `git submodule update --init hoge` していって終わりだと思った。 -実際にやってみると、 [https://travis-ci.org/hitsumabushi/blog/builds/288689875](https://travis-ci.org/hitsumabushi/blog/builds/288689875) のようになるが、install よりも早い段階でエラーになっていることに気づくのに時間がかかった。 - diff --git a/content/diary/2017/20171024_k8s_install_step.md b/content/diary/2017/20171024_k8s_install_step.md deleted file mode 100644 index 74abf18f..00000000 --- a/content/diary/2017/20171024_k8s_install_step.md +++ /dev/null @@ -1,118 +0,0 @@ -Title: kubernetes instal step -Date: 2017-10-24 01:54 -Category: blog -Tags: kubernetes,docker,debian -Status: draft - -[TOC] - -## kubectl をインストール - -kubernetes の管理に使うので、 kubectl をインストール - -``` -$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x ./kubectl -``` - -実行できるか確認する。 -``` -$ kubectl version --client -o yaml -clientVersion: - buildDate: 2017-10-11T23:27:35Z - compiler: gc - gitCommit: f38e43b221d08850172a9a4ea785a86a3ffa3b3a - gitTreeState: clean - gitVersion: v1.8.1 - goVersion: go1.8.3 - major: "1" - minor: "8" - platform: linux/amd64 -``` - -## local で k8s を立てる -### minikube をインストール - -最新バージョンを確認してダウンロードする - -``` -$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.3/minikube-linux-amd64 && chmod +x minikube -``` - -実行できるか確認する。 -``` -$ minikube version -minikube version: v0.22.3 -``` - -### k8s cluster を作る - -``` -$ minikube start -Starting local Kubernetes v1.7.5 cluster... -Starting VM... -Downloading Minikube ISO - 139.09 MB / 139.09 MB [============================================] 100.00% 0s -Getting VM IP address... -Moving files into cluster... -Setting up certs... -Connecting to cluster... -Setting up kubeconfig... -Starting cluster components... -Kubectl is now configured to use the cluster. -``` -``` -$ kubectl get nodes -NAME STATUS ROLES AGE VERSION -minikube Ready 1m v1.7.5 -``` - -### minikube ちょっと触る -* minikube dashboard -* minikube status -* minikube ip -* minikube ssh -* minikube docker-env - -### - -``` -$ kubectl run ghost --image=ghost:latest -deployment "ghost" created -$ kubectl expose deployments ghost --port=2368 --type=NodePort -service "ghost" exposed -$ kubectl get pods -NAME READY STATUS RESTARTS AGE -ghost-1604807603-ttz54 1/1 Running 0 2m -``` - -expose したサービスをブラウズで開くのは minikube でできる。 -``` -$ minikube service ghost -``` - - -状態を見る -``` -$ kubectl get pods,rs,deployments -NAME READY STATUS RESTARTS AGE -po/ghost-1604807603-ttz54 1/1 Running 0 11m -po/redis-2048254088-kmz83 1/1 Running 0 3m - -NAME DESIRED CURRENT READY AGE -rs/ghost-1604807603 1 1 1 11m -rs/redis-2048254088 1 1 1 3m - -NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE -deploy/ghost 1 1 1 1 11m -deploy/redis 1 1 1 1 3m - -$ kubectl logs redis-2048254088-kmz83 -1:C 24 Oct 15:53:00.672 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo -1:C 24 Oct 15:53:00.672 # Redis version=4.0.2, bits=64, commit=00000000, modified=0, pid=1, just started -1:C 24 Oct 15:53:00.672 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf -1:M 24 Oct 15:53:00.675 * Running mode=standalone, port=6379. -1:M 24 Oct 15:53:00.675 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. -1:M 24 Oct 15:53:00.675 # Server initialized -1:M 24 Oct 15:53:00.675 * Ready to accept connections -``` - diff --git a/content/diary/2017/20171110_ansible_version_check.md b/content/diary/2017/20171110_ansible_version_check.md deleted file mode 100644 index 41326c1f..00000000 --- a/content/diary/2017/20171110_ansible_version_check.md +++ /dev/null @@ -1,60 +0,0 @@ -Title: Ansible でバージョンチェックする -Date: 2017-11-10 14:02 -Category: blog -Tags: ansible,debian - -[TOC] - -## やりたいこと -サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。 -- インストールされていなかったらインストール -- あるバージョン未満だったらアップデート - -pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。 -いい感じに playbook の中でバージョン比較をして、インストール/アップデートすべきかを判定したいと考えました。 - -## 結論 - -* バージョン比較には、 `version_compare` filter を使う - - [Version Comparison](http://docs.ansible.com/ansible/latest/playbooks_tests.html#version-comparison) -* バージョン比較方法としては、 `LooseVersion` と `StrictVersion` がある -* 実装としては、 python の `distutils.version` を利用しているので、どう判定されるか迷ったら、比較してみれば良い - -### playbook - -例えば、docker の場合だと、以下のような感じで書けば良い。 - -```yaml -## docker version を取得 -## docer version してみて、 -## - rc が 1 だったら、docker がインストールされていないと判断 -## - stdout にバージョンが入る -- name: check docker version - command: docker version -f \{\{.Server.Version\}\} - changed_when: false - ignore_errors: yes - register: docker_installed - -- name: install curl - apt: name=curl - -- name: install docker - shell: curl -sSL https://get.docker.com/ | sudo sh - when: docker_installed.rc == 1 - -## docker_min_version という変数が定義されているとする。 -## 例えば、 '1.11.0' という文字列が入っている -- name: update docker if older than docker_min_version - apt: name=docker-engine state=latest - when: docker_installed.stdout | version_compare(docker_min_version, '<') -``` - -### distutils.version で試してみる - -```pycon ->>> from distutils.version import LooseVersion ->>> LooseVersion('1.10.3') < LooseVersion('1.11.0') -True ->>> LooseVersion('17.05.0-ce') < LooseVersion('1.11.0') -False -``` diff --git a/content/diary/2017/20171201_mesos_production.md b/content/diary/2017/20171201_mesos_production.md deleted file mode 100644 index d802959c..00000000 --- a/content/diary/2017/20171201_mesos_production.md +++ /dev/null @@ -1,72 +0,0 @@ -Title: Mesos の sandbox のログローテーションをする -Date: 2017-12-01 20:01 -Category: blog -Tags: mesos,docker - -[TOC] - -### 結論 - -* http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger -* `LogrotateContainerLogger` を使って、 module parameter を設定する - -### 概要 - -Mesos + Marathon 環境でdockerを動かしている。 -基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。 -調べてみると、 `/var/lib/mesos-slave/slaves/` 以下にあるフォルダのうち、sandbox のログが肥大化していた。 -sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosからファイルとして取得することができる。 -長期的なものは fluentd で飛ばしているので問題ないため、障害時や直近の確認のために sandbox を使うことにして、 -短期間でのログローテーションを行うことにした。 - -### 設定方法 - -#### LogrotateContainerLogger の利用が可能か調べる - -共有オブジェクト `/usr/lib/liblogrotate_container_logger.so` にあることを確認する。 -パスが違っても良いが、その場合は以下で出てくるパスも変更する。 - -#### モジュールの設定ファイルを書く - -`/etc/mesos_slave_modules.json` として以下を書く。 -``` -{ - "libraries": [{ - "file": "/usr/lib/liblogrotate_container_logger.so", - "modules": [{ - "name": "org_apache_mesos_LogrotateContainerLogger" - # パラメータを指定するときはここに書く - }] - }] -} -``` - -#### モジュールの有効化 - -`/etc/mesos-slave/modules` として、以下が書かれたファイルを置く。 -``` -file:///etc/mesos-slave-modules.json -``` - -`/etc/mesos-slave/container_logger` として、以下が書かれたファイルを置く。 -``` -org_apache_mesos_LogrotateContainerLogger -``` - -#### mesos-slave の起動 -mesos-slave を起動する。 - -#### 動作確認 - -sandbox を見ると、 stdout.logrotate.conf, stderr.logrotate.conf が出来ている。 - -![](/images/2017/mesos/mesos_sandbox.png) - - -ファイルの中身は -``` -/path/to/stdout/ { -## logrotate オプション: パラメータで指定してない場合は size 10481664 くらいしかない -} -``` -となっている。 diff --git a/content/diary/2017/20171206_sakura_cloud_with_terraform_and_ansible.md b/content/diary/2017/20171206_sakura_cloud_with_terraform_and_ansible.md deleted file mode 100644 index beab2991..00000000 --- a/content/diary/2017/20171206_sakura_cloud_with_terraform_and_ansible.md +++ /dev/null @@ -1,239 +0,0 @@ -Title: さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話 -Date: 2017-12-05 17:48 -Category: blog -Tags: sakrua,ansible,terraform - -[TOC] - ---- - -これは、[さくらインターネット Advent Calendar 2017](https://qiita.com/advent-calendar/2017/sakura) として書いた[記事](https://qiita.com/hitsumabushi/items/e89b763dd4fc41e15136) です。 - ---- - -さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。 -sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。 - -私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。 -その結果としてTerraform を導入し、Terraform (+ Terraform for さくらのクラウド) + Ansible で運用することになりました。 -導入までの課題と、どのように導入・利用しているのか、について書きたいと思います。 - -## 運用の課題 - -### 検証環境と本番環境で構成に差分があり、それに気づきづらい - -mesos+marathon を利用したコンテナ実行環境を使ったマイクロサービスアーキテクチャになっていて、それ以外にも、redis, memcached, メッセージキューなどいろいろなコンポーネントがあります。 -そのため、個別の開発者がクリーンな環境を気軽に用意しづらいです。 - - -インフラの構成を変更したいと思ったとき、個別の開発者がクリーンな環境を個別に作るのは手間がかかってしまうため、直接検証環境でテストしがちです。その際に、行われた変更がそのまま残ってしまい、本番環境との差が残ってしまっているケースがありました。 - -### Ansible Playbook の内容と現実に差分がある - -もともとOS内の設定はansibleで管理していたのですが、対象ホストの増加、ansible playbookの肥大化に伴い、実行時間が増えてしまいました。 -それに伴い、`--limit`, `--tags` をつけて部分的に実行するようになり、playbook と差分が散見されるようになりました。 - -## 方針 - -ansible は全部実行しろ、などとルールを作ることは簡単なのですが、上記に書いたとおり、心理的なハードルによって発生している問題だと思いました。そこでルール化することはエンジニアリングの敗北という感じがしたので、差分がわかるように構成管理することと、差分を定期的にチェックして通知することに集中することにしました。 - -構成管理として、OS内の部分はansibleを利用していたためそのまま利用し、インフラの構成管理としては、ちょうど [Terraform for さくらのクラウド](https://sacloud.github.io/terraform-provider-sakuracloud/) もあったため、terraformを利用することにしました。 - -差分の検知としては、terraform plan, ansible check mode を定期的に実行することにしました。 - -## terraform 導入のために - -### terraform のフォルダ構成 - -[他のクラウドでのベストプラクティス](https://github.com/hashicorp/best-practices/tree/master/terraform) を参考に、フォルダ構成は以下のようにしています。 -terraform plan, apply などする場合には、 `pod-xxx` ディレクトリ配下で実行します。 - -```text -. -├── module -│   └── sakuracloud -│   ├── compute -│   │   ├── compute.tf // compute のエントリーポイント。各roleのモジュールへ変数を渡す -│   │   ├── role-hoge // role ごとに作成 -│   │   │   └── role-hoge.tf // util の base-wrapperへ変数を渡す。role固有の変数変換はここでやる -│   │   └── util // 他のroleから読まれる -│   │   ├── base-wrapper // instance と service-dns を呼ぶためのやつ。他のroleからはこいつを見る -│   │   ├── instance // 個別のサーバーの、サーバー/ディスク/DNSレコードの作成 -│   │   └── service-dns // roleごとに、DNSレコードがある場合(VIPに紐づくレコードなど) -│   ├── dns // さくらのクラウドのドメイン/DNSレコードを管理するために利用 -│   │   ├── dns.tf -│   │   └── example -│   │   ├── example.tf -│   │   └── output.tf -│   ├── gslb // さくらのクラウドのGSLBを管理するために利用 -│   │   ├── api -│   │   │   └── api.tf -│   │   └── gslb.tf -│   ├── network // さくらのクラウドのスイッチ/ルーターを管理するために利用 -│   │   ├── internal -│   │   │   ├── internal.tf -│   │   │   └── output.tf -│   │   ├── network.tf -│   │   └── output.tf -│   └── simple-monitor // さくらのクラウドのシンプル監視を管理するために利用 -│   └── simple_monitor.tf -└── providers - └── sakuracloud - └── pod-xxx // システム単位ごとに作る - ├── pod-xxx.tf // compute.tf, dns.tf, ... などのモジュールごとのエントリーポイントへ変数を渡す - ├── terraform.tfstate.d // tfstate。env (今で言うworkspace) で本番と検証環境をわけてる。 - │   ├── dev - │   └── ... - └── terraform.tfvars // 変数をひたすら書く。具体的な値は全てここに書かれているはず。 -``` - -大体はさくらのクラウドのコンポーネントごとに、moduleを作っているのですが、compute のところは大きく変更しています。 -サーバー作成と同時に、ディスクの作成や、DNSレコードの作成を行うためです。 - -例えば、role-hoge というロールが2台あるとき、tfvar中では以下のような変数を作っています。 - -``` -sakuracloud_dns_foo = { - dev.zone = "dev.example.com" - staging.zone = "staging.example.com" -} - -sakuracloud_role_hoge = { - dev.ipaddresses = ["192.168.0.10", "192.168.0.11"] - dev.server_tags = ["hoge", "develop", "__with_sacloud_inventory", "starred"] - dev.disk_tags = ["hoge"] - staging.ipaddresses = ["192.168.1.10", "192.168.1.11"] - staging.server_tags = ["hoge", "staging", "__with_sacloud_inventory", "starred"] - staging.disk_tags = ["hoge"] -``` - -これを使って、dev環境でサーバー作成したとき - -* サーバー名をFQDNに一致させる - * `hoge-01.dev.example.com`, `hoge-02.dev.example.com` -* DNSレコードも合わせて作成する - * Aレコードとして `hoge-01.dev.example.com` は192.168.0.10, `hoge-02.dev.example.com` は192.168.0.11 に対応させる -* サーバータグとして、ansibleのroleをつける - * `hoge`, `develop`, `staging` がansible側で利用しているロール名です -* サーバータグとして、 `__with_sacloud_inventory` をつける - * 一応、terraform 管理外のリソースを許すためにつけています -* サーバータグとして、 `@group=a` などのグループタグをつける - * 1つ目のサーバーはa、2つ目はb、...4つ目はd、5つ目はaなどとしています - -### 既存リソースをterraformにimport - -既存のリソースをインポートします。形式としては、以下のような形式です。 - -``` -terraform import 'module.hoge.module.base-instance.sakuracloud_server.base[0]' _リソースID_ -``` -注意点としては、tfファイルを書いたあと、terraform planすれば、何をインポートしないといけないかわかるのですが、 -その表示では、`module.hoge.base-instance.sakuracloud_server.base[0]` というように、途中にmoduleがない形式で表示されます。 import するには都度moduleを書く必要があります。 - -また、さくらのクラウドにはリソースIDがないけど、terraform で管理できるものがあります。例えばDNSレコードがそうです。 -この場合、リソースIDに当たるものを自分で作成する必要があります。 -どのように生成するかは、 terraform for さくらのクラウドのソースを見ればよいのですが、参考までにgolangで生成する例を載せておきます。 -https://play.golang.org/p/OvQw6BdxVf - -### ansible の dynamic inventory のスクリプト作成 - - - -上記のような`sacloud_inventory.py`スクリプトをansibleのリポジトリに実行権限をつけて用意しています。 -それにより、 `ansible-playbook -i sacloud_inventory.py ...` とすることで、インベントリファイルを書くことなくansibleを実行できます。 - -このスクリプトで、さくらのクラウドのAPIを叩くところはすべて、 [usacloud](https://github.com/sacloud/usacloud) におまかせしています。 -先程の terraform の例であったように、 `__with_sacloud_inventory` が入っていないものは全部無視し、タグは全てグループ名にすることにしています。 -(13-22行目は、[Ansible TowerのOSS版であるAWX](https://github.com/ansible/awx) を試しているために入れています。) - -もしかしたら、さくらのクラウドの特殊タグである `@group=a` などは除いた方が使いやすいかもしれませんが、監視側からも見るために現状はすべて入れています。 - -## ansible 側の準備 - -`ansible-playbook -i sacloud_inventory.py site.yml --check` をしたいのですが、しばしば check modeで実行できていないplaybookや、変更がないのにchangedにしているplaybookがあります。これを直しましょう。 -check modeで実行できていない、典型的なものとしては以下のようなものがあります。 - -### 別のtaskの実行結果を参照している -register を使っているタスクAの結果を参照しているタスクBがある場合、check mode 中でAが実行されないため、タスクBのcheck実行時に変数が参照できないエラーが出ます。 -これを防ぐには、register を使っているタスクAに `check_mode: no` をつけることです。 -check modeでも本当に実行されるようになるため、例えば、ファイルの存在だけを確認している場合など、副作用がない場合のみ、 `check_mode: no` をつけましょう。 - -### check modeに対応していない(特にshellモジュール) -実行する判断を行うようなタスクを作って、その結果次第で、タスクを実行するように書き換えます。 -新しく作成したタスクでは、上述の通り副作用がないようにし、 `check_mode: no` をつけましょう。 - -### 補足: DNSゾーンファイルの更新 - -今回、check modeで実行可能にするためにplaybookをみなしていると、ansible で更新されていないものとして、template指定されたDNSゾーンファイルがありました。 -ゾーンファイルは、シリアルを増やしていく必要があるため、面倒だったのだと思います。 - -確かに、言われるとめんどくさいような気もしますが、やってみると以下のようにすれば良さそうです。 - -1. 現在のzone fileを見て、現在の serial を取り出し、registerで変数に入れる -2. template ファイルに、 1.で取ったserialを入れて、差分があるかどうかを確かめる -3. もし、2.で差分があったら serialをインクリメントした上で、template を実行する - -実際に書いてみると以下のようになると思います。(NSDを利用した場合の例) - -``` -server: - port: 10053 - zonesdir: "/etc/nsd/zones" - -{% for zone in dns.zones %} -zone: - name: "{{ zone }}" - zonefile: "{{ zone }}" - -{% endfor %} -``` - -``` -- block: - - name: parse serial from zone file - shell: grep ";Serial" /etc/nsd/zones/{{ item }} | awk '{print $1}' - with_items: "{{ dns.zones }}" - register: old_serials - check_mode: no - changed_when: no - tags: nsd - - name: check whether zone files updated or not - template: src=zones/{{ item.1 }}.j2 dest=/etc/nsd/zones/{{ item.1 }} owner=root group=root mode=0644 - vars: - serial: "{{ old_serials.results[item.0].stdout }}" - with_indexed_items: "{{ dns.zones }}" - diff: no - register: zonefiles_changed - tags: nsd - - name: update zonefile when changed - template: src=zones/{{ item.1 }}.j2 dest=/etc/nsd/zones/{{ item.1 }} owner=root group=root mode=0644 - vars: - serial: "{{ old_serials.results[item.0].stdout|int + 1 }}" - when: zonefiles_changed.results[item.0].changed - with_indexed_items: "{{ dns.zones }}" - notify: reload nsd - tags: nsd - -``` - -## 定期的な差分チェック - -ここまでくれば、あとはcronなりJenkinsで、`terraform plan` と `ansible-playbook -i sacloud_inventory.py site.yml --check` を定期的に走らせて、差分があったらslackなりに通知すればオッケーです。 -Jenkinsからapplyするようにしておけば、より良いと思います。 - - -## 感想と今後に向けて - -ここではインフラのデプロイをどのように改善してきたのかを書きました。 -usacloud や Terraform for さくらのクラウドがあるおかげで、規模が大きくなっても楽に管理できている実感があります。 -実際、雑に自前スクリプトを書いていたものも捨てていっているところです。 - - -この記事で書いたようにインフラの整合性を確かめることができるようになったので、今後としては、 - -* (ansibleの実行を [AWX](https://github.com/ansible/awx) で行う(だいたいできた) ) -* インフラ/アプリケーションのCDを行うための監視改善。特に node/service discovery改善 -* アプリケーションのCD -* terraform, ansible の自動適用 -などを目標に改善活動を行っていく予定です。 - diff --git a/content/diary/2018/20180205_gcp_pubsub_golang.md b/content/diary/2018/20180205_gcp_pubsub_golang.md deleted file mode 100644 index e5a2936a..00000000 --- a/content/diary/2018/20180205_gcp_pubsub_golang.md +++ /dev/null @@ -1,45 +0,0 @@ -Title: Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ -Date: 2018-02-05 20:09 -Category: blog -Tags: GCP, golang - -[TOC] - -# 概要 - -[Google Pub/Sub](https://cloud.google.com/pubsub/overview?hl=ja) を [GoのSDK](https://github.com/GoogleCloudPlatform/google-cloud-go) から使おうとしていました。 -やっているといくつか詰まったので、メモしておきます。 - -1. サービスアカウントを利用するためにCredentials JSONを指定する -2. サブスクリプションの `Pub/Sub サブスクライバー権限` を与えても Permission Denied になる - -## サービスアカウントを利用するためにCredentials JSONを指定する - -権限の都合上、サービスアカウントのCredentials JSONを利用して認証したい、という要件がありました。 -ドキュメントを見ていると、 [ADC(Application Default Credentials)](https://cloud.google.com/docs/authentication/production?hl=ja) を利用して認証している場合が多いです。 -これを使う場合、 `GOOGLE_APPLICATION_CREDENTIALS` という環境変数が設定されていれば、そのファイルを読んでくれるのですが、今回の要件では複数の Credentials を利用したかったので、Go プログラム中で指定する必要がありました。 - -結論としては、以下のような形でpubsub client を作るときに認証情報を渡すことができます。 - -``` - jsonKey, err := ioutil.ReadFile(credentialJSONPath) - conf, err := google.JWTConfigFromJSON(jsonKey, pubsub.ScopePubSub, pubsub.ScopeCloudPlatform) - if err != nil { - log.Fatal(err) - } - ctx := context.Background() - ts := conf.TokenSource(ctx) - c, err := pubsub.NewClient(ctx, projectID, option.WithTokenSource(ts)) -``` - -Publisherのサンプルは以下の通りです。 - - - -## サブスクリプションの `Pub/Sub サブスクライバー` 権限を与えても Permission Denied になる - -結論としては、 `Pub/Sub サブスクライバー` 権限に加えて、 `Pub/Sub 閲覧者` の権限が必要でした。 -ドキュメント上は、 `Pub/Sub サブスクライバー` 権限だけで良さそうに見えますが、権限不足だったようでした。 -Subscriberのサンプルは以下の通りです。 - - diff --git a/content/diary/2018/20180405_pypi_package_upload.md b/content/diary/2018/20180405_pypi_package_upload.md deleted file mode 100644 index dcf46dfd..00000000 --- a/content/diary/2018/20180405_pypi_package_upload.md +++ /dev/null @@ -1,88 +0,0 @@ -Title: PyPIへパッケージをアップロードする -Date: 2018-04-05 14:20 -Category: blog -Tags: pypi, python - -[TOC] - - -# 資料 - -* パッケージ構成については [github.com/pypa/sampleproject](https://github.com/pypa/sampleproject) -* https://pypi.python.org/pypi/twine -* https://packaging.python.org/tutorials/distributing-packages/ - -# 手順 - -## PyPIへユーザー登録する - -PyPI には普段使われている本番環境とは別に、テスト環境がある。 -アカウントがそれぞれ独立しているので、両方で作成する必要がある。 - -* [PyPI](https://pypi.org/) -* [PyPI Test](https://test.pypi.org/) - -## `.pypirc` の作成 - -以下のように `~/.pypirc` を作成して、test 環境を利用できるようにしておく。 -平分でパスワードを書くことになるので、最低限パーミッションを変えておくことにする。 - -``` -$ cat ~/.pypirc -[distutils] -index-servers = - pypi - testpypi - -[pypi] -repository=https://upload.pypi.org/legacy/ -username=_username_ -password=_password_ - -[testpypi] -repository=https://test.pypi.org/legacy/ -username=_username_ -password=_password_ - -$ chmod 0600 ~/.pypirc -``` - -## パッケージのアップロード - -### コマンドのインストール - -``` -$ pip install twine -``` - -### パッケージング前のチェック - -``` -$ pip install check-manifest -$ check-manifest -``` - -### パッケージング - -``` -$ pip install wheel -$ python setup.py sdist bdist_wheel -``` - -### Test 環境へアップロード - -``` -$ twine upload -r testpypi dist/* -``` - -pip でインストールするには、以下のようにする。 - -``` -$ pip install --index-url https://test.pypi.org/simple/ _package_ -``` - -### 本番へアップロード - -``` -$ twine upload dist/* -``` diff --git a/content/diary/2018/20180411_snappy_with_zsh.md b/content/diary/2018/20180411_snappy_with_zsh.md deleted file mode 100644 index 48853055..00000000 --- a/content/diary/2018/20180411_snappy_with_zsh.md +++ /dev/null @@ -1,91 +0,0 @@ -Title: Debian でログインシェルをzshにしている人が snappy を使う場合の注意 -Date: 2018-04-11 10:58 -Category: blog -Tags: debian,snappy,zsh - -[TOC] - -## Snappy について - -* [Snappy](https://www.ubuntu.com/desktop/snappy) -* [snapcraft](https://snapcraft.io/) - -Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。 -ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。 -その分、sidを使っているとよく起きる、共通ライブラリの依存バージョンの不整合がおきる、という問題は起きない。 - -snapcraftのページではパッケージングの方法も紹介されているので、配布したい人自身がsnapパッケージを作りやすいはず。 -少なくとも、ディストーションごとのパッケージを各アプリケーション作成者がやるよりは、遥かにやりやすい。 -自動アップデートとかもあるので、サービス提供者が利用者に常に最新版を使ってもらいたい場合などにメリットもある。 -実際、 Ubuntu以外にも、Debian, Arch Linux, Gentoo, Fedora, open SUSE などでも利用できる。 - -Snappy は、snapd というAPIデーモンが動くことになっている。 - -### snappy のインストール - -```sh -$ sudo apt install snapd -``` - -### snap パッケージのインストール - -```sh -$ sudo snap install hello-world -``` - -## 困ったこと - -* Snappy でインストールしたアプリケーションへのパスが通らない -* Snappy でインストールしたデスクトップアプリケーションが、menuに登録されない - -## 調べたこと - -### バージョン - -Kernel はpinningしているので、少し古い。 - -```sh -$ snap version -snap 2.32.3 -snapd 2.32.3 -series 16 -debian -kernel 4.9.0-3-amd64 -``` - -### snappy でインストールした場合のパス - -* 実態はバージョンごとに、 `/snap/_app_name_/_version_/` 以下に置かれる。現在利用しているものへのリンクは `/snap/_app_name_/current/` -* コマンドは、 `/snap/bin/` 以下にコピーされる。 -* デスクトップエントリのファイルは `/var/lib/snapd/desktop/applications/*.desktop` というファイルが作成される - -### パスの設定方法について - -`/etc/profile.d/apps-bin-path.sh` にパスを設定するためのスクリプトが置かれている。 - -```sh -$ cat /etc/profile.d/apps-bin-path.sh -#!/bin/sh --this-shebang-is-just-here-to-inform-shellcheck-- - -# Expand $PATH to include the directory where snappy applications go. -if [ "${PATH#*/snap/bin}" = "${PATH}" ]; then - export PATH=$PATH:/snap/bin -fi - -# desktop files (used by desktop environments within both X11 and Wayland) are -# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for -# snappy applications' desktop files. -if [ "${XDG_DATA_DIRS#*/snapd/desktop}" = "${XDG_DATA_DIRS}" ]; then - export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:/var/lib/snapd/desktop" -fi -``` - -zsh では `/etc/profile` などを読まないので、パスが設定できていない。 -`/etc/zsh/zprofile` に、上記の内容を書いて置けば良い。 -あるいは、 `/etc/zsh/zprofile` で以下のようにする。 - -```sh -for i in /etc/profile.d/*.sh ; do - [ -r $i ] && source $i -done -``` diff --git a/content/diary/2018/20180608_gcp_dataflow.md b/content/diary/2018/20180608_gcp_dataflow.md deleted file mode 100644 index cdeae866..00000000 --- a/content/diary/2018/20180608_gcp_dataflow.md +++ /dev/null @@ -1,14 +0,0 @@ -Title: Dataflow を使うときのメモ -Date: 2018-06-08 15:49 -Category: blog -Tags: gcp,dataflow -Status: draft - -[TOC] - -## 役に立った資料 - -* [Apache Beam](https://beam.apache.org/documentation/programming-guide/) -* Guide to common Cloud Dataflow use-case patterns - * [Part1](https://cloud.google.com/blog/big-data/2017/06/guide-to-common-cloud-dataflow-use-case-patterns-part-1) - * [Part2](https://cloud.google.com/blog/big-data/2017/06/guide-to-common-cloud-dataflow-use-case-patterns-part-2) diff --git a/content/diary/2018/20181031_luajittex.md b/content/diary/2018/20181031_luajittex.md deleted file mode 100644 index 4c4c8d54..00000000 --- a/content/diary/2018/20181031_luajittex.md +++ /dev/null @@ -1,121 +0,0 @@ -Title: DebianでLuaJITTeXを使いたい -Date: 2018-10-31 19:01 -Category: blog -Tags: tex,debian - -[TOC] - - -そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。 - -## 参考 - -* [luajittex のセットアップ](http://www.fugenji.org/~thomas/texlive-guide/luajitlatex.html) - * そもそもこのサイトの情報が有用 [TeX Live を使おう──主に Linux ユーザのために──](http://www.fugenji.org/~thomas/texlive-guide/index.html) - - -## 未解決の問題 - -* `/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST` が自動生成されている、とコメントされているが、元ファイルがわからない -``` -### This file was automatically generated by update-fmtutil. -# -# Any local change will be overwritten. Please see the documentation -# of updmap on how to override things from here. -# -### -``` - -## 準備 - -パッケージインストール - -```sh -sudo apt install texlive-lang-japanese texlive-latex-extra texlive-luatex -# 参考文献とか書くとき -sudo apt install texlive-bibtex-extra biber -``` - -`/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST` を編集したい。(未解決の項目に書いた通り、元ファイルがわからないので直接編集している) - -```diff -@@ -6,7 +6,7 @@ - ### - dviluatex luatex language.def,language.dat.lua dviluatex.ini - etex pdftex language.def -translate-file=cp227.tcx *etex.ini --#! luajittex luajittex language.def,language.dat.lua luatex.ini -+luajittex luajittex language.def,language.dat.lua luatex.ini - luatex luatex language.def,language.dat.lua luatex.ini - mf mf-nowin - -translate-file=cp227.tcx mf.ini - pdfetex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini -@@ -14,7 +14,7 @@ - tex tex - tex.ini - dvilualatex luatex language.dat,language.dat.lua dvilualatex.ini - latex pdftex language.dat -translate-file=cp227.tcx *latex.ini --#! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini -+luajitlatex luajittex language.dat,language.dat.lua lualatex.ini - lualatex luatex language.dat,language.dat.lua lualatex.ini - mptopdf pdftex - -translate-file=cp227.tcx mptopdf.tex - pdflatex pdftex language.dat -translate-file=cp227.tcx *pdflatex.ini -``` - -## 使い方 - -```sh -luajittex --fmt=luajitlatex.fmt {tex file} -``` - -問題なくコンパイルできれば、pdfが生成されるはず。 - -## VSCodeでTeXする - -[LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) をインストールして、以下の設定をする。 -参考文献が必要なときは、 `luajittex_with_bib` のレシピでビルドするように書いている。 - -```json -{ - "latex-workshop.chktex.enabled": true, - "latex-workshop.latex.recipes": [ - { - "name": "luajittex", - "tools": ["luajitlatex"] - }, - { - "name": "luajittex_with_bib", - "tools": [ - "luajitlatex", - "biber", - "luajitlatex", - "luajitlatex" - ] - }, - ], - "latex-workshop.latex.tools": [ - { - "name": "luajitlatex", - "command": "luajittex", - "args": [ - "--cmdx", - "--synctex=1", - "--fmt=luajitlatex.fmt", - "%DOCFILE%" - ] - }, - { - "name": "biber", - "command": "biber", - "args": [ - "%DOCFILE%" - ] - } - ], - "latex-workshop.intellisense.surroundCommand.enabled": true, - "latex-workshop.synctex.afterBuild.enabled": true, -} -``` - -## その他実際のTeXを書く時に参考になりそうなもののメモ - -* 参考文献まわり - * [BibTeXの書誌情報の書き方知りたいとき: Wikipedia](https://ja.wikipedia.org/wiki/BibTeX#.E6.9B.B8.E8.AA.8C.E6.83.85.E5.A0.B1.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB) - * 参考文献を探したい時: Google Scholar diff --git a/content/diary/2018/20181130_retire.md b/content/diary/2018/20181130_retire.md deleted file mode 100644 index e08c5f98..00000000 --- a/content/diary/2018/20181130_retire.md +++ /dev/null @@ -1,89 +0,0 @@ -Title: さくらインターネットを退職しました -Date: 2018-11-30 09:13 -Category: blog -Tags: -Status: draft - -[TOC] - -本日最終出社日です。 - -## さくらインターネットでやったこと - -さくらインターネットではIoT向けのサービスの開発、チームのリーダーをやっていました。 -動き方としては、エンジニアリング100%というよりは、企画やチームマネジメントの割合が多かったように思います。 -チームに参加したときにはリーダーではなかったのですが、サービスに必要そうなことをやっていたら、いつの間にかリーダーをやる感じになっていた感じです。 - -簡単なところでいうと、例えばwebページの閲覧数がモニタリングされていなかったり、サービス上のビジネスとして重要な指標が計測できていなかったりしたので、ダッシュボードを作ったり、実際に見て、ボトルネックに対する仮説を立てて、改善するための開発計画を立てるなどしていました。 - -あと印象的なこととして、さくらのオブジェクトストレージが障害になったときにヘルプに行ったことがありました。 -オブジェクトストレージのチームとはかなり離れた立ち位置でしたが、長期化し始めていたこともあり、ドキュメントを深夜に読み漁り、翌日復旧しにチームの席に乗り込んだことはよく覚えています。 -色々ログイン権限をもらって調査すると、障害の直接的な要因は1日使って理解できたので、すぐ復旧の目処は立ちました。 -ただ、オブジェクトストレージのようなシステムは障害の直接原因を取り除いても完全復旧までは時間がかかるもので、そのあたりはチームの方にお任せしてしまった感じです。 -また、他のチームに行くと、監視項目について気になることがあったりするもので、復旧作業の合間にフィードバックや、監視設定の追加などしていました。 - -おそらく、このあたりの活動を見ていただいたのか、その年のベストエンジニア賞(4人いた)の社内表彰をいただきました。 - -## さくらインターネットの働く環境 - -最近、NTT退職エントリが盛り上がっていて、働く環境についての不満をtwitterでよく見るので、 -さくらインターネットの環境を紹介しておきます。 - -結論から言うと、さくらインターネットの働く環境は非常に自由でした。 - -以下で書く、オフィスの設備の話は、さくらインターネットの東京支社24Fでの話です。 -オフィスの設備については、拠点ごとにかなり違いますし、もしかしたら階によっても色々違うかもしれません。 -PCやディスプレイ、勤務形態などはどの拠点でも共通だと思います。 - -### PC - -PCは入社前にヒアリングされ、 T460s のメモリを最大にしてもらったものを購入いただきました。 -全社共通の標準的なメニューもありましたが、エンジニアは結構個別に購入している方が多いように思いました。 -Macユーザーも多かったです。 - -情シスのほうで初期設定なども行っていただけるようだったのですが、私はLinuxにしたかったので、自分でLinuxに入れ替えました。 -Linuxに変えることも情シスから許可をもらえましたし、社内システムもLinuxでも問題なく動いていました。 - -PC環境としては非常に良かったです。 - -### ディスプレイ - -ディスプレイは2台申請したらちゃんと同じ型番のディスプレイを2台頂けました。 -自分は2枚のほうが好きなので使っていませんでしたが、大きい4Kのディスプレイを1枚申請するスタイルの方もいるようです。 - -### オフィスの設備: ネット環境 - -また、ネット環境についていうと、プロキシなどはありませんし、有線も速度が出るため非常に良かったです。 -参考までに、私の自席での実測値は以下の通りです。 - -* Wi-Fi: 上り下りとも、20Mbps前後 - - -* 有線: 下り700Mbps↑、上り900Mbps↑程度 - - -有線を使っていれば、自宅と同程度のネット環境なので、特に不満はありませんでした。 - -### オフィスの設備: 椅子 - -椅子は詳しくないけど、椅子にOKAMURAって書いてあるし、見た感じ[コンテッサ セコンダ](http://www.okamura.co.jp/product/seating/contessa_seconda/)っぽい。座り心地良い。 - -机はなんて言って説明して良いのかわからない。1人あたりの専有スペース広め。 -自分はこだわりもないし、高さもちょうどよかったので不満はなかった。 - -### 勤務形態 - -働く場所についてもリモート勤務でOKですし、勤務時間についてもスライドできるため、 -私はかなりの割合で自宅勤務をしていました。 -このあたりの制度は[さぶりこという制度](https://www.sakura.ad.jp/corporate/corp/sabulico/)になっています。 -自分以外にも結構使っている人が多いように見えるので、特に使いづらいということはないはずです。 - -東京で採用されて地方へ帰るといった場合の補助もありますし、他の会社では見ない制度だと思います。 -たまにこの制度にメニューが増えるのですが、増えるものも人事部が自ら率先して作っているようで、人事部すごいなと思っていました。 - -## これから - -特に休みなく、12月からは次の会社で働きます。 -GAFAではありません。 - -次の会社で落ち着いたら所属先はどこかに書くと思います。 diff --git a/content/diary/2018/20181211_elasticsearch.md b/content/diary/2018/20181211_elasticsearch.md deleted file mode 100644 index 1ea1dade..00000000 --- a/content/diary/2018/20181211_elasticsearch.md +++ /dev/null @@ -1,89 +0,0 @@ -Title: Elasticsearch のメモ -Date: 2018-12-11 09:13 -Category: blog -Tags: -Status: draft - -## 資料 - -* [Elasticsearch Reference](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) -* [Designing the Perfect Elasticsearch Cluster: the (almost) Definitive Guide](https://thoughts.t37.net/designing-the-perfect-elasticsearch-cluster-the-almost-definitive-guide-e614eabc1a87) -* [Elasticsearch: The Definitive Guide](https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html) -* [ElasticsearchのShrink APIを検証した](http://acro-engineer.hatenablog.com/entry/2018/03/27/120000) - -## Node Type - -`node.master`, `node.data`, `node.ingest` あたりで決まる。 - -* Master-eligible node: master only -* Data node: data only -* Ingest node: ingest true -* Tribe node: `tribe.* settings` で指定されるやつだけど、廃止予定なので知らなくて良い。 - * [Cross cluster search](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cross-cluster-search.html) を見たほうが良い -* coordinator: all false - -## Index - -ESの `index` は複数の `shard` から成る。 -ES shard = Lucene index で、 Lucene index は複数のsegment から成る。 -Lucene はすべての segment を sequencial に検索する(segment ごとに並列ではない)ので、 -たくさん segment があると遅くなる。 -segment のマージは、だいたい重い。 - -## routing key - -* https://www.elastic.co/blog/customizing-your-document-routing -* https://medium.com/hello-elasticsearch/elasticsearch-f17e9134deb6 - -通常、ドキュメントIDをもとにshardが決定されるが、 -routing key を使うことで、 routing key をもとに shard が決まるようになる。 - -routing key を指定する方法としては、 -* routing parameter - * 保存するときにも指定が必要 -* field - * mapping 定義に書く - -## search optimization - -https://www.ebayinc.com/stories/blogs/tech/elasticsearch-performance-tuning-practice-at-ebay/ - - -## write heavy - -* https://www.elastic.co/guide/en/elasticsearch/reference/master/tune-for-indexing-speed.html - * bulk request で multi thread でやる - * `TOO_MANY_REQUESTS (429)` response codes 返ってきたら待つ - * `index.refresh_interval` - * 1sec ごとにsegment を作っているのを伸ばす - * 当然 refresh 時のsegment mergeは重くなる - * disabling swapping - * filesystem cache 分のメモリも確保する - * Use auto-generated ids - * id 指定すると、重複チェックする分で遅くなる - * `indices.memory.index_buffer_size` - * disable `_filed_names` field - -* [Gist: ElasticSearch config for a write-heavy cluster](https://gist.github.com/reyjrar/4364063): 参考程度 - * - - -## ESのメトリック監視 - -## その他設計話 - -* sizing - * at 30GB heap, 700 shard/node - * related settings - * `number_of_shards` - * `number_of_replica` - * related api - * [`{index}/_close`, `/{index}/_open`](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html) -* segment - * merge scheduling - * related settings - * `max_thread_count` - * related api - * [`{index}/_forcemerge`](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html): should only be called against read-only indices -* `include_type_name` - * 1 index内に複数のタイプを入れることができなくなりデフォルトで、 `include_type_name=false` になる予定らしいので、入れたほうが良さそう diff --git a/content/diary/2018/20181219_certbot_cloudflare.md b/content/diary/2018/20181219_certbot_cloudflare.md deleted file mode 100644 index a9804a85..00000000 --- a/content/diary/2018/20181219_certbot_cloudflare.md +++ /dev/null @@ -1,41 +0,0 @@ -Title: cloudflare dns を利用したlet's encrypt の証明書更新 -Date: 2018-12-19 20:13 -Category: blog -Tags: -Status: draft - -## やること - -プライベートなサーバーの名前解決に Cloudflare のDNSを利用しています。 -この状況で、証明書が欲しくなったので、certbot を使ってLet's Encrypt の証明書を利用できるようにします。 - -## 証明書発行 - -``` -$ sudo cat /opt/certbot-cloudflare/cf.ini -dns_cloudflare_email = -dns_cloudflare_api_key = -$ docker run -it --rm -v /opt/certbot-cloudflare/cf.ini:/tmp/cf.ini:ro -v /etc/letsencrypt:/etc/letsencrypt --name certbot-dns-cloudflare certbot/dns-cloudflare renew --dns-cloudflare --dns-cloudflare-credentials /tmp/cf.ini -d _domain_ -# いろいろ入力する -``` - -## crontab で証明書更新する -``` -$ cat /etc/cron.d/certbot-dns-cloudflare -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -* * */10 * * root docker run -it --rm -v /opt/certbot-cloudflare/cf.ini:/tmp/cf.ini:ro -v /etc/letsencrypt:/etc/letsencrypt --name certbot-dns-cloudflare certbot/dns-cloudflare certonly --dns-cloudflare --dns-cloudflare-credentials /tmp/cf.ini -d _domain_ -``` - -## docker daemon をTLSにしてみる -``` -$ cat /etc/systemd/system/docker.service.d/override.conf -[Service] -Environment="DOCKER_NETWORK_OPTIONS=--dns 1.1.1.1" -ExecStart= -ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2376 --tlsverify --tlscacert "/etc/letsencrypt/live/_domain_/chain.pem" --tlscert "/etc/letsencrypt/live/_domain_/cert.pem" --tlskey "/etc/letsencrypt/live/_domain_/privkey.pem" - -$ sudo systemctl daemon-reload -$ sudo systemctl restart docker.service -``` \ No newline at end of file diff --git a/content/diary/2019/20190125_cloudformation_drift.md b/content/diary/2019/20190125_cloudformation_drift.md deleted file mode 100644 index 1483dca7..00000000 --- a/content/diary/2019/20190125_cloudformation_drift.md +++ /dev/null @@ -1,60 +0,0 @@ -Title: CloudFormation の不満点 -Date: 2019-01-25 14:54 -Category: blog -Tags: aws, cloudformation - -[TOC] - - -以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。 - -## 要点 - -* CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない -* Drift 検出は誤検出が多すぎて使いづらい -* Change Set は動いている状態との差分を見ていないので、信用できない - -## 経緯 - -CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。 -ただ、各サービスの担当者ごとにある程度自由にオペレーションできるため、手動で変更されていないか、一応調べておこうと思い、 -[2018-11 にリリースされたドリフト検出](https://aws.amazon.com/jp/blogs/news/new-cloudformation-drift-detection/) を使って、 -手作業で実施された変更点もCloudFormationに取り込みつつ、対応しようとした。 - - -## 期待したこと - -* CloudFormation のスタックがたくさんあるため、1つ1つ細かく差分を見て修正することが難しい -* ドリフト検出されたところだけ1つずつ修正していって、Change Setを作りながら現状に合わせたい - -## 実際 - -### ドリフト検出 - - -* サポートされるリソースが少ない - * [Resources that Support Drift Detection](https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html) -* そもそも誤検出が多い - * [Detecting Unmanaged Configuration Changes to Stacks and Resources](https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html?shortFooter=true#drift-considerations) - * LBのプロパティなど、配列で定義されるところをデフォルト値で埋められただけで、ドリフトが検出される - * エッジケースの(とAWSが主張している)誤検出に該当するのか、目で見て考える以外の方法がない - -### Change Set - -* 実際に動いているシステムとの差分を見ていない - * 前回の設定とのスタックの差分を見ている -* 手作業で変更されているとChange Setの実行に失敗する(実際には差分がないので) - * その場合 Update Stack するしかない - -例えば、手作業でタグを増やしたとして、翌営業日にCloudFormationに反映したい、と思った場合、 -ドリフト検出で誤検知を目でフィルタしつつ(誤検知だと確信が持てるかはわからない)、 -CloudFormation のパラメータを書き換えて、Update Stackしないといけない。 -(一応、Update Stack 前に Change Set で差分を見て、execute して失敗することを確認したほうが安心感はある。) - - -## まとめ - -手作業の変更をできないようにしておく以外にない。 -あるいは、本格的にCloudFormationを利用し始めるまでの間に Terraform に移行する。 - -(なんでChange SetをRunnning Stateとの比較にしなかったんだろう...) diff --git a/content/diary/2019/20190212_python_yaml.md b/content/diary/2019/20190212_python_yaml.md deleted file mode 100644 index ab3d625f..00000000 --- a/content/diary/2019/20190212_python_yaml.md +++ /dev/null @@ -1,55 +0,0 @@ -Title: Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった -Date: 2019-02-12 16:30 -Category: blog -Tags: python,yaml - -[TOC] - - -## 資料 - -* [Document: ruamel.yaml](https://yaml.readthedocs.io/en/latest/) -* [Repository: ruamel.yaml](https://bitbucket.org/ruamel/yaml/) - -## 背景 - -とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。 -sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。 - -* コメントは消したくない -* ブロックスタイルのままにしたい -* diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒) - -## ruamel.yaml - -python で yaml を扱うときは、PyYAML が有名だと思う。 -PyYAMLを使う場合、yamlをloadしてdumpすると、フロースタイルなのは変更できるが、 -コメントは消えてしまうのに対応するのが簡単ではない(と思っている)。 - -ruamel.yaml はPyYAMLをフォークしたもので、YAML 1.2 をサポートしているし、コメントやスタイル、キーの順番を保つloaderが実装されている。 -https://yaml.readthedocs.io/en/latest/overview.html - -### 使い方 - -使い方としては、 load, dumpの代わりに、 `round_trip_load`, `round_trip_dump` を使えば良い。 -オプションは自分が使っているconfigに合わせて使えば良い。 - -```python -import ruamel.yaml -import os - -def process(filepath): - with open(filepath, 'r+') as f: - data = ruamel.yaml.round_trip_load(f, preserve_quotes=True) - # 必要な処理をする - # data["foo"] = "bar" - if rewrite: - f.seek(0) - ruamel.yaml.round_trip_dump(data, f, explicit_start=True) - f.truncate() - -for pathname, dirnames, filenames in os.walk('.'): - for filename in filenames: - print(f"{pathname}/{filename}") - process(f"{pathname}/{filename}") -``` diff --git a/content/diary/2021/20211012_awscli_with_1password.md b/content/diary/2021/20211012_awscli_with_1password.md deleted file mode 100644 index eac1922d..00000000 --- a/content/diary/2021/20211012_awscli_with_1password.md +++ /dev/null @@ -1,44 +0,0 @@ -Title: 1Password CLIを使ってTOTPを取得する -Date: 2021-10-12 01:00 -Category: blog -Tags: aws, 1password - -[TOC] - -2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。 -TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。 -ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。 - -## 1Password CLIの初期設定 - -1Password CLI を利用できるようにする。 -[1Password CLIのGetting Started](https://support.1password.com/command-line-getting-started/)を見て、初期設定する。 - -```sh -$ op signin _1password_url_ _signin_address_ -... # Secret Key, Password, (設定していればTOTPの6-digit)を聞かれる -``` -短縮形が `_1password_url_` から自動的に決まるが、どうしても指定したい場合には、 `--shorthand`オプションで指定する。 - -## TOTPの取得 - -通常の1password appのように、30minアクセスがなければ、ロックされるため、パスワードの入力が必要。 -1passwordのURLが `example.1password.com` であれば、 -```sh -$ eval $(op signin example) -``` -として、再認証する。 -環境変数 `OP_SESSION_example` に認証したときのsession情報が載る。(`--session` オプションで各コマンドごとに渡しても良い) - -TOTPを取得するには、以下のコマンドを実行する。 -```sh -$ op get totp "UUID or Name" -``` -UUIDで指定したい場合には、 `op list items --categories Login` の結果をjqなどで調べて、取得する。 - -## 終わり - -以上で概ねやりたかった、CLIでTOTPを取得することができるようになった。 -最近1PasswordはLinux Desktop向けのアプリを出していたりしているので、もう少し真面目に使っていきたい所存。 - -ちなみに、複数のプロファイルの切り替えなどで便利なように、 [99designs/aws-vault](https://github.com/99designs/aws-vault)というのもあるらしいが、特に使わずに自前シェルスクリプトで使っている。 \ No newline at end of file diff --git a/content/diary/2021/20211012_delete_cfn_stack_safely.md b/content/diary/2021/20211012_delete_cfn_stack_safely.md deleted file mode 100644 index 6e04d45f..00000000 --- a/content/diary/2021/20211012_delete_cfn_stack_safely.md +++ /dev/null @@ -1,87 +0,0 @@ -Title: CloudFormation Stackを安全に削除する -Date: 2021-10-12 02:00 -Category: blog -Tags: aws, cloudformation - -[TOC] - -以前、[CloudFormation の不満点]({filename}/diary/2019/20190125_cloudformation_drift.md) というのを書いたが、諦めて大半のCfnをterraformに移行した。 -その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。 - -## 概要 - -アイデアは簡単で以下の通り。 - -1. cfn の操作のみが許可されているIAM roleを作成する -2. 上記roleを指定して cfn stackをdeleteする - -## モチベーション - -そもそも以前の記事でも、予期せぬ手作業の変更があった場合に、ドリフト検出やChange setで検出・対応が難しいことを問題としていた。 -cfn stackを削除しようと思った場合、ドリフトしている状態だと、単純には削除できない。一旦cfn updateすれば簡単かもしれないが、何か手作業で変更されているかもしれない状況だと、updateしたくない。 -cfn updateをせずに、安全にcfn stackをdeleteしたい。 - -## 方法 - -### cfnの操作しかできないIAM roleを作成する - -以下の通り、terraformで作成した。 - -```terraform -resource "aws_iam_role" "delete_cfn_stack" { - name = "delete-cfn-stack" - path = "/" - - assume_role_policy = jsonencode({ - Version = "2012-10-17" - Statement = [ - { - Action = "sts:AssumeRole" - Effect = "Allow" - Sid = "" - Principal = { - Service = "cloudformation.amazonaws.com" - } - }, - ] - }) -} - -resource "aws_iam_role_policy" "delete_cfn_stack_policy" { - name = "cfn_policy" - role = aws_iam_role.delete_cfn_stack.id - policy = jsonencode({ - Version = "2012-10-17" - Statement = [ - { - Effect = "Allow" - Action = [ - "cloudformation:*", - ] - Resource = "*" - }, - ] - }) -} -``` - -### 上記のroleでスタック削除する - -```sh -export STACK_NAME=stack_name - -# 失敗するdeleteを実行 -aws cloudformation delete-stack --role-arn arn:aws:iam::_aws_account_id_:role/delete-cfn-stack --stack-name ${STACK_NAME} - -# resource idのリストを取得 -aws cloudformation describe-stack-resources --stack-name ${STACK_NAME} | jq '.StackResources[].LogicalResourceId' | xargs - -# 削除しないリソースとして上の結果を指定 -aws cloudformation delete-stack --role-arn arn:aws:iam::_aws_account_id_:role/delete-cfn-stack --stack-name ${STACK_NAME} --retain-resources (↑の結果をペースト) -``` - -## 終わり - -地道にterraform importしてから、上記をコツコツ(スクリプト化して)実行して、cfn stackを削除した。 -terraform importは単純に差分がなくなるまでtf fileを修正するだけなので、そんなに困ることはない。 -これで安心・安全にリソース管理できるようになった。 \ No newline at end of file diff --git a/content/diary/old_rst_files/001CompilerOptions.rst b/content/diary/old_rst_files/001CompilerOptions.rst deleted file mode 100644 index 8a58f544..00000000 --- a/content/diary/old_rst_files/001CompilerOptions.rst +++ /dev/null @@ -1,102 +0,0 @@ -Perl のコンパイラオプション -################################ - -:date: 2014/01/01 02:37:20 -:tags: perl -:category: blog - -参考ページ -============= -* man perlrun -* `DebugIto's - Perl/コマンドライン `_ - -基本的なオプション -===================== --e ----- -* ワンライナーを書くために必須。 -* 複数並べられるので、それなりに色々書ける -* 直後にperlプログラムを書ける。 - -.. code-block:: perl - - perl -e 'print 11/2' - --l[8進数] -------------- -* 行末に指定された8進数に変える。-l のみの場合、改行になる。 - -.. code-block:: perl - - perl -e 'print 22' #=> 22 - perl -l -e 'print 22' #=> 22\n - perl -l101 -e 'print 22' #=> 22A - --0[digits] --------------- -* -l の入力セパレータバージョン -* -00 とすれば、空行を区切り。段落モード。 - - - $/ = ""; - -* -777 とすればファイルごとの区切りになる。 - -使い勝手の良いオプション -============================ --n ---- -* while (<>) { ...} の中にスクリプトを入れたと思って実行 - --p ----- -* -n みたいなもの。ただし、行($\_)を出力する。 -* sed に似たやつ。 - --a ------ -* -n, -p と一緒に使用 -* $\_ を自動的に改行で分割し、配列 @F に入れる - -.. code-block:: perl - - perl -ane 'print $F[0], "\n"' /etc/passwd - --F/pattern/ ------------------ -* -a の分割のデリミタを指定する -* パターンは複数文字でも良い。そのときは、' ' または / / で囲む - -.. code-block:: perl - - perl -F':' -ane 'print $F[0],":",$F[2] ,"\n"' /etc/passwd - --i[拡張子] ------------- -* 拡張子がないとき、<>のファイルを直接編集する -* 拡張子があるとき、<>の元ファイルは、拡張子をつけたファイルにバックアップされる。 -* $SECONDS を使うのがオススメ - -.. code-block:: perl - - perl -i.back -pe `s/foo/bar/g' sample.txt - perl -i.$SECONDS -pe `s/foo/bar/g' sample.txt - - -デバッグに使えるオプション -=========================== --c ----- -* スクリプトのシンタックスチェックのみ行う - --d[:debugger] ----------------- -* debugger の下で走らせる - --w ----- -* より多くの Warning を出す - --W (-X) ----------- -* すべての Warning を出す(出さない) - diff --git a/content/diary/old_rst_files/002Script.rst b/content/diary/old_rst_files/002Script.rst deleted file mode 100644 index 3f5c66e0..00000000 --- a/content/diary/old_rst_files/002Script.rst +++ /dev/null @@ -1,433 +0,0 @@ -Perlスクリプトメモ -######################### - -:date: 2014/01/07 02:38:20 -:tags: perl -:category: blog - -参考文献 -========== -1. `Perl基礎文法最速マスター `_ -2. ミニマル perl - -スクリプトを書く時 -=================== -- プラグマ - - * `perldoc.jp `_ - -- 推奨 : スクリプト先頭に書く - -.. code-block:: perl - - use strict; - use warnings; - -- 1文字でも減らしたい - - * print のデフォルト引数は、 $_ - * print $_; したいだけなら書く必要ない。 - -用語 -====== -レコード ----------- -- 1つのまとまりとして読み書きされる文字の集合 -- 入出力の際、ファイルはレコードの集まりと見ることができる。 - この時、デフォルトでは、1行がレコード。 - -入力レコードセパレータ -------------------------- -- 入力レコードの終端区切りを表す文字、または文字シーケンス(文字の並び)。 -- Linuxとかでは、デフォルトではラインフィード。 -- Perl ではOS固有の入力レコードセパレータを \n として、参照できる。 - -ニューライン --------------- -- \n のこと。 -- OS固有の入力レコードセパレータ。 - -スイッチ引数 ---------------- -- -s オプション -- 良い感じのコマンドラインオプションを取ることができる。 -- 引数の与え方で2つの方法がある。 - -.. code-block:: perl - - -foo='test' #=> $foo == 'test' - -foo #=> $foo == true : -debugで、デバッグ用、みたい使う。 - -- スイッチ引数を任意にしているスクリプトでは、冒頭にour関数を使うのが良い。 - -.. code-block:: perl - - our($foo); - our($foo, $bar, ...); - -真偽値 -======= -偽になるのは、次の3パターンある。 - -1. 数値 - - - 0 と同等な値 - -2. 文字列 - - - null文字列 - - 0 を保持する文字列 ( '0' みたいな) - -3. 変数 : 値を持たない変数 - - - まだ設定されていない変数とか。定義されているかは、 defined を使うとわかる。 - -特別な文字列 -============= -$/, $\\ --------- -- 入力,出力レコードセパレータを指定する - -$. ----- -- 今読んでいる入力レコードが何番目か、を表す -- 通常は行数 -- コマンドラインオプションや$/で、入力レコードセパレータを指定したときは、行数じゃなくなる -- 複数のファイルを読んでいる場合、ファイルをまたいで番号付けらられる -- 以下のようにすることで、ファイルごとに $. の値をリセットできる - - .. code-block:: perl - - # 各ファイル終了時にレコードカウンタの $. をリセット - eof and close ARGV - -$_ ------ -- 最後に読み込んだ入力レコード。 - -$" ------ -- ダブルクォートで囲んだ配列の各要素の間に挿入される文字 -- デフォルトはスペース - -$, ------ -- print 文の2種類の特殊なフォーマット処理に利用 - - * print の引数を区切るコンマの代わりに出力で使用される - * クォートされていない配列やハッシュの要素の区切り - -- デフォルトは空文字 - -$& ---- -- マッチした文字列の表示 - -$` ---- -- マッチしたレコード中で最後のマッチの開始部分の前の部分、を保持 - -$' ---- -- マッチしたレコード中で最後のマッチの末尾の後の部分、を保持 - -ARGV ------ -- 現在の入力ソースのファイルハンドル。 -- 特にクローズのために使われる。 - -$ARGV -------- -- n, p オプションや空の入力演算子を使用すると、ファイル名が格納される。 -- STDIN の時は、 - が表示される。 - -@ARGV -------- -- n, p や入力演算子を使わないときに、自前でプログラムの引数にアクセスするために使う。 - -<> ----- -\\n ----- -- OS 固有のレコードセパレータ - -変数 -===== -$var : 変数 --------------- -- 宣言と代入 - -.. code-block:: perl - - my $var = 'aaa' - -- '' と "" - - * シングルクォートとダブルクォートの違いは、変数が展開されるかどうか。 - -- join (.), split, length, substr, index - -@array : 配列 ---------------- -- 宣言と代入 - -.. code-block:: perl - - my @array - @array = (1,2,3) - -- $array[0] などとして、各値を得る -- $array[-2] というようにすれば、最後から2番目の意味 -- pop, push, shift, unshift も使える -- 配列の大きさを得るのは、 - -.. code-block:: perl - - $array_size = @array - -などとする - -%hash : ハッシュ --------------------- -- 宣言と代入 - -.. code-block:: perl - - my %hash; %hash = (a => 1, b => 2); - -- $hash{a} などとして、各値を得る -- keys, values, exists, delete - -制御構文 -========== -if { ~ } ------------ -if { ~ } else { ~ } ---------------------- -if { ~ } elsif { ~ } ---------------------- -while ( 条件 ) { ~ } ----------------------- -for ( my $i =0 ; $i < 5 ; $i++ ) { ~ } ----------------------------------------- -foreach my $field (@fields) { ~ } ------------------------------------ -- 配列の各要素に対して何かを行う -- foreach は for のエイリアスらしい。 - -比較演算子 -=========== -文字列比較 -------------- -- $s eq $t -- $s ne $t -- $s lt $t -- $s gt $t -- $s le $t -- $s ge $t - -サブルーチン : 関数 -===================== -他の言語との違いは、 - -- 引数を関数宣言に書かない -- @_ を使って引数にアクセス - -.. code-block:: perl - - sub sub { - my ($num1, $num2) = @_; - my $result = $num1 - $num2; - return $result; - } - -BEGIN, END -============ -| 入力の処理の前や後に、処理を行う。 -| BEGIN は、Usage の表示に使ったりする。 -| END は、全体の結果・統計の計算・表示に使ったりする。 - -.. code-block:: perl - - BEGIN { statements; } - - END { statements; } - -文字列修飾子 -============= -以下の2箇所で使える。 - -* ダブルクォート中の文字列 -* 置換後文字列フィールド - -=========== ========================================================== -文字列修飾子 ----------------------------------------------------------------------- -修飾子 効果 -=========== ========================================================== -\\U 右側の文字列を、\\E または文字列の末尾まで、大文字に変換 -\\u 右側の文字を大文字に変換 -\\L 右側の文字列を、\\E または文字列の末尾まで、小文字に変換 -\\l 右側の文字を小文字に変換 -\\E 変換を終了 -=========== ========================================================== - -論理演算 -========== -and, or ------------ -and の方が or より優先度が高い。 - -.. code-block:: perl - - $one or $two and $three - # => $one or ( $two and $three ) - -! ---- -論理否定。 - -関係演算子 -=========== - -========= ================ =========================== -関係演算子 ------------------------------------------------------- -数値 文字列 意味 -========= ================ =========================== -\=\= eq 等しい -!= ne 等しくない -> gt より大きい ->= ge 以上 -< lt より小さい -<= le 以下 -<=> cmp | 比較 - | -1 : 左辺が小さい - | 0 : 等しい - | 1 : 左辺が大きい -========= ================ =========================== - - -以下は、組み込み関数 - -IOに関連する関数 -=================== - -print ------- -STDOUT に出力する - -printf -------- -* print のニューラインなしバージョン : -l の影響を受けない -* 他にもたくさん使い勝手が良い - -warn ------- -STDERR にメッセージを送る。 - -.. code-block:: perl - - # 出力メッセージのあと、更にエラー行が付加される。 - warn "msg\n" - # \n を入れると簡潔なエラーメッセージ : エラー行などを表示しない。 - warn "msg\n" - print STRERR "a", "b" - -die ------ -| STDERR にメッセージを送って、プロセスを終了する。 -| 出力メッセージの形式は warn と同様。 -| デフォルトのエラーコードは255。 - -.. code-block:: perl - - # BEGIN ブロックの外で - die "$0 : msg\n" - # BEGIN ブロックの中で - $success or warn "msg\n" and exit 255; - -close -------- -| ファイルハンドルを引数に取って、ファイルを閉じる。 - -.. code-block:: perl - - close ARGV - -eof ------ -| 現在のファイルを最後まで読み込んだら、真を返す。 - -.. code-block:: perl - - # 各ファイル終了時にレコードカウンタの $. をリセット - eof and close ARGV - -dbmopen, dbmclose --------------------- - -flock ------- - -format -------- - -文字列操作 -=========== -chomp -------- -chop ------- -chr ------ -crypt ------- -hex ------- -index ------- -lc, lcfirst, uc, ucfirst ----------------------------- -* それぞれ \\L, \\l, \\U, \\u - -length -------- -* 文字列の長さ - -substr -------- -* 文字列の切り出し -* 添字は 0 から始まる - -.. code-block:: perl - - # 文字列先頭から、4文字目まで - substr $_, 0, 3; - -その他 -======= - -defined ----------- -undef ------- -dump ------ -eval ------ -formline ------------ -time, gmtime, localtime --------------------------- -local ------- -pos ----- -scalar -------- -reset -------- -system ---------- - diff --git a/content/diary/old_rst_files/004RegexInPerl.rst b/content/diary/old_rst_files/004RegexInPerl.rst deleted file mode 100644 index b275a6b4..00000000 --- a/content/diary/old_rst_files/004RegexInPerl.rst +++ /dev/null @@ -1,398 +0,0 @@ -Perl の正規表現 -######################### - -:date: 2014/01/07 02:39:20 -:tags: perl -:category: blog - -マッチ演算子 -============== -評価の結果は真偽値としては、マッチすれば真、そうでなければ偽。 -and, or, ! が役立つのは間違いない。 - -$_ にマッチさせる ------------------- -.. code-block:: perl - - /regex/ - m:regex: - -*string* にマッチさせる ---------------------------- -.. code-block:: perl - - string =~ /regex/ - string =~ m:regex: - -$_ の文字列置換 ---------------- -.. code-block:: perl - - s/regex/new/ - s:regex:new: - - -*string* の文字列置換 ------------------------ -.. code-block:: perl - - string =~ s/regex/new/ - string =~ s:regex:new: - - - -特殊なメタキャラクタ -===================== -^, $ ------- -* 行頭、末尾にマッチ - -. ---- -* ニューライン以外の任意の文字にマッチ - -[*chars*] ------------ -* *chars* に含まれる任意の1文字にマッチ -* *chars* 内のバックスラッシュ付き英数字以外のメタキャラクタは、リテラル扱い - -[^ *chars*] ------------- -* *chars* に含まれない任意の1文字にマッチ -* メタキャラクタの扱いは [*chars*] と同様 - -[*char1*-*char2*] -------------------- -* *char1* の *char2* の間に入る任意の文字にマッチ -* *char1*, *char2* を含む。 - -$& ----- -* 最後にマッチした内容を保持 -* 'Foo' =~ /^[A-Z]/ なら $& は F - -\\ ---- -* メタキャラクタに使ったり、エスケープに使う - -\\b ------ -* 単語の区切りにマッチする -* 'abc def' にマッチさせたいときに、'Zabc def' にマッチしないよう、'\babc def' と書いておく。 -* アルファベットは、単語構成文字クラスなので、スペースや!は、\b にマッチするが、Zはマッチしない。 - -\\n ----- -* ニューライン - -\\r ----- -* キャリッジリターン文字 -* カーソルを行頭に戻す - -\\t ------ -* タブ - -\\f ----- -* フォームフィード -* 改ページ - -\\e ----- -* エスケープ文字 - -\\NNN ------- -* 8進数が NNN となる文字 -* 例えば、\040 はスペース - -.. note:: - - 8進数や16進数を調べるには、man ascii - -\\xNN ------- -* 16進数が NN となる文字 -* 例えば、\x20 はスペース - -\\cX ------ -* X によって表される制御文字 -* 例えば、 \cC はCtrl-C - - -\\Q, \\E ------------ -* メタキャラクタを文字として見せたい部分を、\\Q ... \\E で囲む - - -POSIX の文字クラスとショートカットメタキャラクタ -==================================================== - -+----------------------------+------------------------------+------------------+ -| 文字クラス | ショートカットメタキャラクタ | 説明 | -+============================+==============================+==================+ -| [a-zA-Z0-9\_] | \\w | 単語構成文字 | -+----------------------------+------------------------------+------------------+ -| [^a-zA-Z0-9\_] | \\W | 非単語構成文字 | -+----------------------------+------------------------------+------------------+ -| [\\040\\t\\r\\n\\cJ\\cL] | \\s | 空白文字 | -+----------------------------+------------------------------+------------------+ -| [^\\040\\t\\r\\n\\cJ\\cL] | \\S | 非空白文字 | -+----------------------------+------------------------------+------------------+ -| [0-9] | \\d | 数字 | -+----------------------------+------------------------------+------------------+ -| [^0-9] | \\D | 数字以外の文字 | -+----------------------------+------------------------------+------------------+ - -マッチ修飾子 -============== -/*RE*/i や m%RE%xs, s/*RE*/*new*/e など、最後に修飾子をいくつかつけて、マッチングの動作を変更させることができる。 - -=============== ==================================================== -マッチ修飾子 --------------------------------------------------------------------- -修飾子 説明 -=============== ==================================================== -i | 大文字小文字の違いを無視 -x | 拡張モード - | REフィールドに空白文字とコメントを許す -s | シングルラインモード - | . をニューラインにもマッチさせる -m | マルチラインモード - | ^, $ を文字列の絶対的な先頭、末尾でなく、ターゲット文字列中の行の先頭、末尾にマッチさせる -g | すべてのマッチを、スカラーコンテキストかリストコンテキストかによって、連続的もしくは集合的に返す -e | 置換の時に使う。 *new* を Perl のコードとして評価して、*RE* にマッチしたものをその結果で置き換える。 -=============== ==================================================== - -その他の構文 -====================== - -===================== ============================================= -選択、グループ化、キャプチャ、後方参照 -------------------------------------------------------------------- -構文 説明 -===================== ============================================= -X|Y|Z | X, Y, Zのいずれかにまっち -\(X\) | グループ化とキャプチャ - | a(X|Y)bc や (XY)+ といった感じで使う -\\1, \\2, ... | 後方参照。検索文字列フィールドで使用 -$1, $2, ... | 後方参照。検索文字列フィールド以外で使用 -===================== ============================================= - -量指定子 -========= - -====================== ============================================= -量指定子 --------------------------------------------------------------------- -構文 説明 -====================== ============================================= -X* | 0回以上の繰り返し -X+ | 1回以上の繰り返し -X? | 0 または 1回の出現 -X{min, max} | min回以上max回以下の繰り返し -X{min, } | min回以上の繰り返し -X{count} | count回の繰り返し -X{, max} | max回以下の繰り返し -REP? | 量指定子の直後に ? をつけると、最短マッチ - | 例えば、.*? という風な。 -====================== ============================================= - - -以下は、Perl で正規表現を扱うときのコツ - -grep -===== -grep -v ---------- -* | perl で grep -v のように、マッチしないものを表示させるのは、次のように行う。 - - .. code-block:: perl - - # 空行以外を表示 - perl -wnl -e '/^$/ or print;' file - - | このように or を使うと便利。 - -grep -l --------- - -.. code-block:: perl - - # foo にマッチするもののファイル名を表示 - # close することで、マッチした後は探索しない。 - perl -wnl -e '/\bfoo\b/ and print $ARGV and close ARGV;' file - -カスケードフィルタ --------------------- -* シェルで grep "regex1" file | grep "regex2" とやることに相当 - - .. code-block:: perl - - # foo という単語と bar という単語を含む行を見つける - perl -wnl -e '/\bfoo\b/ and /\bbar\b/ and print;' file - -コンテキスト表示 ------------------- -* 段落モード -00 と ファイルモード -0777 を上手く使う -* /regex/s も上手く使うと良い -* 行をまたがるマッチングを行うとき、間にどんな文字を許すか考える必要がある。ニューラインについて言えば、 - - - マッチ修飾子の s を使って . をニューラインにマッチさせる - - [\\t\\n]+ や [_\\s]+ というように、明示的に指定したり、[^aiueo]+ などを使う - - \s を使う - -sed -==== -置換のデリミタ ---------------- -* 対応する括弧も使用可能 - - .. code-block:: perl - - s/.../.../ - s|...|...| - s{...}{...}, s(...)(...) - -行指定置換, コンテキストアドレス ---------------------------------- -* sed では、次のように、置換の構文の前に、アドレスを指定して、置換する場所を制限できる。 - - .. code-block:: sh - - # 2行目のみ置換 - 2s/regex/new/g - # 2〜5行目のみ置換 - 2,5s/regex/new/g - # 行頭が fff の行について置換 - /^fff/s/regex/new/g - -* これを Perl では、行数に関する条件式で書く必要がある - - .. code-block:: perl - - # 2行目のみ置換 - perl -wpl -e '$. == 2 and s/regex/new/g;' file - # 2〜5行目のみ置換 - perl -wpl -e '2 <= $. and $. <= 5 and s/regex/new/g;' file - # 行頭が fff の行について置換 - perl -wpl -e '/^fff/ and s/regex/new/g;' file - -後方参照 ------------- -* sed では、キャプチャするときに、 ? を使えなかった。 Perl では、? を使える。 -* sed では、どこでも \1, \2, ...で参照したが、Perlでは \1, \2, ... と $1, $2, ... とどこから参照するかによって異なる。 - - .. code-block:: perl - - # Mr か Mr. を見る - perl -wnl -e 's/(Mr.?) (Fo[oa])/$1 Bar $2/g;' file - -計算結果で置換 ---------------- -* sed では、置換文字列フィールドに計算結果を入れることが難しかった。(できるか知らない。) -* perl では、簡単にできる。マッチ修飾子の e が必要。 - - .. code-block:: perl - - perl -wnl -e 's/\d+/$& * 2.1/ge;' file - -AWK -===== -フィールドアクセス --------------------- -* AWK では、フィールドアクセスが便利 - - .. code-block:: awk - - # スペースorタブ区切りのフィールドの順番を入れ替える - awk '{ print $2, $1}' file - -* Perl で似たようなことをやるには、2つ方法がある。 - - #. コマンドラインオプション -a (と合わせて、-F)を使う - #. 自分で各フィールドを変数に代入する - - ===================== ============================== - フィールドアクセス - ---------------------------------------------------- - 構文 コメント - ===================== ============================== - ($A, $B)=@F; それぞれの変数にセット - ($A, undef, $B)=@F; 第2フィールドは変数に入れない - $numfields=@F; レコードのフィールド数を格納 - ===================== ============================== - -パターン範囲 --------------- - -========= ================== ===================================================================== -パターン範囲 --------------------------------------------------------------------------------------------------- -演算子 構文 コメント -========= ================== ===================================================================== -\.. regex1 .. regex2 | regex1を含む最初のレコードからregex2を含む最初のレコードまでの範囲 - | 一旦regex1とregex2の組が見つかると次のregex1を見つけるまで、無視 - | regex1とregex2が同じレコードにある場合もマッチ。 -... regex1 ... regex2 | .. とほぼ同じ。 - | ただし、regex2はregex1の次の行以降から探す。 -========= ================== ===================================================================== - - -find -===== -ファイル属性テスト ---------------------- - -====================== ========================================================= -ファイル属性テスト (○ は属性に対応する文字) --------------------------------------------------------------------------------- -構文 コメント -====================== ========================================================= --○ filename filename が○という属性を有していることをテスト -! -○ filename filename が○という属性を有していないことをテスト --○ $_ が○という属性を有していることをテスト -! -○ $_ が○という属性を有していないことをテスト -====================== ========================================================= - -===================================== ========================================================= -ファイル属性と対応する演算子 ------------------------------------------------------------------------------------------------ -ファイル属性 演算子 -===================================== ========================================================= -通常ファイル -f -ディレクトリ -d -シンボリックリンク -l -名前付きパイプ -p -キャラクタ -c -ブロック -b -ソケット -S -空 -z -空でない -s -------------------------------------- --------------------------------------------------------- -実UID/GIDで読取り可 -R -実UID/GIDで書込み可 -W -実UID/GIDで実行可 -X -実UIDが所有 -O -実効UID/GIDで読取り可 -r -実効UID/GIDで書込み可 -w -実効UID/GIDで実行可 -x -実効UIDが所有 -o -指定のUID/GIDが所有 stat -------------------------------------- --------------------------------------------------------- -setuid -u -setgid -g -sticky -k -テキスト -T -バイナリ -B -------------------------------------- --------------------------------------------------------- -別のファイルより新しい stat -別のファイルより後にアクセスされた stat -リンクの数 stat -inode番号 stat -===================================== ========================================================= - - diff --git a/content/diary/old_rst_files/100Tools.rst b/content/diary/old_rst_files/100Tools.rst deleted file mode 100644 index 45cb6dfe..00000000 --- a/content/diary/old_rst_files/100Tools.rst +++ /dev/null @@ -1,41 +0,0 @@ -便利なツール -################ - -:date: 2014/01/02 02:40:20 -:tags: perl -:category: blog - -POD ----- -* Plain Old Documentation -* man perldoc を参照 - -lwp-request ------------- -* Webサーバーにリクエストを送って、適当な形式に変換してくれる -* GET, POST, PUT も選べる。 -* 出力形式としては、 text, ps, links, html, dump - -.. code-block:: perl - - lwp-request -o text www.example.com - - -Text::Autoformat ------------------- - -Text::Tabs ------------- -* タブをスペースに変換 - -String::Approx ------------------ -* あいまいなマッチをする - - -Template-Toolkit ------------------ - -Lingua::En::Inflect 'PL_N' ---------------------------- -* 単数形と複数形を変換してくれる diff --git a/content/diary/old_rst_files/DNS.rst b/content/diary/old_rst_files/DNS.rst deleted file mode 100644 index 5e639b96..00000000 --- a/content/diary/old_rst_files/DNS.rst +++ /dev/null @@ -1,36 +0,0 @@ -DNS サーバー -##################### - -:date: 2014/01/01 02:41:20 -:tags: dns -:category: blog - -ニフティクラウド上でサーバーを立てた。 -いろいろと設定していこうかと思っているが、まずはDNSから始める。 - -作業内容 -============== - -1. /etc/bind/named.conf.options -以下のように書き換える:: - - // v6の設定: v6は応答しない - // listen-on-v6 { any; }; - listen-on-v6 { none; }; - - // transfer を許すIPを制限 - allow-transfer "192.168.100.1"; - - -2. /etc/bind/named.conf.local -ゾーンの設定:: - - zone "example.com" { - type master; - file "example.db"; - }; - zone "100.168.192.in-addr.arpa" { - type master; - file "192.rev" - }; - diff --git a/content/diary/old_rst_files/UID_GID.rst b/content/diary/old_rst_files/UID_GID.rst deleted file mode 100644 index 2ed84c00..00000000 --- a/content/diary/old_rst_files/UID_GID.rst +++ /dev/null @@ -1,111 +0,0 @@ -実UID, 実行UID -##################### - -:date: 2014/01/01 02:43:20 -:tags: linux -:category: blog - -プロセスはいくつかのIDを持っている。 -あまり深く考えず、実UIDと実行UIDについて考える。 - -実UID(UID) -============= -* 呼び出し元のプロセス(親プロセス)の実ユーザーID。 -* 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。 - -実効UID -=========== -* 呼び出し元のプロセス(親プロセス)の実効ユーザーID。 -* ファイルアクセスに影響。 -* 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。 -* ただし、SUID ビットがあるときは、それに従う。 - -==================================== -SUID, SGID, スティッキービット -==================================== - -SUID, SGID -================ -| それぞれ setuid, setgidのこと。 -| まず、 SUID(SGID) ビットが立っているファイルについて見る。 - -.. code-block:: sh - - $ ls -l - -rwsr-xr-x 1 root root 51096 5月 26 2012 /usr/bin/passwd - -| このように、sというビットがユーザーパーミッションを表す部分(SGIDのときは、グループパーミッション部分)に立っている。 -| さて、パーミッションを見ると passwd はどんなユーザーでも実行できる。 -| 実行した場合、実効UIDがファイルの所有ユーザーとして実行される。(SGIDビットが立っているときは、所有グループが実効GIDになる。) -| この仕組みが必要な理由は、例えば、一般ユーザーが自身のパスワードを変更するために、/etc/shadow を書き換える必要がある。しかし、一般ユーザー権限では書き換えることができない。これを解決するためである。 - -| SUID, SGID ビットの設定は以下のようにする。 - -.. code-block:: sh - - # SUID ビットを立てる - $ chmod 4770 foo - # SGID ビットを立てる - $ chmod 2770 bar - - # 別の方法として、 +sx を使う方法がある - # SUID - $ chmod u+sx foo - # SGID - $ chmod g+sx bar - -スティッキービット -=================== -| (元々は違うけど、)ディレクトリ配下のファイルの削除についての設定。 -| 典型例は /tmp。 -| このディレクトリの持つ特徴を考えてみよう。 - -* 誰でもファイルを作成できる。 -* 自分の作ったファイルを削除できる。 - -| ここまでであれば、 - -.. code-block:: sh - - # /tmp : 誰でもファイルを作成できる - $ sudo chmod 777 tmp - - # 試しに、適当なファイルを作成・削除できるか試す - $ cd tmp - $ touch user - $ rm user - - # root ユーザーでもファイルを作成してみる - $ sudo touch root - -* 他のユーザーのファイルは一般ユーザーは削除できない。 - -.. code-block:: sh - - # 先ほどの tmp ではこれが満たされていない - $ rm root #=> 消える!! - -| これは当たり前で、tmp のパーミッションが 777。ディレクトリの write ができるということは、ファイルの新規作成・削除ができる。 -| では、 tmp はどのように実現すれば良いだろうか。 -| そんな時に、スティッキービットが役に立つ。 - -.. code-block:: sh - - # スティッキービットを立てる - $ sudo chmod 1777 ../tmp - - # 別の方法として、 +t を使う方法がある。 - $ sudo chmod a+rwxt ../tmp - -| スティッキービットをディレクトリに立てておくと、ファイルやディレクトリの所有者しか削除できなくなる。 - -まとめ -======= -* 実効UID, 実効GID でファイルアクセスの管理がなされる -* SUID, SGIDビットを使って、実行したユーザーと実効UID, 実効GID を変更できる。 - -* スティッキービットを使えば、誰でも新規にファイルを作れるが、消すのは本人のみ、というディレクトリを作成できる。 - -参考ページ -============= -* `UNIXの部屋 コマンド検索: chmod `_ diff --git a/content/diary/old_rst_files/consul.rst b/content/diary/old_rst_files/consul.rst deleted file mode 100644 index f3208e23..00000000 --- a/content/diary/old_rst_files/consul.rst +++ /dev/null @@ -1,223 +0,0 @@ -Consul 使ってみる -########################### - -:date: 2014/11/01 02:43:20 -:tags: consul, provisioning, cluster -:category: blog - -Consul とは ---------------- - -特徴 -^^^^^^^ -* Service Discovery - - * Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供 - * 他のクライアントは、Consulを使ってサービスを検出 - * アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出 - -* Health Check - - * 多くのヘルスチェックの提供 - * 実行されているサービスやノード上の情報などと連携 - * この情報を元に、クラスターの状態を監視 - * サービス検出コンポーネントを使って、良くない状態のホストを迂回できる - -* Key/Value Store - - * アプリケーションはConsulの階層的なKey/Valueストアを利用できる - * 動的な設定変更や、フラグを立てたり、色々使える - * HTTP APIで簡単に使える - -* Multi Datacenter - - * リージョンのことは気にしなくても、Consulが上手いことやる - * (複数のgpssipプールを持っている云々書いているので、LANとWANで変えているのだと思う) - -ステータスの確認のためには、謎のキレイなWebUIもある。 - -個人的に良いと思っているところ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -* DNSインターフェースでホストのIPを取得できるので、クラスター用のDNSサーバーのメンテナンスがいらないのが嬉しい -* ホストの情報が散らばらずに、各サーバーで書かれている。それでいて、問い合わせは分散させられるのが嬉しい。 -* 一貫性は正義 - -登場するサーバー -^^^^^^^^^^^^^^^^^^^^^^^^^ -* Agent - - * Server or Client - * HTTP, DNS, RPCのインターフェースを持ちうるやつ。 - (実際に、持つかどうかは、起動時のclientオプションで決まる) - -* Server - - * クラスタ状況の管理 - * クライアントからのRPCへの応答 - * WAN側gossip, リモートデータセンターのリーダーへクエリ - * クラスタ内ではそれほど多くなくて良いはず - -* Client - - * サーバーにRPCを送ってアピール - * (gossipプールへの参加に関することを除いて、)割とステートレス - * 通信料もそんなに多くない - * いくらでもいて良い - -インストール ----------------------- -バイナリを持ってきて、パス通ってるとこに置く。 - -http://www.consul.io/downloads.html - - -起動方法 ------------------------ -* Agentの起動 - -.. code-block:: sh - - # server : serverオプションを指定 - # - clientオプションは、RPC, DNS, HTTPのためのもの - # - bindオプションは、cluster情報のやりとりに使うっぽい - # - dcはデータセンター名らしい - # - nodeはホスト名 - # - bootstrapは最初の1つだけにつける。他は大体joinしとけば良い。 - consul agent -server -bootstrap -client=192.168.2.5 -dc=local \ - -node=con -data-dir=/tmp/consul -bind=192.168.2.5 - - # client - # - joinオプションで、agentのアドレスを指定。何個か書けるらしい - consul agent -dc=local -node=consul2 -data-dir=/tmp/consul2 \ - -bind=192.168.39.6 -join=192.168.39.5 - -* Agentの再起動 - -Agentの再起動時には、 *SIGHUP* を送れば良い。 - -使い方 ------------- - -clusterからの情報を取得 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -* Consulメンバー - -.. code-block:: sh - - # 自分の胸に聞くときは、"-rpc-addr"は不要 - consul members - # クラスタの外にいたりして、誰かに教えてもらうとき - consul members -rpc-addr=192.168.2.5:8400 - -* HTTPインターフェース - -.. code-block:: sh - - # JSON形式で情報が返る - curl 192.168.2.5:8500/v1/catalog/nodes - -* DNS - -.. code-block:: sh - - # 聞く先は適当に。 anyリクエスト投げとけば良いと思う - # .node.consul (データセンターはlocalになる)という形式か、 - # .node..consul という形式で問い合わせ。 - dig @192.168.2.5 -p 8600 con.node.local.consul - -Key/Valueストア -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -* put - -.. code-block:: sh - - curl -X PUT -d 'first object' 192.168.2.5:8500/v1/kv/namespaces/keyname - - # Check-And-Set : atomicなkey変更をするときに使うパラメータ - # ModifyIndex の値を指定して更新できる。 - # まず、GETしてModifyIndexを見てPUTする、という操作をatomicにできる - curl -X PUT -d 'first object' 192.168.2.5:8500/v1/kv/namespaces/keyname?cas=97 - - - -* get - -.. code-block:: sh - - curl -s 192.168.2.5:8500/v1/kv/namespaces/keyname - # => jsonが改行もされず表示されて辛い気持ちになる - curl -s 192.168.2.5:8500/v1/kv/namespaces/keyname | python -mjson.tool - # => 見やすくしてくれる - curl -s 192.168.2.5:8500/v1/kv/namespaces/?recurse - # => 再帰的に見てくれる - - # index=101 : ModifyIndexが101より大きいものが帰ってくるまで聞き続ける - # wait=5s などすれば、5秒までしか聞かない - - -もっとConsul ----------------------------- - -Service, Health Check を定義する -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -| 定義はjson形式で書く。 -| サービスを定義したいサーバーの例えば、/etc/consul.d/以下に - -.. code-block:: json - - # /etc/consul.d/mysql.json : サービスを定義 - {"service": {"name": "mysql", "tags": ["mysql", "db"], "port": 3306}} - - # /etc/consul.d/ping.json : pingステータスをチェック - { - "check": {"name": "ping", "script": "ping -c1 google.com >/dev/null", "interval": "30s"} - } - - # /etc/consul.d/web.json : サービスを定義しつつ、サービスレベルでヘルスチェック - {"service": {"name": "web", "tags": ["rails"], "port": 80, - "check": {"script": "curl localhost:80 >/dev/null 2>&1", "interval": "30s"}}} - -とか書いて、起動オプションに、 -config-dir=/etc/consul.d を加える。 - -Service, Halthの確認 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -他のサーバーから定義されたサービスやステータスを知りたい。 - -* DNS - -| NAME.service.consul or TAG.NAME.service.consul を使う。 -| さらに、SRVレコードを見れば、ポートもわかる - -.. code-block:: sh - - # Serviceを知る - dig @127.0.0.1 -p 8600 mysql.service.consul SRV - dig @127.0.0.1 -p 8600 db.mysql.service.consul SRV - - # Health Checkに失敗してるやつ - dig @127.0.0.1 -p 8600 web.service.consul - -* HTTP - -.. code-block:: sh - - # Serviceを知る - curl -s http://192.168.2.5:8500/v1/catalog/service/mysql - - # Halth Checkに失敗してるやつ - curl http://localhost:8500/v1/health/state/critical - - - - -参考資料 ----------------- -* `Introduction to Consul `_ -* `Consul vs. Serf `_ (`Consul vs Serfの日本語訳 `_) -* `Serf という Orchestration ツール #immutableinfra `_ - -Advanced -^^^^^^^^^^^^^^^^^^^^ -* http://www.consul.io/docs/internals/index.html - diff --git a/content/diary/old_rst_files/pxe_install.rst b/content/diary/old_rst_files/pxe_install.rst deleted file mode 100644 index f4901917..00000000 --- a/content/diary/old_rst_files/pxe_install.rst +++ /dev/null @@ -1,258 +0,0 @@ -PXEブートでインストーラを起動する -###################################### - -:date: 2014/01/01 02:44:20 -:tags: pxe, preseed, kickstart -:category: blog - -| 最近、VMwareのESXiで仮想環境を作っています。 -| 触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。 -| この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。 - -| PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。 -| Debianをインストールサーバーとして予め立てておき、DebianまたはCentOSをインストールすることにします。 - -.. contents:: - :depth: 2 - :local: - :backlinks: none - -1. Debian Install --------------------------------- - -| 最初のDebianはCDやらで手動でインストールしてください。 -| Debianのインストール手順は省略します。 - -2. DHCPサーバーを立てる ---------------------------------- - -.. code-block:: sh - - # Install DHCP Server - apt-get install isc-dhcp-server - - # Config DHCP : INTERFACES - vi /etc/default/isc-dhcp-server - # Modify INTERFACES="" to INTERFACES "eth1" - - # Config DHCP : Server setting - vi /etc/dhcp/dhcpd.conf - -編集する箇所は以下の通りです。 - -https://gist.github.com/10664868 - -DHCPサーバーを再起動して設定を反映させます。 - -.. code-block:: sh - - # Restart DHCP Server - /etc/init.d/isc-dhcp-server restart - -3. TFTPサーバーを立てる --------------------------- -デフォルトで大丈夫でした。 - -.. code-block:: sh - - # Install TFTP Server - apt-get install tftpd-hpa - - -4. PXEブート用のイメージを準備する ------------------------------------- -以下のページから適当にnetbootイメージを選んで、netboot/netboot.tar.gzを取って来ます。 - -* http://www.debian.org/distrib/netinst#netboot - -.. code-block:: sh - - # 展開する - tar xvf netboot.tar.gz - # move files to root dir of TFTP - mv ./* /srv/tftp - -5. 中間チェック ---------------------- -この段階でPXEブートしてみると、Debianのインストーラが立ち上がるようになります。 - -ブート画面でOSを選択できるようにする -======================================= - -6. CentOSのインストーラを準備 -------------------------------- - -1. mkdir -p /srv/tftp/centos/6.5/x86_64 -2. CentOSのインストールDVDを持って来る -3. mount -o loop /media -4. /media/images/pxeboot/にある次の2つのファイルを/srv/tftp/centos/6.5/x86_64/以下にコピーしてくる - - initrd.img - - vmlinuz -5. umount /media - -ここで、Debianのインストーラたちも整理して、 -/srv/tftp/debian/7.4/amd64 以下にあるとします。:: - - /srv/tftp/ - | - |-debian/7.4/amd64/ - | | - | |-boot-screens - | | - | |-initrd.gz - | | - | |-linux - | | - | |-pxelinux.0 - | | - | |-pxelinux.cfg/default - | - |-centos/6.5/x86_64 - | | - | |-initrd.img - | | - | |-vmlinuz - | - |-pxelinux.0 -(シンボリックリンク)-> debian/7.4/amd64/pxelinux.0 - | - |-pxelinux.cfg -(シンボリックリンク)-> debian/7.4/amd64/pxelinux.cfg - - - -7. メニューの作成 ---------------------------------- -pxelinux.cfg/defaultの内容を以下のように編集します。 -後でもう少し修正します。 -`最終形はGistにあがっているので `_、 そちらを見てください。 - -.. code-block:: sh - - # D-I config version 2.0 - default debian/7.4/amd64/boot-screens/vesamenu.c32 - - # Boot Menuに入りたい - prompt 1 - timeout 300 - menu title - Boop Options Menu - - - label Debian-7.4 - menu label ^0 Debian 7.4 - #include debian/7.4/amd64/boot-screens/menu.cfg - kernel debian/7.4/amd64/linux - append priority=critical vga=788 initrd=debian/7.4/amd64/initrd.gz - - label CentOS-6.5 - menu label ^1 CentOS 6.5 - kernel centos/6.5/x86_64/vmlinuz - append initrd=centos/6.5/x86_64/initrd.img - - -Debianインストールの自動化 -======================================== - -| ここまでで、PXEブートさえしていれば、複数のOSを選んでインストールできるようになりました。 -| いまのところの問題点としては、結局インストーラを起動した後は手作業になっていることです。 -| 次は、PXEブートした後、放っておくと勝手にインストールが終わっているようにしましょう。 - -| Debianの場合にこれを実現するには、preseedと呼ばれる設定ファイルを書けば良いです。 -| 普通にインストールするときに色々な質問に答える必要があると思いますが、その答えを事前に書いておくものです。 -| ただ、preseedが読まれる前に、インストーラから質問される(インストールのタイプなど)ことがあるので、そのあたりはブート時のパラメータとして渡しましょう。 - -8. preseed ファイル作成 ----------------------------- - -| preseedファイルはかなり長いです。 -| 昔はpreseedのドキュメントを読んでも、作るの大変だった印象があったのですが、`コメント付きのpreseedの例がある `_ ので、これを元に書いて行けば特に大きくは困らないです。 -| ただ、例に書かれていないのですが、GRUBの設定を追加しないといけないのはわかりづらいかも知れません。 -| preseedで細かく設定しようとすると大変なので、それはAnsibleなどインストール終わってからの自動化に入れる方針です。 - -| 今回はパーティションなどは全部インストーラに任せています。 -| パーティションを変える場合などは、コメントアウトされているところを変更してください。 - -https://gist.github.com/10664868 の preseed.cfgを参照。 - - -9. pxelinux.cfg/default 書き換え ------------------------------------------ - -| 今書いたpreseedファイルを debian/7.4/preseed.cfg として配置したことにします。 -| ブートオプションなどを追加した pxelinux.cfg/default ファイルは以下のようになります。 - -| あとでどうせCentOSも自動化するので、そちらもあわせてオプションをつけておきます。 - -https://gist.github.com/10664868 の defaultを参照。 - -10. Debianインストールのチェック ----------------------------------------- - -| また実際にPXEブートしてみましょう。 -| Debianをメニューで選択すると、今度は勝手に画面が進んで行くと思います。 -| 最後までインストールが終わり、勝手にリブートされてこれば、成功です。s - -Cent OSインストールの自動化 -======================================== - -11. httpサーバー作成 ------------------------- - -| 後でやるように、kickstartファイルはhttp経由で配ろうと思います。(TFTPでできないっぽかった) -| なので、httpサーバーを予め立てておくことにします。 - -.. code-block:: sh - - # apache install - apt-get install apache2 - -12. CentOSイメージのマウント ------------------------------- - -.. code-block:: sh - - mkdir -p /var/www/images/centos - mount -o loop /var/www/images/centos - -13. kickstartファイルの準備 --------------------------------------- - -kickstartファイルの詳細については、 -`redhatのページ `_ -が参考になります。というか、コレ見たら大体で書ける。 - -今回使っているkickstartfileは以下の通りです。 - -https://gist.github.com/10664868 の kickstart.cfgを参照。 - -14. kickstartファイルの配置 ------------------------------------- - -| pxelinux.cfg/defaultファイルの内容に合わせて、kickstart.cfgを配置します。 -| 今回は、apacheのドキュメントルート直下に置けば良いようにしました。 - -.. code-block:: sh - - mv kickstart.cfg /var/www/ - -15. CentOSインストールのチェック --------------------------------------- - -| 最後に、CentOSのインストールを確かめます。 -| 実際にPXEブートして、CentOSをメニューで選択すると、勝手に画面が進んで行くと思います。 -| 最後までインストールが終わり、勝手にリブートされてこれば、成功です。 - -もっと自動化できるけど... -======================================= - -| 今回は、インストールの自動化を行いました。 -| 一応、インストールするOSの種類を選ぶところを手でやることにしましたが、普通はOSは一種類で良いか、MACアドレスでインストールするOSを分けてしまうのだと思います。 -| そうしておけば、OSの種類を選ぶところも自動化することができます。 -| 自分としては、基本はDebianをインストールしたくて、たまにCentOSも選びたいという程度なので、ここまでで止めておきます。 - -| 機会があれば、preseedやkickstartでホスト依存な部分(例えば固定IPとか)を都度生成してインストールする方法も考えたいですね。 - - -さらに読もうと思ってるサイト -==================================== -- http://d.hatena.ne.jp/fujisan3776/20100630/1277861431 - インストール中は別の作業をしているので、インストールが終わったことも知らせて欲しい - - diff --git a/content/diary/old_rst_files/vpls.rst b/content/diary/old_rst_files/vpls.rst deleted file mode 100644 index 71c38f6a..00000000 --- a/content/diary/old_rst_files/vpls.rst +++ /dev/null @@ -1,38 +0,0 @@ -VPLSについてのメモ -########################## - -:date: 2014/01/06 02:43:20 -:tags: vpls -:category: blog - - -What is VPLS ---------------- -* Virtual Private LAN -* MACフレームを、ルーターを含むネットワークを超えて、やり取りするための技術の1つ -* MPLSはIPにラベルをつけるが、VPLSはMACにラベルをつけるというイメージ - * ラベルを使う理由としては、元々、経路計算を高速にしたかったはずだけど、今はそんなに気にしなくて良いっぽい - -Why VPLS ------------- -MPLSが便利なのと、同じ。 - -* VPN -* TE(Trafic Engineering) - * 明示的な経路選択 - * 回線使用率から選択したり。 - * ループフリー&自由なネットワークトポロジー -* 障害検知&切り替え - * FRR(Fast ReRoute) - * 代替経路へ即座に切り替えが起こる - * 1 sec以内で切り替えられるらしい - -参考サイト ------------ -0. RFC 4761, 4762 -1. http://itpro.nikkeibp.co.jp/article/COLUMN/20070130/259589/ -2. http://www.itbook.info/study/mpls2.html - -MPLSについては以下が参考になる - -1. http://www.atmarkit.co.jp/fnetwork/tokusyuu/11mpls/mpls01.html diff --git a/content/diary/sample/sample.md b/content/diary/sample/sample.md deleted file mode 100644 index 3d27b092..00000000 --- a/content/diary/sample/sample.md +++ /dev/null @@ -1,60 +0,0 @@ -Title: Sample docs -Date: 2016-12-14 04:35 -Category: blog -Tags: sample -Status: draft - -[TOC] - ---- - -# h1 - -## h2 - -### h3 - -#### h4 - -##### h5 - -Content - -``` -$ code -``` - -* a - * a-1 - * a-2 - * a-2-1 - * a-2-2 -* b - * b-1 - * b-2 - - -+ 1 - + 1-1 - + 1-2 - + 1-2-1 - + 1-2-2 -+ 2 - + 2-1 - + 2-2 - - -[example link](links) - - -> block -> quote - -*single asterisks* - -_single underscores_ - -**double asterisks** - -__double underscores__ - diff --git a/drafts/apurikai-fa-chu-xin-zhe-gaiosapuriworirisusurumadenolu-li.html b/drafts/apurikai-fa-chu-xin-zhe-gaiosapuriworirisusurumadenolu-li.html new file mode 100644 index 00000000..f5041bbb --- /dev/null +++ b/drafts/apurikai-fa-chu-xin-zhe-gaiosapuriworirisusurumadenolu-li.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – アプリ開発初心者がiOSアプリをリリースするまでの履歴 + + + + +
+ + + +
+
+ +

アプリ開発初心者がiOSアプリをリリースするまでの履歴

+

+ Posted on Wed 10 May 2017 in blog + +

+
+ + +
+
+ +
+ +
+ +

前提

+
    +
  • Androidアプリ開発歴3日
  • +
  • Androidで作ったものの、iOS版を作るので、作るものは決まっている
  • +
  • Swiftも知らない
  • +
  • 当初はiOS版を作るつもりがなかったが、会社のお金でiPhoneを入手したので、作ろうと思っている
  • +
+

Day 1

+

まずは swiftの実行環境を整えようと、Xcode をインストールする。
+インストールに時間がかかるので終わり。

+

Day 2

+

The Swift Programming Language (Swift 3.1) をクラウドEXPOの出展の合間に読む
+これで大体Swiftの文法を理解した。
+感想としては、割と書きやすそう。何よりMaybe型というかOptional型というかがちゃんとあるのが良い。
+読み終わってないけど、お酒も飲んだしやめる。

+
+
+
+

+ ios + mobile + application + swift +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/cloudflare-dns-woli-yong-shitalets-encrypt-nozheng-ming-shu-geng-xin.html b/drafts/cloudflare-dns-woli-yong-shitalets-encrypt-nozheng-ming-shu-geng-xin.html new file mode 100644 index 00000000..c5256532 --- /dev/null +++ b/drafts/cloudflare-dns-woli-yong-shitalets-encrypt-nozheng-ming-shu-geng-xin.html @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – cloudflare dns を利用したlet's encrypt の証明書更新 + + + + +
+ + + +
+
+ +

cloudflare dns を利用したlet's encrypt の証明書更新

+

+ Posted on Wed 19 December 2018 in blog + +

+
+ + +
+ +
+

やること

+

プライベートなサーバーの名前解決に Cloudflare のDNSを利用しています。
+この状況で、証明書が欲しくなったので、certbot を使ってLet's Encrypt の証明書を利用できるようにします。

+

証明書発行

+
$ sudo cat /opt/certbot-cloudflare/cf.ini
+dns_cloudflare_email = <mail address>
+dns_cloudflare_api_key = <api key>
+$ docker run -it --rm -v /opt/certbot-cloudflare/cf.ini:/tmp/cf.ini:ro -v /etc/letsencrypt:/etc/letsencrypt --name certbot-dns-cloudflare certbot/dns-cloudflare renew --dns-cloudflare --dns-cloudflare-credentials /tmp/cf.ini -d _domain_
+# いろいろ入力する
+
+ +

crontab で証明書更新する

+
$ cat /etc/cron.d/certbot-dns-cloudflare 
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+* * */10 * *   root     docker run -it --rm -v /opt/certbot-cloudflare/cf.ini:/tmp/cf.ini:ro -v /etc/letsencrypt:/etc/letsencrypt --name certbot-dns-cloudflare certbot/dns-cloudflare certonly --dns-cloudflare --dns-cloudflare-credentials /tmp/cf.ini -d _domain_
+
+ +

docker daemon をTLSにしてみる

+
$ cat /etc/systemd/system/docker.service.d/override.conf 
+[Service]
+Environment="DOCKER_NETWORK_OPTIONS=--dns 1.1.1.1"
+ExecStart=
+ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2376 --tlsverify --tlscacert "/etc/letsencrypt/live/_domain_/chain.pem" --tlscert "/etc/letsencrypt/live/_domain_/cert.pem" --tlskey "/etc/letsencrypt/live/_domain_/privkey.pem"
+
+$ sudo systemctl daemon-reload
+$ sudo systemctl restart docker.service
+
+
+
+
+

+

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/dataflow-woshi-utokinomemo.html b/drafts/dataflow-woshi-utokinomemo.html new file mode 100644 index 00000000..e6d09985 --- /dev/null +++ b/drafts/dataflow-woshi-utokinomemo.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Dataflow を使うときのメモ + + + + +
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/docker-memo.html b/drafts/docker-memo.html new file mode 100644 index 00000000..57f98495 --- /dev/null +++ b/drafts/docker-memo.html @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – docker: メモ + + + + +
+ + + +
+
+ +

docker: メモ

+

+ Posted on Mon 30 January 2017 in blog + +

+
+ + +
+ + +
+ +

Docker 検証

+

vmx

+
    +
  • 踏み台: nic 3本で検証
      +
    • SSH用
    • +
    • VLAN=279
    • +
    • VLAN trunk
    • +
    +
  • +
+

VLAN設定

+

資料

+

https://wiki.archlinuxjp.org/index.php/VLAN

+

やったこと

+

SSHでログインして以下を実行

+
## module 
+sudo lsmod | grep 8021q
+sudo modprobe --first-time 8021q
+sudo lsmod | grep 8021q
+
+## valn device
+sudo ip link add link eth2 name eth2.279 type vlan id 279
+sudo ip addr add 192.168.16.32/24 dev eth2.279
+ip a show eth2.279
+## 6: eth0.279@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
+##     link/ether 00:50:56:ba:1c:cd brd ff:ff:ff:ff:ff:ff
+##     inet 192.168.16.32/24 scope global eth0.279
+##        valid_lft forever preferred_lft forever
+sudo ip link set dev eth2 up
+sudo ip link set dev eth2.279 up
+
+

片方のインターフェースからのpingが返ってこない... +* http://d.hatena.ne.jp/hirose31/20120822/1345626743 +* http://e-garakuta.net/techinfo/doku.php/linux/advanced-routing

+
ip rule show
+## 0:      from all lookup local
+## 32766:  from all lookup main
+## 32767:  from all lookup default
+sudo ip rule add from 192.168.16.31 table 200 prio 200
+sudo ip route add default dev eth1 src 192.168.16.31 table 200
+sudo ip rule add from 192.168.16.32 table 300 prio 300
+sudo ip route add default dev eth2.279 src 192.168.16.32 table 300
+
+
+
+
+

+ docker +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/docker-swarm-init-on-debian-sid.html b/drafts/docker-swarm-init-on-debian-sid.html new file mode 100644 index 00000000..676a6c26 --- /dev/null +++ b/drafts/docker-swarm-init-on-debian-sid.html @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – docker swarm init on Debian Sid + + + + +
+ + + +
+
+ +

docker swarm init on Debian Sid

+

+ Posted on Tue 20 September 2016 in blog + +

+
+ + +
+ + +
+ +

内容

+

Debian Sid (2016/09/20 時点)で、 Docker Engine の swarm mode を初期設定したメモ。

+

手順

+

docker engine の設定

+

Installation on Debian

+
sudo apt-get purge -y "lxc-docker*"
+sudo apt-get purge -y "docker.io*"
+sudo apt-get update -y
+sudo apt-get install -y apt-transport-https ca-certificates
+sudo apt-key adv --keyserver p80.pool.sks-keyservers.net --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+echo "deb https://apt.dockerproject.org/repo debian-stretch main" | sudo tee /etc/apt/sources.list.d/docker.list
+sudo apt-get update -y
+sudo apt-get install -y docker-engine
+
+

swarm 初期化

+
# Manager
+$ sudo docker swarm init --advertise-addr 192.168.253.158
+Swarm initialized: current node (92c34zr76hdav65q97pybnii6) is now a manager.
+
+To add a worker to this swarm, run the following command:
+
+    docker swarm join \
+    --token SWMTKN-1-305k6qcpoghq89avwv0pu6dxj2e00utvno7hx7ctdp5no7meuu-737dwq5cmuab1p30hyx5rpd6t \
+    192.168.253.158:2377
+
+To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
+$ sudo docker node ls
+ID                           HOSTNAME    STATUS  AVAILABILITY  MANAGER STATUS
+92c34zr76hdav65q97pybnii6 *  workdebian  Ready   Active        Leader
+
+
# Add worker nodes to manager
+$ sudo docker swarm join --token SWMTKN-1-305k6qcpoghq89avwv0pu6dxj2e00utvno7hx7ctdp5no7meuu-737dwq5cmuab1p30hyx5rpd6t 192.168.253.158:2377
+
+

swarm での動作

+

...

+

TIPS

+

systemd unit file の中で、 EnvironmetFile=- というのは一体なに?

+

Custom Docker daemon options の例で、 EnvironmetFile=-... という形式の設定があった。これは一体なにか。

+
EnvironmentFile=-/etc/sysconfig/docker
+EnvironmentFile=-/etc/sysconfig/docker-storage
+EnvironmentFile=-/etc/sysconfig/docker-network
+
+

systemd.unit(5)には書かれていない。
+EnvironmetFile を含むいくつかの設定は、 systemd.exec(5) というのに書かれている。(exec となっているが、 configurationについてのもの)

+

EnvironmentFile= によると、

+
    The argument passed should be an absolute filename or wildcard expression, optionally prefixed with "-", which indicates that if the file does not exist, it will not be read and no error or warning message is logged. This option may be specified more than once in which case all specified files are read. If the empty string is assigned to this option, the list of file to read is reset, all prior assignments have no effect.
+
+

と書かれている。

+

どうして、ExecStart が2行書かれているの?

+

Dockerの unti fileを見ると、以下のように、ExecStart=が2つあり、1つは空、もう1つが実際に実行したいものを書いている、という設定を見ることになる。

+
ExecStart=
+ExecStart=/usr/bin/dockerd ...
+
+

これは、こう書かないといけない、という類のものらしい。
+1つ目は設定を消すためのもので消していないと、複数回ExecStartが書かれているという内容のエラーが出る。

+ +

tar.gz をダウンロードして、どこかのディレクトリに展開する

+

下記のように、curl でダウンロードしたものを標準出力に出して、それを tar で受けるのが、docker iamgeを小さく保つのには良さそう

+
RUN curl -sL "https://github.com/.../archive/${VERSION}.tar.gz" | tar -xzC "${APACHE_WEBROOT_DIR}" --strip-components=1
+
+

tar のオプションとして、 -C でディレクトリを指定していて、 これだけだと、ディレクトリの下に、解凍時に(割と一般的に)作成されるトップのフォルダができてしまうので、
+--strip-components=1 にして、トップのフォルダを無視する。

+

ちなみに、デバッグしたくなったら、以下のように od をすると便利そう。

+
RUN curl -sL "https://github.com/.../archive/${VERSION}.tar.gz" > /tmp/x && od -c /tmp/x | head
+
+
+
+
+

+ docker + debian +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/du-shu-memo-ichibanyasashiigurosuhatsukunojiao-ben.html b/drafts/du-shu-memo-ichibanyasashiigurosuhatsukunojiao-ben.html new file mode 100644 index 00000000..61d78595 --- /dev/null +++ b/drafts/du-shu-memo-ichibanyasashiigurosuhatsukunojiao-ben.html @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 読書メモ: いちばんやさしいグロースハックの教本 + + + + +
+ + + +
+
+ +

読書メモ: いちばんやさしいグロースハックの教本

+

+ Posted on Sat 26 August 2017 in blog + +

+
+ + +
+ + +
+ +

前提

+

マーケティングというより、サービスの効果測定を数値で追い、施策を実施、施策の効果を測定する、という一連の流れを行う必要を感じていたので読み始めた。
+念頭にあるサービスは、webサービスではあるけど、オウンドメディアみたいなコンテンツをユーザーに読ませることが主目的ではない。
+マーケティングの知識も経験もなく、3C分析などもこの2日くらいで勉強しはじめて知った。

+

メモ

+

Chapter 1 : グロースハックを理解する

+
    +
  • サービスの成長を定量化することで、絶対的な成果が見えるようになる
      +
    • 投資に対する説明や、メンバーのやる気も上がる
    • +
    +
  • +
  • グロースハッカーとは、サービスの成長に対して責任を持ち責務を果たす人間
      +
    • データからユーザー行動を明らかにする
    • +
    • いろいろな部署・役割の人と調整することも必要
    • +
    • プロジェクトリーダー的な人間が担当することが多い
    • +
    +
  • +
  • グロースハッカーに必要なスキル
      +
    • UX の設計は基本
    • +
    • データを元に意思決定するスキル
    • +
    • プロジェクトマネジメントのスキル
    • +
    +
  • +
  • グロースハッカーに必要なマインドセット
      +
    • マキャベリストの君主論
        +
      • 国家が聞きに陥った場合、政治家は(国家存続の)目的のために有効ならば、手段を選ぶべきではない
      • +
      +
    • +
    • 目的達成至上主義
    • +
    • 成果という唯一の目的のために、できうるすべてを行動に移す
        +
      • 素早く、たくさん、賢く失敗をして、そこから成功を導く
          +
        • Fail fast
        • +
        • Fail often
        • +
        • Fail smart
        • +
        +
      • +
      • 先にコップの器を大きくする
          +
        • 改善に注力するよりも、まずはサービスを大きくして、改善メリットが出るサイズになったら、細かい改善をする
        • +
        +
      • +
      +
    • +
    +
  • +
  • グロースハックのためには、事業について権限を持つ人をみんな巻き込むこと
  • +
  • グロースチームの構成
      +
    • 3人で構成する
        +
      • ハスラー : まとめ役。for the team。チームをこぶし、社内外の関係者と交渉できることが必要
      • +
      • ハッカー : 開発すべてを行うことができるエンジニア。技術的なアプローチで課題を解決し、未知ののものでも挑戦し、学習できることが必要
      • +
      • ヒップスター : UI/UX デザイナ。サービスの価値をデザインして、そのインターフェースを設計して実現できることが必要
      • +
      +
    • +
    • 人数が増えるとコミュニケーションのパスが増える(3人だと3本しかパスがないのに、4人だと6本のパスがある)
    • +
    • 物理的な距離が近いことも必要
        +
      • とにかくコミュニケーションコストは下げる
      • +
      +
    • +
    • かならず専任にすること
        +
      • 全体最適の考えが重要なのに、どこかで兼任していると、兼任先の部署の価値観に引っ張られる
      • +
      • 限られた時間でスピードを持ってtry&errorするために、意思決定から施策実行までできるチームが、成長施策に100%の時間を使って行う
      • +
      +
    • +
    +
  • +
  • グロースチームの作り方
      +
    • 身の回りの小さなことから始める
    • +
    • 製品開発チームから作る
    • +
    +
  • +
+

Chapter 2 : 基本のフレームワークを理解しよう

+
    +
  • AARRR モデル : サービス全体をユーザの行動に合わせて5つのステージに分ける
      +
    • Acquisition : ユーザー獲得
    • +
    • Activation : ユーザー活性化
    • +
    • Retention : 継続
    • +
    • Referral : 紹介
    • +
    • Revenue : 収益化
    • +
    +
  • +
  • ARRRA モデル
      +
    • AARRR モデルの欠点
        +
      • 施策を行うべき順番ではない
      • +
      • 離脱率に力点があり、UXの最大化という最も重視すべき点が抜けている
      • +
      +
    • +
    • ARRRA モデルでは、AARRR モデルとステージごとに意味が違う
        +
      • Activation : ユーザー活性化
          +
        • 製品の価値が顧客が求めているものか?
        • +
        • それが初回来訪時にしっかりと伝わっているか?
        • +
        +
      • +
      • Retention : 継続
          +
        • 顧客は使い続けてくれるくらい、製品の価値に満足しているか?
        • +
        +
      • +
      • Referral : 紹介
          +
        • 顧客は友人に伝えたくなるほど、製品の価値に満足しているか?
        • +
        +
      • +
      • Revenue : 収益化
          +
        • 顧客はお金を払ってくれるほど、製品の価値に満足しているか?
        • +
        +
      • +
      • Acquisition : ユーザー獲得
          +
        • 製品の価値をひろめるために、正しいチャネルと訴求軸を選べているか?
        • +
        +
      • +
      +
    • +
    +
  • +
  • まずは Activation を達成する
      +
    • サービスは、「誰の・どんな課題を・どうやって解決するのか」で成り立っているが、そもそもそんな対象が存在していない、という場合がある
    • +
    • 本格的な開発をするより先に、「そもそも解決しようとしている課題を、本当に顧客が抱えているのか?」「このサービスは顧客が求めるものか?」を検証すること
    • +
    • ニーズがあることがわかったら、顧客の初回体験時にしっかりと製品の価値が伝わるようにします
    • +
    • Activation を達成したら、 Retention のための仕掛けを製品に組み込んでいく
    • +
    +
  • +
  • ARRRA モデルと他のフレームワークの比較
      +
    • ARRRA モデルとリーンアナリティクス、グロースピラミッドなどは共通点が多い
    • +
    • 全て、サービスに価値を感じる顧客の発見、を最初に行う
        +
      • リーンアナリティクスでは、 Emphathy
      • +
      • グロースピラミッドでは、 PSF(Problem Solution Fit)
      • +
      +
    • +
    • 他のステップも似ている
    • +
    +
  • +
  • 今いる成長ステージを確認する
      +
    • P.45 のチェックシート
    • +
    +
  • +
  • ARRRA の順で考えるが、最後まで Acquisition を行わない、という意味ではない
      +
    • 成長の過程で、何度も A→ R→R→R→A→.A→.. という動きを行う
    • +
    • サイクルをどういうタイミングで回していくかは、適当にユーザー数などで事前に決めておくと良い
    • +
    +
  • +
+

Chapter 3 : まずは価値提供から手を付けよう

+
    +
  • アクティベーション = PSF + ユーザーオンボーディング
      +
    • サービスに価値があるのか
    • +
    • 価値を初回にユーザーに伝えられているか
    • +
    +
  • +
+

PSF

+

以下を検証する +* 顧客は本当にその課題を抱えているか +* 解決法のアプローチが間違った前提に立脚していないか

+

ユーザーオンボーディング

+
+
+
+

+ marketing +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/elasticsearch-nomemo.html b/drafts/elasticsearch-nomemo.html new file mode 100644 index 00000000..db4bf1be --- /dev/null +++ b/drafts/elasticsearch-nomemo.html @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Elasticsearch のメモ + + + + +
+ + + +
+
+ +

Elasticsearch のメモ

+

+ Posted on Tue 11 December 2018 in blog + +

+
+ + +
+ +
+

資料

+ +

Node Type

+

node.master, node.data, node.ingest あたりで決まる。

+
    +
  • Master-eligible node: master only
  • +
  • Data node: data only
  • +
  • Ingest node: ingest true
  • +
  • Tribe node: tribe.* settings で指定されるやつだけど、廃止予定なので知らなくて良い。 +
  • +
  • coordinator: all false
  • +
+

Index

+

ESの index は複数の shard から成る。
+ES shard = Lucene index で、 Lucene index は複数のsegment から成る。
+Lucene はすべての segment を sequencial に検索する(segment ごとに並列ではない)ので、
+たくさん segment があると遅くなる。
+segment のマージは、だいたい重い。

+

routing key

+
    +
  • https://www.elastic.co/blog/customizing-your-document-routing
  • +
  • https://medium.com/hello-elasticsearch/elasticsearch-f17e9134deb6
  • +
+

通常、ドキュメントIDをもとにshardが決定されるが、
+routing key を使うことで、 routing key をもとに shard が決まるようになる。

+

routing key を指定する方法としては、 +* routing parameter
+ * 保存するときにも指定が必要 +* field
+ * mapping 定義に書く

+

search optimization

+

https://www.ebayinc.com/stories/blogs/tech/elasticsearch-performance-tuning-practice-at-ebay/

+

write heavy

+
    +
  • +

    https://www.elastic.co/guide/en/elasticsearch/reference/master/tune-for-indexing-speed.html

    +
      +
    • bulk request で multi thread でやる
        +
      • TOO_MANY_REQUESTS (429) response codes 返ってきたら待つ
      • +
      +
    • +
    • index.refresh_interval
        +
      • 1sec ごとにsegment を作っているのを伸ばす
      • +
      • 当然 refresh 時のsegment mergeは重くなる
      • +
      +
    • +
    • disabling swapping
    • +
    • filesystem cache 分のメモリも確保する
    • +
    • Use auto-generated ids
        +
      • id 指定すると、重複チェックする分で遅くなる
      • +
      +
    • +
    • indices.memory.index_buffer_size
    • +
    • disable _filed_names field
    • +
    +
  • +
  • +

    Gist: ElasticSearch config for a write-heavy cluster: 参考程度
    + *

    +
  • +
+

ESのメトリック監視

+

その他設計話

+
    +
  • sizing +
  • +
  • segment
      +
    • merge scheduling
        +
      • related settings
          +
        • max_thread_count
        • +
        +
      • +
      • related api +
      • +
      +
    • +
    +
  • +
  • include_type_name
      +
    • 1 index内に複数のタイプを入れることができなくなりデフォルトで、 include_type_name=false になる予定らしいので、入れたほうが良さそう
    • +
    +
  • +
+
+
+
+

+

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/esxinoinsutoruwopxe-bootsezunizi-dong-hua-shitai.html b/drafts/esxinoinsutoruwopxe-bootsezunizi-dong-hua-shitai.html new file mode 100644 index 00000000..75d0554c --- /dev/null +++ b/drafts/esxinoinsutoruwopxe-bootsezunizi-dong-hua-shitai.html @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – ESXiのインストールをPXE bootせずに自動化したい + + + + +
+ + + +
+
+ +

ESXiのインストールをPXE bootせずに自動化したい

+

+ Posted on Thu 17 September 2015 in blog + +

+
+ + +
+ +
+

動機

+

PXEブートによるインストールでは、最初にサーバーとDHCPが通信する場合、サーバー側はVLANを利用できない。
+DHCPサーバー側がVLANセグメントにいると、サーバーの上位スイッチの設定を変更し、untagしてもらう必要がある。

+

そのため、すでにサービス投入されているようなサーバーたちで、untagする用のネットワークがない場合、
+ネットワーク構成を変更しづらいため、PXEブートによるインストールが難しい。
+(と隣のチームの人が困っていた。)

+

世の中の企業が使っているような物理サーバーは、リモートからISOがマウントできたりするようなので、そのあたりの機能で自動インストールしてみる。

+

方法の概要

+

まず、半自動で良いなら、kickstartファイルを指定することで、大部分を自動化できる。
+問題なのは、ISOをマウントする部分と、ISOからブートしたあとkickstartファイルを指定してインストールを進める部分になる。

+

まず、ESXiのISOをカスタマイズして、kickstartファイルを決め打ちで指定するようにし、その後ISOをマウントする部分を検討しよう。

+

ISOのカスタマイズ

+

まずISOの中身を取り出す。

+
$ sudo mount -o iso9660 -o loop <ISO filename> /mnt
+$ mkdir /tmp/workdir
+$ cp -r /mnt* /tmp/workdir
+$ chmod -R +w /tmp/workdir
+$ sudo umount /mnt
+
+ +

次に、boot.cfg を編集する。

+
bootcfgの中身
+
+ +

ISOに固める。

+
$ genisoimage -relaxed-filenames -R -T -J -o custom.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /tmp/workdir
+
+ +
$ genisoimage -relaxed-filenames -R -T -J -o ks.iso /tmp/20150917_ks
+
+
+
+
+

+ VMware + ESXi + automation +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/fluentd-plugin-secure-forward-nososuwodu-ndemiruoutput-puraguinbian.html b/drafts/fluentd-plugin-secure-forward-nososuwodu-ndemiruoutput-puraguinbian.html new file mode 100644 index 00000000..6454223a --- /dev/null +++ b/drafts/fluentd-plugin-secure-forward-nososuwodu-ndemiruoutput-puraguinbian.html @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – fluentd-plugin-secure-forward のソースを読んでみる(Output プラグイン編) + + + + +
+ + + +
+
+ +

fluentd-plugin-secure-forward のソースを読んでみる(Output プラグイン編)

+

+ Posted on Thu 18 December 2014 in blog + +

+
+ + +
+ + +
+

昨日の続きで、次はOutput部分の処理を見ようと思います。
+Fluentdプラグイン自体の読み方はだいぶわかったので、今日はもう少し詳しいロジックを見ていこうと思います。

+ +

さっそく読む

+

initialize

+
    def initialize
+      super
+      require 'socket'
+      require 'openssl'
+      require 'digest'
+      require 'resolve/hostname'
+    end
+
+

必要なライブラリをrequireしています。
+こういうのって、クラス定義やファイルに書かずに、initializeでやると嬉しいことがあるんでしょうか。
+あまり深く考えてないですが、それほど気にしなくとも良いかな、と思っています。

+

configure

+
    def configure(conf)
+      super
+      ...
+      @nodes = []
+      @servers.each do |server|
+        node = Node.new(self, server)
+        node.first_session = true
+        @nodes.push node
+      end
+      ...
+      @next_node = 0
+      @mutex = Mutex.new
+      ...
+      true
+    end
+
+

@serversに何が入っているか考えてみます。例によって、

+
    require 'fluent/mixin/config_placeholders'
+    ...
+    module Fluent
+      class SecureForwardOutput < ObjectBufferedOutput
+        include Fluent::Mixin::ConfigPlaceholders
+        ...
+      end
+    end
+
+

という風に書かれているので、super以降は、プレースホルダーが展開されています。そういうわけで、@serversには、設定ファイル中のserverディレクティブの設定値が展開された状態で入っています。
+server情報を1つずつ、output_nodeとしてインスタンスを作成していき、@nodesには、各server情報から作成した、output_nodeを格納しています。
+Mutexを使っているのは、output先が複数あるときに、競合しないようにするためだと思います。

+

start

+

startを見ると、:node_watcherを新しいスレッドで実行します。
+なので、node_watcherを見てみましょう。

+
    def node_watcher
+      ...
+      loop do
+        ...
+        (0...nodes_size).each do |i|
+          ...
+          next if @nodes[i].established? && ! @nodes[i].expired?
+
+          next if reconnectings[i]
+
+          reason = :expired
+
+          unless @nodes[i].established?
+            log.warn "dead connection found: #{@nodes[i].host}, reconnecting..."
+            reason = :dead
+          end
+
+          node = @nodes[i]
+          log.debug "reconnecting to node", :host => node.host, :port => node.port, :expire => node.expire, :expired => node.expired?
+
+          renewed = node.dup
+          renewed.start
+
+          Thread.pass # to connection thread
+          reconnectings[i] = { :conn => renewed, :at => Time.now, :reason => reason }
+        end
+        ...
+
+

各output_nodeは、
+- established
+- expired
+- reconnecting

+

stop

+
+
+
+

+ Ruby + Fluentd +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/fluentd-pluginwozuo-cheng-surutokinomemo.html b/drafts/fluentd-pluginwozuo-cheng-surutokinomemo.html new file mode 100644 index 00000000..30f7fb53 --- /dev/null +++ b/drafts/fluentd-pluginwozuo-cheng-surutokinomemo.html @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Fluentd Pluginを作成するときのメモ + + + + +
+ + + +
+
+ +

Fluentd Pluginを作成するときのメモ

+

+ Posted on Fri 19 December 2014 in blog + +

+
+ + +
+ + +
+ +

資料

+ +

参考にしたプラグイン

+
    +
  1. fluentd/in_tail.rb at master · fluent/fluentd
  2. +
  3. fluentd-plugin-secure-forward
  4. +
  5. fluentd-plugin-dstat
  6. +
+

作るもの

+

設定された文字列を設定ファイルに設定された時間感覚で、outputする。
+設定ファイルのイメージは以下。

+
+  <source>
+    type practice
+    loopstr "foobar"
+  </source>
+
+

準備

+
    +
  1. (gemにするとき、)bundle gem fluent-plugin-hogehoge でgemを作成。
    + gemにしなくても、fluentdのplugins以下に直接おけば使える。
  2. +
  3. 実際のfluentdで実験できるように、fluentdをインストールして用意しておく。
    + 手元でvagrantやdockerを上げておくと便利。
  4. +
+
+
+
+

+ Fluentd + Ruby +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/gnupg-2xdegit-commitnishu-ming-woshiyoutosurutoeragachu-rumemo.html b/drafts/gnupg-2xdegit-commitnishu-ming-woshiyoutosurutoeragachu-rumemo.html new file mode 100644 index 00000000..b92a684a --- /dev/null +++ b/drafts/gnupg-2xdegit-commitnishu-ming-woshiyoutosurutoeragachu-rumemo.html @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – GnuPG 2.xでgit commitに署名をしようとするとエラーが出るメモ + + + + +
+ + + +
+
+ +

GnuPG 2.xでgit commitに署名をしようとするとエラーが出るメモ

+

+ Posted on Sun 10 July 2016 in blog + +

+
+ + +
+ + +
+ +

参考

+
    +
  • http://www.zsh.org/mla/users/2015/msg01173.html
  • +
+

エラー内容

+
$ git commit -m "commit"
+gpg: signing failed: Inappropriate ioctl for device
+gpg: signing failed: Inappropriate ioctl for device
+error: gpg failed to sign the data
+fatal: failed to write commit object
+
+

対処

+

GPG_TTY=$(tty) として、ttyを指定すれば良いらしい。
+どうも、署名をするときのパスフレーズを入力する画面を表示しようとしてエラーが出ているように見える。

+

余談

+

.gitconfig をgitで管理しているので、マシンに依存する設定を分割している。
+今のところは鍵もわけることにしている。

+

.gitconifg

+
[include]
+path=.gitconfig.local
+...
+
+

.gitconfig.local

+
[user]
+signingkey = (鍵ID)
+[commit]
+gpgsign = true
+[gpg]
+program = gpg2
+
+
+
+
+

+ git + gpg +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/golangdelinuxkomandowoshu-itashi-nomemo.html b/drafts/golangdelinuxkomandowoshu-itashi-nomemo.html new file mode 100644 index 00000000..2b2c6725 --- /dev/null +++ b/drafts/golangdelinuxkomandowoshu-itashi-nomemo.html @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – GolangでLinuxコマンドを書いた時のメモ + + + + +
+ + + +
+
+ +

GolangでLinuxコマンドを書いた時のメモ

+

+ Posted on Sun 22 March 2015 in blog + +

+
+ + +
+ + +
+ +

やり始めて困ったこと

+
    +
  1. +

    ディレクトリ構成をどうすべきか?
    + loggerなど、共通のモジュールをどう配置するべきか迷った。

    +

    - src + |-- foo + | - foo.go + |-- bar + | - bar.go + L-- util : 共通モジュールはこのディレクトリ以下に + - hogeee.go

    +
  2. +
  3. +

    packageの名前分割単位
    + ディレクトリ構成から決める。foo以下なら、fooパッケージ。

    +
  4. +
  5. +

    コメントの書き方

    +
  6. +
  7. 関数のコメント : funcの上に書く
  8. +
  9. package のコメント: packageの上に書く。(同じパッケージに複数書くと、多分ソートされて最初のやつ。)
  10. +
+

テスト

+
    +
  1. +

    テストの仕方
    + foo/foo_test.goというファイルで書く。

    +

    ```
    + package foo

    +

    import (
    + "testing"
    + )

    +

    func TestSetLogger(t *testing.T) {
    + if logging := SetLogger(); logging == nil {
    + >-t.Errorf("Cannot Get Logger")
    + }
    + }
    + ```

    +
  2. +
  3. +

    型情報をどうやって取得するのか
    + reflectパッケージを使う。

    +

    reflect.TypeOf(0) // => reflect.Type オブジェクトが返る + reflect.TypeOf(0).Kind() + reflect.TypeOf(0).Name() + reflect.TypeOf(0).NumMethod() // メソッドの数がわかる + reflect.TypeOf(0).Method(0) // reflect.TypeOf(0)(=int)をレシーバとする0番目のメソッド

    +
  4. +
+

実装

+
    +
  1. +

    引数の扱い

    +
  2. +
  3. +

    os.Argsを使う (全部自分でやるとき)

    +
  4. +
  5. +

    flag パッケージを使う (ちょっと凝ったことをやるとき)

    +
  6. +
  7. +

    ファイルの情報を取得

    +
  8. +
  9. +

    os.Stat

    +
  10. +
  11. io.Ioutil
  12. +
  13. filepath.Walk
  14. +
+

最低限やること

+
    +
  1. 引数を見て処理をする
  2. +
  3. 正規表現でやる
  4. +
  5. オプションの実装
  6. +
  7. 2, 3のオプションの実装
  8. +
+
+
+
+

+ golang +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/inhuradezainpatan.html b/drafts/inhuradezainpatan.html new file mode 100644 index 00000000..ba7f0ae0 --- /dev/null +++ b/drafts/inhuradezainpatan.html @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – インフラデザインパターン + + + + +
+ + + +
+
+ +

インフラデザインパターン

+

+ Posted on Mon 09 February 2015 in blog + +

+
+ + +
+ +
+

メモ

+

1. インフラデザインパターンとはなにか。

+
    +
  • 要件定義→ 設計→ 構築→ テスト
  • +
  • 要件定義
  • +
  • 機能要件
  • +
  • 非機能要件
      +
    • 非機能要求グレード
    • +
    • [[http://www.ipa.go.jp/sec/softwareengineering/reports/20100416.html]]
    • +
    • [[http://www.ipa.go.jp/sec/softwareengineering/std/ent03-b.html]]
    • +
    • [[http://www.ipa.go.jp/sec/reports/20130311.html]]
    • +
    +
  • +
+

2. 可用性要件の実現策

+
+
+
+

+ + Infrastructure +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/ipv6noji-ben-nitsuitematomeru.html b/drafts/ipv6noji-ben-nitsuitematomeru.html new file mode 100644 index 00000000..b4f52fbc --- /dev/null +++ b/drafts/ipv6noji-ben-nitsuitematomeru.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – IPv6の基本についてまとめる + + + + +
+ + + +
+
+ +

IPv6の基本についてまとめる

+

+ Posted on Thu 17 December 2015 in blog + +

+
+ + +
+ + +
+ +

自宅環境をデュアルスタックにしたいので、ルーターのIPv6の設定を調べていた。
+IPv6自体の理解が一部怪しいところもあったので、基本的なところから、まとめていく。

+

アドレスの表現

+

アドレス形式

+

128bitを使ったアドレス。

+

表示形式

+

2001:0db8:0:0:1111:2222:3333:9abe のような8つの16bitの16進数で表示される。
+ただ、ipv6アドレスは長くなりがちであるので、書くのが大変だし読みづらい。
+0が続くフィールドは省略できるように、ということで、RFC5952 がある。
+ざっくり言うとルールとしては、以下の3つ。

+
    +
  1. 各フィールドの先頭に0がある場合には省略する
      +
    • 例えば、 ...:00a2:... というのは、 ...:a2:... と書かれる
    • +
    +
  2. +
  3. フィールドに0が続く場合、 :: を使う
      +
    • ...:a:0:0:0:b:... というアドレスがあった時、0がたくさん続くと読みづらい。こういう場合に、...:a::b:... と書くことにする。::の部分は0が入る。
        +
      • 1::2 とあったら、1:0:0:0:0:0:0:2 というアドレスになるということ
      • +
      +
    • +
    • ...:a:0:b:... というような 0のフィールドが続かない場合には、 ...:a::b:... と書くのはNG。
    • +
    • ::は最も短い表現ができるようにする
        +
      • ...a:0:0:0:0:b... があった時、 ...a:0::b などの中途半端に ::で省略するのはNG。
      • +
      • 最も0のフィールドが連続している場所に :: を利用する。例えば、a:0:0:b:0:0:0:c というアドレスがあった場合、 a::b:0:0:0:c と書くのは許されない。必ず、a:0:0:b::c である必要がある。
          +
        • (補足) a::b::c と書くのはNG。 元のアドレスが復元できないので。 a:0:0:0:b:0:0:cでも同じになってしまう。そのため、 :: は1度しか使えない。
        • +
        +
      • +
      • a:0:0:b:0:0:c:d のように、省略可能なフィールドが複数あり、長さが同じ場合、先頭にある方を省略する。 つまり、 a::b:0:0:c:d と書く。
      • +
      +
    • +
    +
  4. +
  5. "A"~"F"の文字は小文字を使う
      +
    • ...:123A:... などは ...:123a: と書かれる。
    • +
    • インターネット上の文書で、これに従っていないものが散見されるので、注意したほうが良い。
    • +
    +
  6. +
+

アドレスの分類 : RFC4291

+

アドレスタイプの分類

+
    +
  1. ユニキャスト
      +
    • インターフェースの識別子になる。
    • +
    • ユニキャストアドレスにパケットが送信された場合、対象のユニキャストアドレスを持つ単一のインターフェースにパケットが配送される。
    • +
    +
  2. +
  3. エニーキャストアドレス
      +
    • インターフェースの集合の識別子になる。
    • +
    • エニーキャストアドレスにパケットが送信された場合、対象のエニーキャストアドレスに所属するインターフェースのうち、1つのインターフェースにパケットが配送される。
        +
      • ルーティングプロトコル上で決まる、最も近い インターフェースに配送される
      • +
      +
    • +
    +
  4. +
  5. マルチキャスト
      +
    • インターフェースの集合の識別子になる。
    • +
    • マルチキャストアドレスにパケットが送信された場合、対象のマルチキャストアドレスに所属する、すべてのインターフェースにパケットが配送される。
    • +
    +
  6. +
+

IPv4との違いとしては、
+- エニーキャストアドレスという概念ができた
+- ブロードキャストアドレスがなく、代わりにマルチキャストアドレスを使う

+

ユニキャスト

+

アドレス形式

+

{n bit: subnet prefix}:{128-n bit: Interface ID} という形式になっている。
+Interface IDについては、生成方法がいくつかあるけど、ここでは書かない。

+

+
    +
  1. 未指定アドレス
      +
    • 0:0:0:0:0:0:0:0
    • +
    • インターフェースにアサインされることはない
    • +
    +
  2. +
  3. loopback アドレス
      +
    • 0:0:0:0:0:0:0:1
    • +
    • Link-Local アドレスの1つとして扱われる
    • +
    +
  4. +
  5. Link-Local ユニキャストアドレス
      +
    • fe80::/10
    • +
    • インターフェースは必ず、1つはLink-Localユニキャストアドレスを持つ
    • +
    • ルーターによって転送されないので、同じL2ドメインにあるノードでしか通信できない
    • +
    +
  6. +
  7. ユニークローカル ユニキャストアドレス : RFC4193
      +
    • fc00::/7
    • +
    • IPv4でいうところのプライベートアドレスとして使う想定で運用される(グローバルで疎通できないようになっているはず)
    • +
    • アドレス範囲は以下のような分類がある
        +
      • fc00::/8 : IANAで管理されるようなので、申請したら取れるようになると思うけど、まだアサインされる方法がないので、使う方法がない。
      • +
      • fd00::/8 : 勝手に使って良い。ただ、擬似乱数でsubnet prefixを生成しなければならない。
          +
        • 生成するツールを公開している人もいる
        • +
        +
      • +
      +
    • +
    +
  8. +
  9. Global ユニキャストアドレス
      +
    • ルーターによって転送されるなど、ルーティングされる範囲で通信が可能なアドレス
    • +
    • グローバルに通信ができるかどうかは、上位ルーターの設定次第なので、特に区別はない
    • +
    +
  10. +
+

エニーキャスト

+

ユニキャストのアドレス空間から割り当てられるため、アドレスをみただけでは、エニーキャストかどうか判別できない。
+複数のインターフェースに割り当てられた時点で、エニーキャストアドレスになる。
+割り当てられたインターフェース側では、それがエニーキャストアドレスであることがわかるように構成されなければならない。

+

割り当てられたエニキャストアドレスに足しいて、すべてのインターフェースが属する、トポロジカルな範囲を識別するための、最小のプレフィックスPがある。
+このPの範囲の中では、エニキャストアドレスは、ルーティングシステムとは別のシステムとして(ホストルートと呼ばれる)保守されなければならない。
+Pの範囲の外では、エニキャストアドレスをPのためのルーティングエントリに集約しても良い。

+

+

サブネットルータ エニキャストアドレスは事前に定義されている。
+{n bit: subnet prefix}:: というアドレスは、サブネット上のどれか1つのルーターに配送されることになる。

+

マルチキャスト

+

FF00::/8 が利用される。

+
| 8bit   | 4bit |  4bit |                 112bit                  |
++--------+------+-------+-----------------------------------------+
+|11111111| flag | scope |                 group ID                |
++--------+------+-------+-----------------------------------------+
+
+
    +
  • flag = 0RPT というビット列
      +
    • R
        +
      • 0 : multicast address that does not embed the address of the RP (RPはRendezvous Point のこと)
      • +
      • 1 : multicast address that embeds the address on the RP.
      • +
      +
    • +
    • P
        +
      • 0 : network prefix ベースでない場合。(network prefix ベースであるときは、group IDの中に、network prefixの情報が埋め込まれている)
      • +
      • 1 : network prefix ベースの割当。この場合、Tは必ず1になる。
      • +
      +
    • +
    • T
        +
      • 0 : permanent
          +
        • "well-known"なものに使う。つまりIANAで管理されている。
        • +
        +
      • +
      • 1 : non-permanently-assigned
      • +
      +
    • +
    +
  • +
  • +

    scope

    +
      +
    • 0: reserved
    • +
    • 1: Interface-Local scope
    • +
    • 2: Link-Local scope
    • +
    • 3: reserved
    • +
    • 4: Admin-Local scope
    • +
    • 5: Site-Local scope
    • +
    • 6: (unassigned)
    • +
    • 7: (unassigned)
    • +
    • 8: Organization-Local scope
    • +
    • 9: (unassigned)
    • +
    • A: (unassigned)
    • +
    • B: (unassigned)
    • +
    • C: (unassigned)
    • +
    • D: (unassigned)
    • +
    • E: Global scope
    • +
    • F: reserved
    • +
    +
  • +
  • +

    group ID

    +
      +
    • マルチキャストグループの識別子
    • +
    +
  • +
+

+

FF01::1, FF02::1 はそれぞれ、インターフェースローカルか、リンクローカルのすべてのIPv6ノードのグループ。

+
+
+
+

+ IPv6 + network +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/kubernetes-instal-step.html b/drafts/kubernetes-instal-step.html new file mode 100644 index 00000000..15397008 --- /dev/null +++ b/drafts/kubernetes-instal-step.html @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – kubernetes instal step + + + + +
+ + + +
+
+ +

kubernetes instal step

+

+ Posted on Tue 24 October 2017 in blog + +

+
+ + +
+ + +
+ +

kubectl をインストール

+

kubernetes の管理に使うので、 kubectl をインストール

+
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x ./kubectl
+
+

実行できるか確認する。

+
$ kubectl version --client -o yaml
+clientVersion:
+  buildDate: 2017-10-11T23:27:35Z
+  compiler: gc
+  gitCommit: f38e43b221d08850172a9a4ea785a86a3ffa3b3a
+  gitTreeState: clean
+  gitVersion: v1.8.1
+  goVersion: go1.8.3
+  major: "1"
+  minor: "8"
+  platform: linux/amd64
+
+

local で k8s を立てる

+

minikube をインストール

+

最新バージョンを確認してダウンロードする

+
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.3/minikube-linux-amd64 && chmod +x minikube
+
+

実行できるか確認する。

+
$ minikube version
+minikube version: v0.22.3
+
+

k8s cluster を作る

+
$ minikube start
+Starting local Kubernetes v1.7.5 cluster...
+Starting VM...
+Downloading Minikube ISO
+ 139.09 MB / 139.09 MB [============================================] 100.00% 0s
+Getting VM IP address...
+Moving files into cluster...
+Setting up certs...
+Connecting to cluster...
+Setting up kubeconfig...
+Starting cluster components...
+Kubectl is now configured to use the cluster.
+
+
$ kubectl get nodes
+NAME       STATUS    ROLES     AGE       VERSION
+minikube   Ready     <none>    1m        v1.7.5
+
+

minikube ちょっと触る

+
    +
  • minikube dashboard
  • +
  • minikube status
  • +
  • minikube ip
  • +
  • minikube ssh
  • +
  • minikube docker-env
  • +
+

+
$ kubectl run ghost --image=ghost:latest
+deployment "ghost" created
+$ kubectl expose deployments ghost --port=2368 --type=NodePort
+service "ghost" exposed
+$ kubectl get pods
+NAME                     READY     STATUS    RESTARTS   AGE
+ghost-1604807603-ttz54   1/1       Running   0          2m
+
+

expose したサービスをブラウズで開くのは minikube でできる。

+
$ minikube service ghost
+
+

状態を見る

+
$ kubectl get pods,rs,deployments
+NAME                        READY     STATUS    RESTARTS   AGE
+po/ghost-1604807603-ttz54   1/1       Running   0          11m
+po/redis-2048254088-kmz83   1/1       Running   0          3m
+
+NAME                  DESIRED   CURRENT   READY     AGE
+rs/ghost-1604807603   1         1         1         11m
+rs/redis-2048254088   1         1         1         3m
+
+NAME           DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
+deploy/ghost   1         1         1            1           11m
+deploy/redis   1         1         1            1           3m
+
+$ kubectl logs redis-2048254088-kmz83
+1:C 24 Oct 15:53:00.672 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
+1:C 24 Oct 15:53:00.672 # Redis version=4.0.2, bits=64, commit=00000000, modified=0, pid=1, just started
+1:C 24 Oct 15:53:00.672 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
+1:M 24 Oct 15:53:00.675 * Running mode=standalone, port=6379.
+1:M 24 Oct 15:53:00.675 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
+1:M 24 Oct 15:53:00.675 # Server initialized
+1:M 24 Oct 15:53:00.675 * Ready to accept connections
+
+
+
+
+

+ kubernetes + docker + debian +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/linux-woan-xin-shiteyun-yong-surutamenidebianwoli-ni.html b/drafts/linux-woan-xin-shiteyun-yong-surutamenidebianwoli-ni.html new file mode 100644 index 00000000..097c1a24 --- /dev/null +++ b/drafts/linux-woan-xin-shiteyun-yong-surutamenidebianwoli-ni.html @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Linux を安心して運用するために(Debianを例に) + + + + +
+ + + +
+
+ +

Linux を安心して運用するために(Debianを例に)

+

+ Posted on Thu 01 June 2017 in blog + +

+
+ + +
+ + +
+ +

やること

+
    +
  • 意図しないアクセスを防ぎたい
      +
    • Firewall の設定
    • +
    • fail2ban
    • +
    • SSH のパスワード認証の拒否
    • +
    • SELinux
    • +
    +
  • +
  • 攻撃の未然防止をしたい
      +
    • 脆弱性スキャン
        +
      • vuls
      • +
      • debsecan
      • +
      +
    • +
    • 設定のチェック
        +
      • lynis
      • +
      +
    • +
    +
  • +
  • ウイルスを検知したい
      +
    • Antivirusソフトウェアの実行
    • +
    +
  • +
  • 攻撃を受けたことに気づきたい
      +
    • rootkit 対策(rkhunter, chkrootkit)
    • +
    • auditd
    • +
    • tripwire
    • +
    • 気休め系: debsums, etckeeper
    • +
    +
  • +
  • 設定が悪くないかを見ておきたい
      +
    • OpenSCAP
        +
      • Debian ではまだ unstable にしかないし、今回はやらない
      • +
      • ポリシーもRHELの方がサポートされているらしい
      • +
      • https://wiki.debian.org/UsingSCAP
      • +
      +
    • +
    +
  • +
+

実行環境

+
$ uname -a
+Linux workdebian 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux
+
+

やったこと

+

clamav

+
$ sudo apt install clamav clamav-daemon
+$ sudo chmod o+w /etc/clamav/freshclam.conf
+$ sudo vim /etc/clamav/freshclam.conf
+- DatabaseMirror db.local.clamav.net
++ DatabaseMirror db.jp.clamav.net
+$ sudo chmod o-w /etc/clamav/freshclam.conf
+$ sudo systemctl restart clamav-freshclam
+$ sudo vim /etc/clamav/clamd.conf
+$ sudo systemctl restart clamav-daemon
+
+

etckeeper

+
$ sudo apt install etckeeper
+
+

何か変更した時

+
$ cd /etc/
+$ sudo git status
+$ sudo git commit -am "foo bar"
+
+

どこかに push しておくと便利だと思うけど、今回はやらない。

+

rkhunter

+
$ sudo apt install rkhunter
+
+

定義ファイルの更新

+
$ sudo rkhunter --update
+$ sudo rkhunter --propupd
+
+

スキャン

+
$ sudo rkhunter -c --sk --rwo
+Warning: Hidden directory found: /etc/.java
+Warning: Hidden directory found: /etc/.git
+Warning: Hidden file found: /etc/.etckeeper: ASCII text
+Warning: Hidden file found: /etc/.gitignore: ASCII text
+sudo rkhunter -c --sk --rwo  9.45s user 7.24s system 28% cpu 57.817 total
+
+

Warningの修正(このWarningの内容は問題ないので、次回以降表示したくない)

+
$ sudo vim /etc/rkhunter.conf
+- #ALLOWHIDDENDIR=/etc/.java
+- #ALLOWHIDDENDIR=/etc/.git
++ ALLOWHIDDENDIR=/etc/.java
++ ALLOWHIDDENDIR=/etc/.git
+...
+- #ALLOWHIDDENFILE=/etc/.gitignore
+- #ALLOWHIDDENFILE=/etc/.etckeeper
++ ALLOWHIDDENFILE=/etc/.gitignore
++ ALLOWHIDDENFILE=/etc/.etckeeper
+
+

Lynis

+
$ sudo apt install lynis
+
+

スキャン

+
$ sudo lynis audit system --verbose
+
+

cronの設定
+https://cisofy.com/documentation/lynis/#cronjobs に記載されているとおり、 --cronjobs をつけるらしい。

+

auditd

+
$ sudo apt install auditd
+
+

debsums, debsecan

+
$ sudo apt install debsums debsecan
+
+

vuls

+
+
+
+

+ linux +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/open-api-30-nixiang-ketesu-zhen-rishiteikusuo-cun.html b/drafts/open-api-30-nixiang-ketesu-zhen-rishiteikusuo-cun.html new file mode 100644 index 00000000..be5f774b --- /dev/null +++ b/drafts/open-api-30-nixiang-ketesu-zhen-rishiteikusuo-cun.html @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Open API 3.0 に向けて素振りしていく所存 + + + + +
+ + + +
+
+ +

Open API 3.0 に向けて素振りしていく所存

+

+ Posted on Fri 19 May 2017 in blog + +

+
+ + +
+ + +
+ +

Open API Speciification(以下 OASと書く。) 3.0 がだいぶまとまってきているようなので、
+そろそろ移行の準備をしようと、調べたことをメモしておきます。

+

資料

+
    +
  • OAS 3.0。現状、 OpenAPI.next ブランチが 3.0 のためのブランチになっている。
  • +
  • https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md
  • +
  • これを書いている時点では、 Version 3.0.0-rc2 になっている
  • +
  • Open API Initiative のブログ
  • +
  • https://www.openapis.org/uncategorized/2017/03/09/api-craft-sf-meetup-open-api-specification-3-0
  • +
  • https://www.openapis.org/blog/2017/03/01/openapi-spec-3-implementers-draft-released
  • +
  • 日本語資料
  • +
  • OpenAPI 3.0プレビュー: https://www.infoq.com/jp/news/2017/02/openapi-3
  • +
+

Swagger 2.0 (=OAS 2.0) から OAS 3.0.0-rc2の変更点のサマリ

+

全体の構造が大きく変更されて、components に色々突っ込まれた。

+

書き方として大きく変わったと感じるのは、 +* request body に入れるparameter(これまで in: body と書いていたもの) が、 requestBody に入れることになっている +* cookie に入れるパラメータも parameterに書くことになった

+

それ以外の点として個人的に嬉しいのは、以下のあたり。 +* anyOf, oneOf, not が追加 +* nullable, deprecated, writeOnly が追加 +* セキュリティ定義まわりの拡張

+

これまでswaggerで表現できなかったような既存のAPIもある程度サポートできるようになってきたように思います。

+

OAS 3.0書いてみる

+

Swagger 2.0 のサンプル

+

よくある petstore サンプルです。

+ +

Swagger 3.0.0-rc2 へ書き換えてみる

+ +

メモ

+
    +
  • ファイル名は、 openapi.jsonopenapi.yaml というのが推奨
      +
    • $ref で参照する先のファイル名は特に推奨はなさそう
    • +
    +
  • +
  • Description は CommonMark 0.27 のフォーマットに従う
  • +
+
+
+
+

+ api + swagger + openapi +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/rust-noxue-xi-memo.html b/drafts/rust-noxue-xi-memo.html new file mode 100644 index 00000000..958968da --- /dev/null +++ b/drafts/rust-noxue-xi-memo.html @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Rust の学習メモ + + + + +
+ + + +
+
+ +

Rust の学習メモ

+

+ Posted on Wed 08 February 2017 in blog + +

+
+ + +
+ + +
+ +

資料

+
    +
  • https://doc.rust-lang.org/book/
      +
    • 日本語訳(バージョンが違うかも) : https://rust-lang-ja.github.io/the-rust-programming-language-ja/1.6/book/
    • +
    +
  • +
+

getting started

+
    +
  • printlnprintln! は違う
      +
    • ! があるとマクロ呼び出し
    • +
    +
  • +
  • Rust の特徴
      +
    • Rustは expression-oriented で 末尾に ; が入る
    • +
    • 式なので、返値を持つということだと思う
    • +
    +
  • +
  • コンパイル
      +
    • rustc でコンパイルすると、 実行ファイルはデフォルトでは、 xxx.rs なら xxx になるっぽい
    • +
    +
  • +
  • Cargo
      +
    • コードのビルド、ライブラリのダウンロード、ライブラリのビルドが管理できる
    • +
    • ディレクトリ構成の制約がつく。
        +
      • 直下に Cargo.toml や README.md, LICENCEなどのファイル
      • +
      • src/ 以下にソースコード
      • +
      +
    • +
    • Cargo.toml : プロジェクト設定ファイル
        +
      • packages に name, version, authors などを記載
      • +
      +
    • +
    • cargo build すると、 target/debug/_name_ としてバイナリが作成される
        +
      • 直接実行しても良いが、 cargo run すれば良い
      • +
      • リリースビルドのためには、 cargo build --release
      • +
      +
    • +
    • リリースビルドは、実行速度は速くなるが、コンパイル時間が長くなる
        +
      • さらに、 Cargo.lock ファイルが作成される
      • +
      • 依存関係の追跡をするために必要
      • +
      +
    • +
    +
  • +
  • Cargo を使って、新しいプロジェクトを作成することもできる
      +
    • 実行ファイルを作成したい場合、 cargo new _name_ --bin
    • +
    • ライブラリの場合には、 cargo new _name_
    • +
    +
  • +
+

Syntax and Semantics

+
    +
  • "1つの値に対して、複数の名前が対応することはない" っぽいことが書いてあったけど良くわかっていない
      +
    • http://qiita.com/cactaceae/items/2c70a9947364c60ec100 この辺を読めば例が書かれていそう
    • +
    +
  • +
  • 型アノテーション を最低限入れておけば型推論してくれる
      +
    • 整数型として可能なサイズは、8, 16, 32, 64bitで、最初に iがついていれば符号付き、そうでない場合には u をつける。
    • +
    +
  • +
  • 束縛はデフォルトで immutable
      +
    • もし mutable にしたいのであれば、 let mut x=5; x=10; など、mut をつける
    • +
    • let x=100; let x=10; みたいなのは書けるけど、どう考えれば良い?
        +
      • shadowing というらしい。全然違う型でも被せられる
      • +
      • 良いことなのか...?
      • +
      +
    • +
    +
  • +
  • 変数を初期化せずに宣言できるが、それを初期化しないまま使うことは許されていない
  • +
  • 文字列フォーマット: https://doc.rust-lang.org/std/fmt/
  • +
  • ブロック というもの ( {} で囲まれた範囲 ) があって、 変数のスコープになる
  • +
+
+
+
+

+ rust +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/sakuraintanetsutowotui-zhi-shimashita.html b/drafts/sakuraintanetsutowotui-zhi-shimashita.html new file mode 100644 index 00000000..0c1638f8 --- /dev/null +++ b/drafts/sakuraintanetsutowotui-zhi-shimashita.html @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – さくらインターネットを退職しました + + + + +
+ + + +
+
+ +

さくらインターネットを退職しました

+

+ Posted on Fri 30 November 2018 in blog + +

+
+ + +
+ + +
+ +

本日最終出社日です。

+

さくらインターネットでやったこと

+

さくらインターネットではIoT向けのサービスの開発、チームのリーダーをやっていました。
+動き方としては、エンジニアリング100%というよりは、企画やチームマネジメントの割合が多かったように思います。
+チームに参加したときにはリーダーではなかったのですが、サービスに必要そうなことをやっていたら、いつの間にかリーダーをやる感じになっていた感じです。

+

簡単なところでいうと、例えばwebページの閲覧数がモニタリングされていなかったり、サービス上のビジネスとして重要な指標が計測できていなかったりしたので、ダッシュボードを作ったり、実際に見て、ボトルネックに対する仮説を立てて、改善するための開発計画を立てるなどしていました。

+

あと印象的なこととして、さくらのオブジェクトストレージが障害になったときにヘルプに行ったことがありました。
+オブジェクトストレージのチームとはかなり離れた立ち位置でしたが、長期化し始めていたこともあり、ドキュメントを深夜に読み漁り、翌日復旧しにチームの席に乗り込んだことはよく覚えています。
+色々ログイン権限をもらって調査すると、障害の直接的な要因は1日使って理解できたので、すぐ復旧の目処は立ちました。
+ただ、オブジェクトストレージのようなシステムは障害の直接原因を取り除いても完全復旧までは時間がかかるもので、そのあたりはチームの方にお任せしてしまった感じです。
+また、他のチームに行くと、監視項目について気になることがあったりするもので、復旧作業の合間にフィードバックや、監視設定の追加などしていました。

+

おそらく、このあたりの活動を見ていただいたのか、その年のベストエンジニア賞(4人いた)の社内表彰をいただきました。

+

さくらインターネットの働く環境

+

最近、NTT退職エントリが盛り上がっていて、働く環境についての不満をtwitterでよく見るので、
+さくらインターネットの環境を紹介しておきます。

+

結論から言うと、さくらインターネットの働く環境は非常に自由でした。

+

以下で書く、オフィスの設備の話は、さくらインターネットの東京支社24Fでの話です。
+オフィスの設備については、拠点ごとにかなり違いますし、もしかしたら階によっても色々違うかもしれません。
+PCやディスプレイ、勤務形態などはどの拠点でも共通だと思います。

+

PC

+

PCは入社前にヒアリングされ、 T460s のメモリを最大にしてもらったものを購入いただきました。
+全社共通の標準的なメニューもありましたが、エンジニアは結構個別に購入している方が多いように思いました。
+Macユーザーも多かったです。

+

情シスのほうで初期設定なども行っていただけるようだったのですが、私はLinuxにしたかったので、自分でLinuxに入れ替えました。
+Linuxに変えることも情シスから許可をもらえましたし、社内システムもLinuxでも問題なく動いていました。

+

PC環境としては非常に良かったです。

+

ディスプレイ

+

ディスプレイは2台申請したらちゃんと同じ型番のディスプレイを2台頂けました。
+自分は2枚のほうが好きなので使っていませんでしたが、大きい4Kのディスプレイを1枚申請するスタイルの方もいるようです。

+

オフィスの設備: ネット環境

+

また、ネット環境についていうと、プロキシなどはありませんし、有線も速度が出るため非常に良かったです。
+参考までに、私の自席での実測値は以下の通りです。

+
    +
  • +

    Wi-Fi: 上り下りとも、20Mbps前後
    +

    +
  • +
  • +

    有線: 下り700Mbps↑、上り900Mbps↑程度
    +

    +
  • +
+

有線を使っていれば、自宅と同程度のネット環境なので、特に不満はありませんでした。

+

オフィスの設備: 椅子

+

椅子は詳しくないけど、椅子にOKAMURAって書いてあるし、見た感じコンテッサ セコンダっぽい。座り心地良い。

+

机はなんて言って説明して良いのかわからない。1人あたりの専有スペース広め。
+自分はこだわりもないし、高さもちょうどよかったので不満はなかった。

+

勤務形態

+

働く場所についてもリモート勤務でOKですし、勤務時間についてもスライドできるため、
+私はかなりの割合で自宅勤務をしていました。
+このあたりの制度はさぶりこという制度になっています。
+自分以外にも結構使っている人が多いように見えるので、特に使いづらいということはないはずです。

+

東京で採用されて地方へ帰るといった場合の補助もありますし、他の会社では見ない制度だと思います。
+たまにこの制度にメニューが増えるのですが、増えるものも人事部が自ら率先して作っているようで、人事部すごいなと思っていました。

+

これから

+

特に休みなく、12月からは次の会社で働きます。
+GAFAではありません。

+

次の会社で落ち着いたら所属先はどこかに書くと思います。

+
+
+
+

+

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/sakuranokuraudodeterraformwoli-yong-surumemo.html b/drafts/sakuranokuraudodeterraformwoli-yong-surumemo.html new file mode 100644 index 00000000..d4ae03a7 --- /dev/null +++ b/drafts/sakuranokuraudodeterraformwoli-yong-surumemo.html @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – さくらのクラウドでterraformを利用するメモ + + + + +
+ + + +
+
+ +

さくらのクラウドでterraformを利用するメモ

+

+ Posted on Tue 25 April 2017 in blog + +

+
+ + +
+ + +
+ +

資料

+
    +
  • terraform の公式ページ: https://www.terraform.io/
  • +
  • さくらのクラウド用terraform providerのドキュメント: https://yamamoto-febc.github.io/terraform-provider-sakuracloud/
  • +
  • best practice: https://github.com/hashicorp/best-practices
  • +
+

確認するシナリオ

+
    +
  1. 新しくサーバー、ルーター、スイッチを作成する
      +
    • 3層構成
    • +
    • DNS
    • +
    +
  2. +
  3. 既存の3層構成のリソースをimportして
      +
    1. サーバーをスケールアウトしてみる
    2. +
    3. 別のゾーンに作ってみる
    4. +
    +
  4. +
+

困った時は

+

terraform で管理してるリソースをコンパネ/APIから直接削除してしまった

+

terraform state rm ... とかで削除してしまうと良いと思う

+

terraform import sakuracloud_disk.disk_import ... みたいなのをしたら、terraform planで差分が出る

+

ディスク修正機能で実現されているものは、すべてAPIが返ってこないので、SSH key や source archive が差分になってしまう。
+どうしても設定したい場合には、 直接stateファイルに書くしかない。

+
+
+
+

+ sakura + terraform +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/sample-docs.html b/drafts/sample-docs.html new file mode 100644 index 00000000..cd84916e --- /dev/null +++ b/drafts/sample-docs.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Sample docs + + + + +
+ + + +
+
+ +

Sample docs

+

+ Posted on Wed 14 December 2016 in blog + +

+
+ + +
+
+ +
+ +
+ +
+

h1

+

h2

+

h3

+

h4

+
h5
+

Content

+
$ code
+
+
    +
  • a
      +
    • a-1
    • +
    • a-2
        +
      • a-2-1
      • +
      • a-2-2
      • +
      +
    • +
    +
  • +
  • +

    b

    +
      +
    • b-1
    • +
    • b-2
    • +
    +
  • +
  • +

    1

    +
      +
    • 1-1
    • +
    • 1-2
        +
      • 1-2-1
      • +
      • 1-2-2
      • +
      +
    • +
    +
  • +
  • 2
      +
    • 2-1
    • +
    • 2-2
    • +
    +
  • +
+

example link

+
+

block
+quote

+
+

single asterisks

+

single underscores

+

double asterisks

+

double underscores

+
+
+
+

+ sample +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/shou-deshu-karetaswagger-filewoyuan-niapiwotesutosuru.html b/drafts/shou-deshu-karetaswagger-filewoyuan-niapiwotesutosuru.html new file mode 100644 index 00000000..6e229348 --- /dev/null +++ b/drafts/shou-deshu-karetaswagger-filewoyuan-niapiwotesutosuru.html @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 手で書かれたswagger fileを元にAPIをテストする + + + + +
+ + + +
+
+ +

手で書かれたswagger fileを元にAPIをテストする

+

+ Posted on Mon 15 May 2017 in blog + +

+
+ + +
+ + +
+ +

背景

+

テストされていないコードにテストを追加する活動をする。 +* サービス開発に参加したのは、リリース2ヶ月前 +* コードのメインは、API・バックエンドのコード +* コード自体は、Github Enterprise にホストされている +* リリースに向けて、不足している機能もあるため、開発しつつ改善活動をする +* 既存のコードもかなり大きいので、一から書き換えるのは時間的な制約から難しい

+

課題

+

機能追加されたり、UI側の要望などでAPIを変更した場合に、全体として追従できない。
+ドキュメントが更新されなかったり、CLIが更新されなかったりしている。
+何を更新しないといけないか把握できていて、アクションできている人がいない。

+

改善

+
    +
  1. 不整合が起きたことを テスト によって把握できるようにする
  2. +
  3. 不整合が起きない/起きにくいようにする
  4. +
+

活動

+
    +
  1. [X] CI環境の整備
  2. +
  3. [X] 課金情報周りの Unitテストを書く活動
  4. +
  5. [X] 謎の手で書かれたswagger fileを正しいswagger fileにする
  6. +
  7. [X] API周りのテスト活動
  8. +
  9. [ ] インフラリソースを管理できるようにする活動
      +
    • 片っ端から terraform import して、不整合は直す
    • +
    +
  10. +
  11. [ ] APIドキュメント生成する活動 ← イマココ
  12. +
+

活動の詳細

+

0. CI環境の整備

+

CIするためのビルドサーバーがなかった。
+何を始めるにも、自動でビルドできるサーバーが必要なので、
+お手軽にJenkinsを立てた。

+

最近のJenkins は .Jenkinsfile ファイルを書くことで、ビルド内容を定義できるため、手で色々やる必要がない。
+dockerコンテナを利用してビルドする、簡単な .Jenkinsfile の例を書いて、共有しておき、pushやPRのタイミングで自動ビルドできるようにした。

+

1. 課金情報周りの Unitテストを書く活動

+

リリースまで時間も限られているので、最も優先度の高い部分のテストを書くことにした。
+そもそもテストしづらいタイプの大きなメソッドを分割することことから始めて、00% → 80%↑ 程度までテストを書いた。

+

2. 謎の手で書かれたswagger fileを正しいswagger fileにする

+

謎の手書きswagger fileがあった。
+swagger fileとしてパースできるが、APIドキュメントとしては不備があって、invalid だった。
+(例えば、401が返る場合のbodyがundocumentedだったり、エラー構造体が定義されていないなど)
+まず swagger fileとして正しくすることから始めた。
+一旦、これは目で見て確かめて書いていく感じにした。(もちろんソースコードを見ることができるので、ソースコードから補完していく感じ。)

+

swaggerの仕様的に、どうしても表現できないものは諦めた。
+(request bodyに依存して、レスポンスのschemaが変わる場合など。)

+

色々と試行錯誤

+

swagger-test を使ってテストケースを書く

+

オリジナルのままだと headerとかも全部deepequalになってるので、
+実稼働しているAPIサーバーに対して叩いたりはできない。

+

また、x-ampleに具体的な例を突っ込む必要があるので、公開するときに表示できないものを削除したりする必要がありそう。
+ただ、最初から swagger-test 使うつもりで準備していれば便利そう。

+

今回は、ちょっと取り回しが悪そうなので、やめた。

+

swaggerfile をパースして json schema としてvalidation

+

x-examplesにリクエストの具体的なパラメータを突っ込んで、
+swagger-parse を使って、リクエスト・レスポンスをJSON Schemaから検証した。
+required など書き方が違うものがあり、いろいろな書き方を許容してしまうとまずい印象。

+

JSON Schemaに詳しくなっている時間が惜しいため、最小限だけ実装してみたけど、
+dredd を見つけたので、お蔵入り。

+

dredd の検証

+
% dredd init
+? Location of the API description document swagger.yml
+? Command to start API backend server e.g. (bundle exec rails server)
+? URL of tested API endpoint https://api-dev.sakura.io
+? Programming language of hooks python
+? Do you want to use Apiary test inspector? No
+? Dredd is best served with Continuous Integration. Create CircleCI config for Dredd? Yes
+
+Configuration saved to dredd.yml
+
+Install hooks handler and run Dredd test with:
+
+  $ pip install dredd_hooks
+  $ dredd
+
+
$ pip install dredd_hooks
+
+
+
+
+

+ api + swagger +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/test-kitchen-nomemo.html b/drafts/test-kitchen-nomemo.html new file mode 100644 index 00000000..98113044 --- /dev/null +++ b/drafts/test-kitchen-nomemo.html @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – test-kitchen のメモ + + + + +
+ + + +
+
+ +

test-kitchen のメモ

+

+ Posted on Wed 05 October 2016 in blog + +

+
+ + + +
+

+ ansible + tdd + test-kitchen +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/tong-liao-karapazuruwojiao-watsutanodejie-itemiteita.html b/drafts/tong-liao-karapazuruwojiao-watsutanodejie-itemiteita.html new file mode 100644 index 00000000..205e3c6e --- /dev/null +++ b/drafts/tong-liao-karapazuruwojiao-watsutanodejie-itemiteita.html @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – 同僚からパズルを教わったので解いてみていた + + + + +
+ + + +
+
+ +

同僚からパズルを教わったので解いてみていた

+

+ Posted on Thu 25 May 2017 in blog + +

+
+ + +
+
+ +
+ +
+ +

同僚から、数の粘度という概念を教えてもらいました。
+おもしろい問題だったので、考えたことを忘れないように書き留めておきます。
+最低限しか解いていないので、研究の余地がかなりありそう。

+

問題

+
\def\qed{\hfill $\Box$}
+
+\newtheorem{Theorem}{定理}
+\newtheorem{Example}[Theorem]{}
+\newtheorem{Definition}[Theorem]{定義}
+\newtheorem{Lemma}[Theorem]{補題}
+\newtheorem{Proof}[Theorem]{証明}
+\newtheorem{Problem}[Theorem]{問題}
+
+
+\begin{Definition}[記法について]
+ある0以上の自然数 $a \in \mathbb{N}_{\geq 0}$ に対して以下のような記法を使うことにする
+\begin{itemize}
+\item 10進法で表記したときに大きい桁かから見て $i$ 桁目を単に $a_{i}$ こと書く
+\item 10進法での表記を下線つきで $a = \underline{a_0a_1a_2...a_N}$ と書く
+\end{itemize}
+\end{Definition}
+
+\begin{Example}
+$a=39$ のとき $a_0=3$, $a_1=9$ であって、$39 = \underline{39}$
+\end{Example}
+
+\begin{Definition}[粘度]
+ある0以上の自然数 $a \in \mathbb{N}_{\geq 0}$ に対して粘度 $V(a) \in \mathbb{N}_{\geq 0}$ を以下で定義する
+\begin{displaymath}
+V(a) = \left\{
+\begin{array}{l}
+$0$  \hspace{145} \mbox{aが1桁の場合} \\
+\min \{ n \in \mathbb{N} | V(Multi^n(a)) = 0 \} \hspace{10} \mbox{それ以外の場合}
+\end{array}
+\right.
+\end{displaymath}
+ただし $a = \underline{a_0a_1a_2...a_N}$ に対して $Multi(a) := \prod_i a_i$ とする
+\end{Definition}
+
+\begin{Example} いくつか計算してみる
+\begin{itemize}
+\item $a=9$ のとき $V(a)=0$
+\item $a=100$ のとき $Multi(a)=1*0*0=0$ なので  $V(a) = 1$
+\item $a=33$ のとき $Multi(a)=3*3=9$ なので $V(a) = 1$
+\item $a=39$ のとき $Multi(a)=27, Multi^2(a)=14, Multi^3(a)=4$ なので $V(a) = 3$
+\end{itemize}
+\end{Example}
+
+\begin{Problem}[問題]
+粘度 $k (0 \leq k \leq 11)$ を持つ最小の自然数 $mV(k)$ を見つけよ
+\end{Problem}
+
+\begin{Example}
+$mV(0)=0, mV(1)=10, mV(2)=25, mV(3)=39$
+\end{Example}
+
+\begin{Lemma}[すべての自然数に対して粘度が定義できる]
+$a \in \mathbb{N}_{\geq 0}$ に対し $V(a) \in \mathbb{N}_{\geq 0}$ が必ず一意に定まる
+\end{Lemma}
+
+\begin{Proof}
+ある $n \in \mathbb{N}_{\geq 0}$ について $V(Multi^n(a)) = 0$ である場合 一意性は明らか。\\
+任意の$a \in \mathbb{N}_{\geq 0}$ についてあるnがあって $\exists k \    s.t. V(Multi^n(a)) = 0$ が示されれば良い \\
+そのために $a>0$ として $a > Multi(a)$ を示す \\
+($a > Multi(a)$ であれば $a > Multi(a) > Multi^2(a) >... \geq 0$ となって どこかで $Multi^n(a)$ は1桁の数字になっている) \\
+$a=\underline{a_0a_1...a_N} (a_0 \neq 0)$ と書くとき $0 \leq a_i < 10$ でなので
+$a= \sum_{i=0}^N a_i * 10^{N-i} \geq a_0 * 10^N > a_0 * a_1 * a_2 * ... * a_N = Multi(a)$ なので、$a > Multi(a)$ になっている
+\qed
+\end{Proof}
+
+\begin{Lemma}[1は含まれないこと]
+$k \geq 2$ とする $mV(k)=\underline{a_0a_1...a_N}$ について $a_i \neq 1 (\forall i)$
+\end{Lemma}
+\begin{Proof}背理法による。\\
+もし $a_i = 1$ となる $i$ があったとするこれを $j$ とする \\
+$\bar{a} := \underline{a_0a_1...a_{j-1}a_{j+1}...a_N}$ を考えると、\\
+$Multi(\bar{a}) = Multi(mV(k))$ なので $V(\bar{a}) = V(mV(k)) = k$ かつ $\bar{a} < mV(k)$ である。\\
+これは、$mV(k)$ が粘度 $k$ を持つ最小の自然数であることに矛盾する
+\qed
+\end{Proof}
+
+
\begin{Lemma}[単調列であること]
+$k \geq 2$ とする。\\
+$mV(k)=\underline{a_0a_1...a_N}$ について、 $i < j$ ならば $a_i \leq a_j$ である。
+\end{Lemma}
+\begin{Proof} 背理法による。 \\
+ある $l<m$ について、 $a_l > a_m$ と仮定する。 \\
+このとき、 $\bar{a} := \underline{a_0a_1...a_{l-1}a_ma_{l+1}...a_{m-1}a_la_{m+1}...a_N}$ とすると、
+$Multi(\bar{a}) = Multi(mV(k))$ なので、 $V(\bar{a}) = V(mV(k)) = k$ かつ $\bar{a} < mV(k)$ である。\\
+これは、$mV(k)$ が粘度 $k$ を持つ最小の自然数であることに矛盾する。
+\qed
+\end{Proof}
+
+\begin{Lemma}[粘度が大きい場合、5と偶数を同時に含むことはないこと]
+$k \geq 3$ とする。\\
+このとき、 $mV(k)=\underline{a_0a_1...a_N}$ について、以下のどちらか一方のみが成り立つ。
+\begin{enumerate}
+\item $a_i$ はすべて奇数
+\item $a_i \neq 5$ 
+\end{enumerate}
+\end{Lemma}
+\begin{Proof} ${a_i}$ のなかに、偶数と5の両方があったとすると、
+$Multi(mV(k)) = 10 * A$ の形で書ける。\\
+つまり、 $Multi^2(mV(k)) = Multi(10*A) = 0$ になり、 $k \leq 2$ になるため。
+\qed
+\end{Proof}
+
+\begin{Definition}
+$$[789] := \{\underline{7...78...89...9}\}$$
+ただし、7,8,9 がそれぞれ0個でも良いとする。
+\end{Definition}
+
+\begin{Example} \ 
+\begin{itemize}
+\item $7 \in [789]$
+\item $7777777779 \in [789]$
+\item $888 \in [789]$
+\item $77789 \in [789]$
+\end{itemize}
+\end{Example}
+
+\begin{Lemma}[数列の簡約]
+$k \geq 3$ とする。\\
+このとき、 $mV(k)=\underline{a_0a_1...a_N}$ について、以下のどれか1つのみが成り立つ。
+\begin{enumerate}
+\item $a_0=2$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=3$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=4$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=6$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=7$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=8$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=9$ かつ $\underline{a_1...a_N} \in [789]$
+\item $a_0=2, a_1=6$ かつ $\underline{a_2...a_N} \in [789]$
+\item $a_0=3, a_1=5$ かつ $\underline{a_2...a_N} \in [789]$
+\item $a_k=5 (k=0, ...., k_0)$ かつ $\underline{a_{k_0+1}...a_N} \in [789]$
+\end{enumerate}
+\end{Lemma}
+
+
\begin{Proof} これまでの補題を使って1つずつ場合分けをして考える。
+\begin{itemize}
+\item $a_0=2$ の場合
+\begin{itemize}
+\item $\underline{22...}$ の場合、 $\underline{4...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。
+\item $\underline{23...}$ の場合、 $\underline{6...}$ と置き換えれると、上と同様。
+\item $\underline{24...}$ の場合、 $\underline{8...}$ と置き換えれると、上と同様。
+\item $\underline{25...}$ は、偶数と5が同時に含まれており含まれており、補題からありえない。
+\end{itemize}
+そのため、 $a_0=2$ の場合には、 $\underline{26...}, \underline{27...}, \underline{28...}, \underline{29...} $ となっている。
+\item $a_0=3$ の場合
+\begin{itemize}
+\item $\underline{33...}$ の場合、 $\underline{9...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。
+\item $\underline{34...}$ の場合、 $\underline{26...}$ と置き換えれると、上と同様。
+\item $\underline{36...}$ の場合、 $\underline{29...}$ と置き換えれると、上と同様。
+\end{itemize}
+そのため、 $a_0=3$ の場合には、 $\underline{35...}, \underline{37...}, \underline{38...}, \underline{39...} $ となっている。
+\item $a_0=4$ の場合
+\begin{itemize}
+\item $\underline{44...}$ の場合、 $\underline{28...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。
+\item $\underline{45...}$ は、偶数と5が同時に含まれており含まれており、補題からありえない。
+\item $\underline{46...}$ の場合、 $\underline{38...}$ と置き換えれると、上と同様。
+\end{itemize}
+そのため、 $a_0=4$ の場合には、 $\underline{47...}, \underline{48...}, \underline{49...} $ となっている。
+\item $a_0=5$ の場合
+\begin{itemize}
+\item $\underline{55...}$ は、補題からありえない。
+\item $\underline{56...}$ は、偶数と5が同時に含まれており含まれており、補題からありえない。
+\end{itemize}
+そのため、 $a_0=5$ の場合には、 $\underline{57...}, \underline{58...}, \underline{59...} $ となっている。
+\item $a_0=6$ の場合
+\begin{itemize}
+\item $\underline{66...}$ は、$\underline{49...}$ と置き換えれると、数字としては小さく、粘度は変わらない。これは $mV(k)$ の最小性に矛盾している。
+\end{itemize}
+そのため、 $a_0=6$ の場合には、 $\underline{67...}, \underline{68...}, \underline{69...} $ となっている。
+\item $a_0=7$ の場合には、 $\underline{77...}, \underline{78...}, \underline{79...}$ となっている。
+\item $a_0=8$ の場合には、 $\underline{88...}, \underline{89...}$ となっている。
+\item $a_0=9$ の場合には、 $\underline{99...}$ となっている。
+\end{itemize}
+以上を整理して書くと、主張の通りになる。
+\qed
+\end{Proof}
+
+
\begin{Lemma}[5は高々1つだけ]
+$k \geq 3$ とする。\\
+このとき、 $mV(k)=\underline{a_0a_1...a_N}$ について、 $a_i=5$ となる $i$ は高々1つしかない。
+\end{Lemma}
+
+
+
+
+

+ go +

+
+ + +
+
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/vmware-nsx-configuration.html b/drafts/vmware-nsx-configuration.html new file mode 100644 index 00000000..96815f67 --- /dev/null +++ b/drafts/vmware-nsx-configuration.html @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware NSX Configuration + + + + +
+ + + +
+
+ +

VMware NSX Configuration

+

+ Posted on Mon 16 March 2015 in blog + +

+
+ + +
+ + +
+ +

知っておくこと

+
    +
  1. コマンドのあと、"?"をつけると、ヘルプ
  2. +
+

コマンド

+

Controller

+
    +
  1. +

    Cluster status

    +

    sh + # controllerのクラスタ参加やサービスの状況がわかる。 + # クラスタIDは、最初のコントローラと同じ。 + show control-cluster status + # ActiveなコントローラのIPを表示 + show control-cluster startup-nodes + # 各ロールごとのステータスがわかる。マスター情報もある + show control-cluster roles + # connectionのlistening, openingの状況がわかる + ## master nodeでは、 server, client, systemの数が上がる + ## slave nodeでは、electionの数が上がる + show control-cluster connections

    +
  2. +
+

LDR

+
    +
  1. +

    DIの確認
    + ESXi上で、net-vdrコマンドを利用

    +

    sh +net-vdr --lif ...

    +
  2. +
+

ESG

+
    +
  1. +

    パケットのキャプチャ

    +

    sh +debug packet display interface vNic_0 port_80

    +
  2. +
+

メモ

+
    +
  • LIFの用途
  • +
  • 内部向け
      +
    • 各ESXiで同じvMAC, 同じIPを利用
    • +
    +
  • +
  • アップリンク
      +
    • pMAC(not vmnicのMACアドレス)として、物理ネットワークから認識される
    • +
    • 各ESXiごとに異なるpMACを利用する。IPは同じ。
    • +
    • DI: designated instance:(ARPの応答をするやつ。IPが同じ、異なるMACのLIFがあるので、必要)
    • +
    +
  • +
  • LIFの種類
  • +
  • VLAN LIF
    + vDS/vSSに接続。UpLinkではDIが選出。
  • +
  • VXLAN LIF
    + LSWに接続し、DIを選出しない
  • +
  • +

    LSWには、DLRのLIFは1つまで。もっとルータが欲しかったら、ESGWをつける。

    +
  • +
  • +

    DLR固有のもの

    +
  • +
  • プロトコルアドレス
    + ルーティングプロトコルのために、コントロールVMが利用
  • +
  • 転送アドレス
    + データプレーンのために、分散ルーターカーネルが利用
  • +
+
+
+
+

+ VMware + NSX +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/vmware-nsx.html b/drafts/vmware-nsx.html new file mode 100644 index 00000000..f71c6321 --- /dev/null +++ b/drafts/vmware-nsx.html @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware NSX + + + + +
+ + + +
+
+ +

VMware NSX

+

+ Posted on Mon 16 March 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+
    +
  1. VMware NSX Network Virtualization Design Guide
  2. +
+

VCP-NVの概要

+
    +
  1. 言語: 英語 or 日本語 (日本語はしょぼそう)
  2. +
  3. 時間: 120分
  4. +
  5. 問題数: 120問
  6. +
  7. 問題形式: 選択式
  8. +
+

NSX Network Virtualization Design Guide

+

Overview

+

Network Virtualizationの気持ちは、Server virtualizationと並行して理解すると良い。
+- Server virtualizationによって、CPU, Mem, Storageのことが、物理層と仮想層で分離された。VMからはハイパーバイザで抽象化されている
+- Network virtualizationによって、物理ネットワークと仮想ネットワークを分離したい。VMからは仮想ネットワークプラットフォームで抽象化したい
+ + VMから見えるのは、IP transport層だけ
+ + CPU poolに対応するもの = transport capacityのpool
+ + スナップショット、削除、リストアをsoftware-definedでやる

+

Introduction to Network Virtualization

+
    +
  1. +

    Network Stacks

    +
    | Layer | Components |
    +|----------|---------|
    +| Cloud Consumption | any apps. |
    +| Management Plane | NSX Manager |
    +| Control Plane | NSX Controller |
    +| Data Plane | destributed services, hypervisor kernel modules(Logical SW, Destributed LR, FW), NSX Edge, ESXi |
    +| Physical Network | physical components |
    +
    +
  2. +
  3. +

    Planes

    +
  4. +
  5. Control Plane
      +
    • 3台以上の奇数台をデプロイする
    • +
    • 以下の制御を行う
    • +
    • multicast freeなVXLAN
    • +
    • DLR, DFWなどのプログラマブルな要素
    • +
    +
  6. +
  7. Data Plane
      +
    • NSX vSwitchから成る。
    • +
    • NSX vSwitchは、vSphere vDSとサービスを有効にするためのコンポーネントを合わせたもの
    • +
    • 追加のコンポーネントは、HypervisorにVIBとしてインストールされる
    • +
    • DLR, DFW, VXLAN bridging用のVIBがある
    • +
    • VXLANをオーバーレイネットワークのために利用
    • +
    • port mirroring, netflow/IPFIX, QoS, LACP, backup&restore, Health Check, ...
    • +
    • VLAN-VXLAN間のgatewayもData Planeに含まれる
    • +
    • これは、L2でも、L3でもありうる。(L2: NSX bridging, L3: NSX routing)
    • +
    +
  8. +
  9. +

    Management Plane and Consumption Platforms

    +
      +
    • REST APIや、UIなどを提供
    • +
    • Integrationに利用できるものとして、vCloud Automation Center(vCAC), vCloud Director(vCD)などがある
    • +
    +
  10. +
  11. +

    NSX Functional Services

    +
  12. +
  13. Switching
  14. +
  15. Routing
      +
    • overlay network上のトラフィックが、物理ルータに出ないようなルーティングをする
    • +
    +
  16. +
  17. FW
      +
    • vNICレベルでのFW
    • +
    +
  18. +
  19. LB
      +
    • L4-L7 load balancing
    • +
    • SSL termination
    • +
    +
  20. +
  21. VPN
      +
    • SSL VPN to enable L2, L3 VPN
    • +
    +
  22. +
  23. Connectivity to Physical
      +
    • L2, L3 Gateway functions
    • +
    +
  24. +
+

NSX-v Functional Components

+

NSXは、Hypervisor Access Layerと、Gateway Access Layerという、2つのネットワークアクセスのレイヤを作っている。
+Hypervisor Access LayerはVMが使うためのもので、Gateway Access Layerは、Edge Gatewayが使うためのもの。
+つまり、物理層から見た時、オーバーレイのことを知らないとすれば、ハイパーバイザと通信しているか、ゲートウェイと通信しているか、の2つのトラフィックしかない。

+
    +
  1. NSX Manager
    + Management Plane。vCenterと1:1になる。
  2. +
+
+
+
+

+ VMware + NSX +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/vmware-product-gotonotest-fang-fa-nitsuite.html b/drafts/vmware-product-gotonotest-fang-fa-nitsuite.html new file mode 100644 index 00000000..5aafc40d --- /dev/null +++ b/drafts/vmware-product-gotonotest-fang-fa-nitsuite.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – VMware Product ごとのtest 方法について + + + + +
+ + + +
+
+ +

VMware Product ごとのtest 方法について

+

+ Posted on Mon 21 November 2016 in blog + +

+
+ + +
+ + +
+ +

参考にしたリポジトリ

+
    +
  • https://github.com/vmware/pyvmomi
  • +
  • https://github.com/vmware/govmomi
  • +
  • https://github.com/vmware/vic
  • +
+

pyvmomi

+

vcrpy を利用している。
+元々は、 vcr というruby製のツールだったもののpython版らしい。
+他の言語でも同様のツールはあって、例えば、Go だと DVR というのがある。

+

govmomi

+

vcsim を使っている。
+ただ、vcsim はvSphere 5.5 までしか対応しておらず、6.0以降のためのテストは難しい。
+このこと自体は割と前から Issue には挙がっているが、まだ対応はされていない。
+https://github.com/vmware/govmomi/issues/358

+

vic

+

自前でテスト用のオブジェクトを作っている。
+https://github.com/vmware/vic/tree/master/pkg/vsphere/simulator
+vcsim の中で、これを
+https://github.com/vmware/vic/blob/master/cmd/vcsim/main.go

+
+
+
+

+ VMware + test +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/vspherehuan-jing-denoqos.html b/drafts/vspherehuan-jing-denoqos.html new file mode 100644 index 00000000..dcb51e89 --- /dev/null +++ b/drafts/vspherehuan-jing-denoqos.html @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – vSphere環境でのQoS + + + + +
+ + + +
+
+ +

vSphere環境でのQoS

+

+ Posted on Wed 09 December 2015 in blog + +

+
+ + +
+ + +
+ +

資料

+
    +
  1. vSphere 5.5 の新機能紹介 ネットワーク2 (トラフィックのフィルタリングとマーキング)
  2. +
  3. QoS - DiffServ QoS Model
  4. +
+

VMware環境でのパケットのマーキング

+

vSphere 5.5以降、vDSを利用している場合、ポートグループ単位で、パケットのフィルタリングやマーキングができるようになった。

+
+
+
+

+ VMware + vSphere + network +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/windowsnosysprepgazheng-chang-niwan-liao-shinaitokinidiao-berukoto.html b/drafts/windowsnosysprepgazheng-chang-niwan-liao-shinaitokinidiao-berukoto.html new file mode 100644 index 00000000..73301882 --- /dev/null +++ b/drafts/windowsnosysprepgazheng-chang-niwan-liao-shinaitokinidiao-berukoto.html @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Windowsのsysprepが正常に完了しないときに調べること + + + + +
+ + + +
+
+ +

Windowsのsysprepが正常に完了しないときに調べること

+

+ Posted on Fri 09 September 2016 in blog + +

+
+ + +
+ + +
+ +

経緯

+

windows 7 でsysprepが正常に完了しなかった。
+具体的には、unattended.xmlがあるのに、 キーボードやライセンスの設定が表示されていた。
+何が起こっているのか、ログを見たい。

+

sysprepのログの場所

+
    +
  • generalize : C:\Windows\System32\sysprep\Panther
  • +
  • specialize : C:\Windows\Panther
  • +
  • Unattended : C:\Windows\Panther\UnattendGC
  • +
+

ログファイル

+
    +
  • setupact.log
  • +
+
+
+
+

+ sysprep + windows +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/drafts/wip-gitwohttpsdeli-yong-surutokini-pasuwadowoji-yi-saseteoku-via-ssh.html b/drafts/wip-gitwohttpsdeli-yong-surutokini-pasuwadowoji-yi-saseteoku-via-ssh.html new file mode 100644 index 00000000..276612cf --- /dev/null +++ b/drafts/wip-gitwohttpsdeli-yong-surutokini-pasuwadowoji-yi-saseteoku-via-ssh.html @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – [WIP] GitをHTTPSで利用するときに、パスワードを記憶させておく via SSH + + + + +
+ + + +
+
+ +

[WIP] GitをHTTPSで利用するときに、パスワードを記憶させておく via SSH

+

+ Posted on Mon 04 January 2016 in blog + +

+
+ + +
+ + +
+ +

まだ設定できていない

+

参考

+ +

概要

+
    +
  1. Git側の情報
      +
    1. gitで認証情報を保存させるためには、credential helper を利用することができる
    2. +
    3. キャッシュすることもできる
    4. +
    5. creadential storeとして利用できるものとして、以下などがある
    6. +
    7. Windows : git-credential-winstore, wincred
    8. +
    9. OSX : osxkeychain
    10. +
    11. Linux : gnome-keyring
    12. +
    +
  2. +
  3. SSHするときの情報
      +
    1. SSH利用時は(たぶん、何も設定しない場合には)、DBUSの設定がないために、gnome-keyring-daemon に接続ができない
    2. +
    3. 要は、DBUSの設定をすれば良い
    4. +
    +
  4. +
+

試した設定方法

+

Debian sid (uname -r # => 4.2.0-1-amd64) を利用。

+
    +
  1. +

    gnome-keyring, gnome-keyring-dev のインストール

    +

    $ sudo apt-get install libgnome-keyring-dev
    +2. git credential のgnome-keyring用モジュールのビルド

    +

    $ cd /usr/share/doc/git/contrib/credential/gnome-keyring +$ sudo make
    +3. git config

    +

    git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
    +4. Xがない環境へのSSHを行う場合
    +1. ログイン時に、gnome-keyringをstart
    + 以下を、/etc/pam.d/loginに追加する

    +
    ```
    +auth    optional        pam_gnome_keyring.so
    +session optional        pam_gnome_keyring.so auto_start
    +```
    +
    +
      +
    1. +

      DBUSの開始
      + 以下を、.bashrc などに追加する

      +

      if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + eval `dbus-launch --sh-syntax` +fi

      +
    2. +
    +
  2. +
+

エラー内容

+

/var/log/audit.log に以下のような内容のエラーが出る

+
couldn't initialize prompt: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.keyring.SystemPrompter exited with status 1
+
+
+
+
+

+ git +

+
+ + +
+
+ + + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/feeds/all.atom.xml b/feeds/all.atom.xml new file mode 100644 index 00000000..b2e882b8 --- /dev/null +++ b/feeds/all.atom.xml @@ -0,0 +1,767 @@ + +ひつまぶし食べたいhttps://www.hitsumabushi.org/2021-10-12T02:00:00+09:00メモ代わりのブログCloudFormation Stackを安全に削除する2021-10-12T02:00:00+09:002021-10-12T02:00:00+09:00hitsumabushitag:www.hitsumabushi.org,2021-10-12:/blog/2021/10/12/0200.html +<p>以前、<a href="https://www.hitsumabushi.org/blog/2019/01/25/1454.html">CloudFormation の不満点</a> というのを書いたが、諦めて大半のCfnをterraformに移行した。<br/> +その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。</p> +<h2 id="_1">概要</h2> +<p>アイデアは簡単で以下の通り。</p> +<ol> +<li>cfn の操作のみが許可されているIAM roleを作成する</li> +<li>上記roleを指定して cfn stackをdeleteする</li> +</ol> +<h2 id="_2">モチベーション</h2> +<p>そもそも以前の記事でも、予期せぬ手作業の …</p> +<p>以前、<a href="https://www.hitsumabushi.org/blog/2019/01/25/1454.html">CloudFormation の不満点</a> というのを書いたが、諦めて大半のCfnをterraformに移行した。<br/> +その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。</p> +<h2 id="_1">概要</h2> +<p>アイデアは簡単で以下の通り。</p> +<ol> +<li>cfn の操作のみが許可されているIAM roleを作成する</li> +<li>上記roleを指定して cfn stackをdeleteする</li> +</ol> +<h2 id="_2">モチベーション</h2> +<p>そもそも以前の記事でも、予期せぬ手作業の変更があった場合に、ドリフト検出やChange setで検出・対応が難しいことを問題としていた。<br/> +cfn stackを削除しようと思った場合、ドリフトしている状態だと、単純には削除できない。一旦cfn updateすれば簡単かもしれないが、何か手作業で変更されているかもしれない状況だと、updateしたくない。<br/> +cfn updateをせずに、安全にcfn stackをdeleteしたい。</p> +<h2 id="_3">方法</h2> +<h3 id="cfniam-role">cfnの操作しかできないIAM roleを作成する</h3> +<p>以下の通り、terraformで作成した。</p> +<div class="highlight"><pre><span></span><code><span class="kr">resource</span><span class="w"> </span><span class="nc">"aws_iam_role"</span><span class="w"> </span><span class="nv">"delete_cfn_stack"</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="na">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"delete-cfn-stack"</span> +<span class="w"> </span><span class="na">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"/"</span> + +<span class="w"> </span><span class="na">assume_role_policy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">jsonencode</span><span class="p">({</span> +<span class="w"> </span><span class="na">Version</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"2012-10-17"</span> +<span class="w"> </span><span class="na">Statement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="na">Action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"sts:AssumeRole"</span> +<span class="w"> </span><span class="na">Effect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Allow"</span> +<span class="w"> </span><span class="na">Sid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">""</span> +<span class="w"> </span><span class="nb">Principal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="na">Service</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"cloudformation.amazonaws.com"</span> +<span class="w"> </span><span class="p">}</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">]</span> +<span class="w"> </span><span class="p">})</span> +<span class="p">}</span> + +<span class="kr">resource</span><span class="w"> </span><span class="nc">"aws_iam_role_policy"</span><span class="w"> </span><span class="nv">"delete_cfn_stack_policy"</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="na">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"cfn_policy"</span> +<span class="w"> </span><span class="na">role</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">aws_iam_role.delete_cfn_stack.id</span> +<span class="w"> </span><span class="na">policy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">jsonencode</span><span class="p">({</span> +<span class="w"> </span><span class="na">Version</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"2012-10-17"</span> +<span class="w"> </span><span class="na">Statement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="na">Effect</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Allow"</span> +<span class="w"> </span><span class="na">Action</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"cloudformation:*"</span><span class="p">,</span> +<span class="w"> </span><span class="p">]</span> +<span class="w"> </span><span class="na">Resource</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"*"</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">]</span> +<span class="w"> </span><span class="p">})</span> +<span class="p">}</span> +</code></pre></div> +<h3 id="role">上記のroleでスタック削除する</h3> +<div class="highlight"><pre><span></span><code><span class="nb">export</span><span class="w"> </span><span class="nv">STACK_NAME</span><span class="o">=</span>stack_name + +<span class="c1"># 失敗するdeleteを実行</span> +aws<span class="w"> </span>cloudformation<span class="w"> </span>delete-stack<span class="w"> </span>--role-arn<span class="w"> </span>arn:aws:iam::_aws_account_id_:role/delete-cfn-stack<span class="w"> </span>--stack-name<span class="w"> </span><span class="si">${</span><span class="nv">STACK_NAME</span><span class="si">}</span> + +<span class="c1"># resource idのリストを取得</span> +aws<span class="w"> </span>cloudformation<span class="w"> </span>describe-stack-resources<span class="w"> </span>--stack-name<span class="w"> </span><span class="si">${</span><span class="nv">STACK_NAME</span><span class="si">}</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>jq<span class="w"> </span><span class="s1">'.StackResources[].LogicalResourceId'</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>xargs + +<span class="c1"># 削除しないリソースとして上の結果を指定</span> +aws<span class="w"> </span>cloudformation<span class="w"> </span>delete-stack<span class="w"> </span>--role-arn<span class="w"> </span>arn:aws:iam::_aws_account_id_:role/delete-cfn-stack<span class="w"> </span>--stack-name<span class="w"> </span><span class="si">${</span><span class="nv">STACK_NAME</span><span class="si">}</span><span class="w"> </span>--retain-resources<span class="w"> </span><span class="o">(</span>↑の結果をペースト<span class="o">)</span> +</code></pre></div> +<h2 id="_4">終わり</h2> +<p>地道にterraform importしてから、上記をコツコツ(スクリプト化して)実行して、cfn stackを削除した。<br/> +terraform importは単純に差分がなくなるまでtf fileを修正するだけなので、そんなに困ることはない。<br/> +これで安心・安全にリソース管理できるようになった。</p>1Password CLIを使ってTOTPを取得する2021-10-12T01:00:00+09:002021-10-12T01:00:00+09:00hitsumabushitag:www.hitsumabushi.org,2021-10-12:/blog/2021/10/12/0100.html +<p>2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。<br/> +TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。<br/> +ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。</p> +<h2 id="1password-cli">1Password CLIの初期設定</h2> +<p>1Password CLI を利用できるようにする。<br/> +<a href="https://support.1password.com/command-line-getting-started/">1Password CLIのGetting Started</a>を見て、初期設定 …</p> +<p>2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。<br/> +TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。<br/> +ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。</p> +<h2 id="1password-cli">1Password CLIの初期設定</h2> +<p>1Password CLI を利用できるようにする。<br/> +<a href="https://support.1password.com/command-line-getting-started/">1Password CLIのGetting Started</a>を見て、初期設定する。</p> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>op<span class="w"> </span>signin<span class="w"> </span>_1password_url_<span class="w"> </span>_signin_address_ +...<span class="w"> </span><span class="c1"># Secret Key, Password, (設定していればTOTPの6-digit)を聞かれる</span> +</code></pre></div> +<p>短縮形が <code>_1password_url_</code> から自動的に決まるが、どうしても指定したい場合には、 <code>--shorthand</code>オプションで指定する。</p> +<h2 id="totp">TOTPの取得</h2> +<p>通常の1password appのように、30minアクセスがなければ、ロックされるため、パスワードの入力が必要。<br/> +1passwordのURLが <code>example.1password.com</code> であれば、</p> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span><span class="nb">eval</span><span class="w"> </span><span class="k">$(</span>op<span class="w"> </span>signin<span class="w"> </span>example<span class="k">)</span> +</code></pre></div> +<p>として、再認証する。<br/> +環境変数 <code>OP_SESSION_example</code> に認証したときのsession情報が載る。(<code>--session</code> オプションで各コマンドごとに渡しても良い)</p> +<p>TOTPを取得するには、以下のコマンドを実行する。</p> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>op<span class="w"> </span>get<span class="w"> </span>totp<span class="w"> </span><span class="s2">"UUID or Name"</span> +</code></pre></div> +<p>UUIDで指定したい場合には、 <code>op list items --categories Login</code> の結果をjqなどで調べて、取得する。</p> +<h2 id="_1">終わり</h2> +<p>以上で概ねやりたかった、CLIでTOTPを取得することができるようになった。<br/> +最近1PasswordはLinux Desktop向けのアプリを出していたりしているので、もう少し真面目に使っていきたい所存。</p> +<p>ちなみに、複数のプロファイルの切り替えなどで便利なように、 <a href="https://github.com/99designs/aws-vault">99designs/aws-vault</a>というのもあるらしいが、特に使わずに自前シェルスクリプトで使っている。</p>Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった2019-02-12T16:30:00+09:002019-02-12T16:30:00+09:00hitsumabushitag:www.hitsumabushi.org,2019-02-12:/blog/2019/02/12/1630.html +<h2 id="_1">資料</h2> +<ul> +<li><a href="https://yaml.readthedocs.io/en/latest/">Document: ruamel.yaml</a></li> +<li><a href="https://bitbucket.org/ruamel/yaml/">Repository: ruamel.yaml</a></li> +</ul> +<h2 id="_2">背景</h2> +<p>とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。<br/> +sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。</p> +<ul> +<li>コメントは消したくない</li> +<li>ブロックスタイルのままにしたい</li> +<li>diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)</li> +</ul> +<h2 id="ruamelyaml">ruamel.yaml</h2> +<p>python で yaml を扱うときは …</p> +<h2 id="_1">資料</h2> +<ul> +<li><a href="https://yaml.readthedocs.io/en/latest/">Document: ruamel.yaml</a></li> +<li><a href="https://bitbucket.org/ruamel/yaml/">Repository: ruamel.yaml</a></li> +</ul> +<h2 id="_2">背景</h2> +<p>とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。<br/> +sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。</p> +<ul> +<li>コメントは消したくない</li> +<li>ブロックスタイルのままにしたい</li> +<li>diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)</li> +</ul> +<h2 id="ruamelyaml">ruamel.yaml</h2> +<p>python で yaml を扱うときは、PyYAML が有名だと思う。<br/> +PyYAMLを使う場合、yamlをloadしてdumpすると、フロースタイルなのは変更できるが、<br/> +コメントは消えてしまうのに対応するのが簡単ではない(と思っている)。</p> +<p>ruamel.yaml はPyYAMLをフォークしたもので、YAML 1.2 をサポートしているし、コメントやスタイル、キーの順番を保つloaderが実装されている。<br/> +https://yaml.readthedocs.io/en/latest/overview.html</p> +<h3 id="_3">使い方</h3> +<p>使い方としては、 load, dumpの代わりに、 <code>round_trip_load</code>, <code>round_trip_dump</code> を使えば良い。<br/> +オプションは自分が使っているconfigに合わせて使えば良い。</p> +<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">ruamel.yaml</span> +<span class="kn">import</span> <span class="nn">os</span> + +<span class="k">def</span> <span class="nf">process</span><span class="p">(</span><span class="n">filepath</span><span class="p">):</span> + <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filepath</span><span class="p">,</span> <span class="s1">'r+'</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span> + <span class="n">data</span> <span class="o">=</span> <span class="n">ruamel</span><span class="o">.</span><span class="n">yaml</span><span class="o">.</span><span class="n">round_trip_load</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">preserve_quotes</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> + <span class="c1"># 必要な処理をする</span> + <span class="c1"># data["foo"] = "bar"</span> + <span class="k">if</span> <span class="n">rewrite</span><span class="p">:</span> + <span class="n">f</span><span class="o">.</span><span class="n">seek</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> + <span class="n">ruamel</span><span class="o">.</span><span class="n">yaml</span><span class="o">.</span><span class="n">round_trip_dump</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">f</span><span class="p">,</span> <span class="n">explicit_start</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> + <span class="n">f</span><span class="o">.</span><span class="n">truncate</span><span class="p">()</span> + +<span class="k">for</span> <span class="n">pathname</span><span class="p">,</span> <span class="n">dirnames</span><span class="p">,</span> <span class="n">filenames</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">walk</span><span class="p">(</span><span class="s1">'.'</span><span class="p">):</span> + <span class="k">for</span> <span class="n">filename</span> <span class="ow">in</span> <span class="n">filenames</span><span class="p">:</span> + <span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">pathname</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="n">filename</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> + <span class="n">process</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">pathname</span><span class="si">}</span><span class="s2">/</span><span class="si">{</span><span class="n">filename</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> +</code></pre></div>CloudFormation の不満点2019-01-25T14:54:00+09:002019-01-25T14:54:00+09:00hitsumabushitag:www.hitsumabushi.org,2019-01-25:/blog/2019/01/25/1454.html +<p>以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。</p> +<h2 id="_1">要点</h2> +<ul> +<li>CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない</li> +<li>Drift 検出は誤検出が多すぎて使いづらい</li> +<li>Change Set は動いている状態との差分を見ていないので、信用できない</li> +</ul> +<h2 id="_2">経緯</h2> +<p>CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。<br/> +ただ、各サービ …</p> +<p>以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。</p> +<h2 id="_1">要点</h2> +<ul> +<li>CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない</li> +<li>Drift 検出は誤検出が多すぎて使いづらい</li> +<li>Change Set は動いている状態との差分を見ていないので、信用できない</li> +</ul> +<h2 id="_2">経緯</h2> +<p>CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。<br/> +ただ、各サービスの担当者ごとにある程度自由にオペレーションできるため、手動で変更されていないか、一応調べておこうと思い、<br/> +<a href="https://aws.amazon.com/jp/blogs/news/new-cloudformation-drift-detection/">2018-11 にリリースされたドリフト検出</a> を使って、<br/> +手作業で実施された変更点もCloudFormationに取り込みつつ、対応しようとした。</p> +<h2 id="_3">期待したこと</h2> +<ul> +<li>CloudFormation のスタックがたくさんあるため、1つ1つ細かく差分を見て修正することが難しい</li> +<li>ドリフト検出されたところだけ1つずつ修正していって、Change Setを作りながら現状に合わせたい</li> +</ul> +<h2 id="_4">実際</h2> +<h3 id="_5">ドリフト検出</h3> +<ul> +<li>サポートされるリソースが少ない</li> +<li><a href="https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html">Resources that Support Drift Detection</a></li> +<li>そもそも誤検出が多い</li> +<li><a href="https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html?shortFooter=true#drift-considerations">Detecting Unmanaged Configuration Changes to Stacks and Resources</a></li> +<li>LBのプロパティなど、配列で定義されるところをデフォルト値で埋められただけで、ドリフトが検出される</li> +<li>エッジケースの(とAWSが主張している)誤検出に該当するのか、目で見て考える以外の方法がない</li> +</ul> +<h3 id="change-set">Change Set</h3> +<ul> +<li>実際に動いているシステムとの差分を見ていない</li> +<li>前回の設定とのスタックの差分を見ている</li> +<li>手作業で変更されているとChange Setの実行に失敗する(実際には差分がないので)</li> +<li>その場合 Update Stack するしかない</li> +</ul> +<p>例えば、手作業でタグを増やしたとして、翌営業日にCloudFormationに反映したい、と思った場合、<br/> +ドリフト検出で誤検知を目でフィルタしつつ(誤検知だと確信が持てるかはわからない)、<br/> +CloudFormation のパラメータを書き換えて、Update Stackしないといけない。<br/> +(一応、Update Stack 前に Change Set で差分を見て、execute して失敗することを確認したほうが安心感はある。)</p> +<h2 id="_6">まとめ</h2> +<p>手作業の変更をできないようにしておく以外にない。<br/> +あるいは、本格的にCloudFormationを利用し始めるまでの間に Terraform に移行する。</p> +<p>(なんでChange SetをRunnning Stateとの比較にしなかったんだろう...)</p>DebianでLuaJITTeXを使いたい2018-10-31T19:01:00+09:002018-10-31T19:01:00+09:00hitsumabushitag:www.hitsumabushi.org,2018-10-31:/blog/2018/10/31/1901.html +<p>そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。</p> +<h2 id="_1">参考</h2> +<ul> +<li><a href="http://www.fugenji.org/~thomas/texlive-guide/luajitlatex.html">luajittex のセットアップ</a><ul> +<li>そもそもこのサイトの情報が有用 <a href="http://www.fugenji.org/~thomas/texlive-guide/index.html">TeX Live を使おう──主に Linux ユーザのために──</a></li> +</ul> +</li> +</ul> +<h2 id="_2">未解決の問題</h2> +<ul> +<li><code>/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST</code> が自動生成されている、とコメントされているが、元ファイルがわからない</li> +</ul> +<div class="highlight"><pre><span></span><code>### This file was automatically generated by update-fmtutil. +# +# Any local change will be overwritten. Please see the documentation +# of updmap on …</code></pre></div> +<p>そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。</p> +<h2 id="_1">参考</h2> +<ul> +<li><a href="http://www.fugenji.org/~thomas/texlive-guide/luajitlatex.html">luajittex のセットアップ</a><ul> +<li>そもそもこのサイトの情報が有用 <a href="http://www.fugenji.org/~thomas/texlive-guide/index.html">TeX Live を使おう──主に Linux ユーザのために──</a></li> +</ul> +</li> +</ul> +<h2 id="_2">未解決の問題</h2> +<ul> +<li><code>/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST</code> が自動生成されている、とコメントされているが、元ファイルがわからない</li> +</ul> +<div class="highlight"><pre><span></span><code>### This file was automatically generated by update-fmtutil. +# +# Any local change will be overwritten. Please see the documentation +# of updmap on how to override things from here. +# +### +</code></pre></div> +<h2 id="_3">準備</h2> +<p>パッケージインストール</p> +<div class="highlight"><pre><span></span><code>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>texlive-lang-japanese<span class="w"> </span>texlive-latex-extra<span class="w"> </span>texlive-luatex +<span class="c1"># 参考文献とか書くとき</span> +sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>texlive-bibtex-extra<span class="w"> </span>biber +</code></pre></div> +<p><code>/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST</code> を編集したい。(未解決の項目に書いた通り、元ファイルがわからないので直接編集している)</p> +<div class="highlight"><pre><span></span><code><span class="gu">@@ -6,7 +6,7 @@</span> +<span class="w"> </span>### +<span class="w"> </span>dviluatex luatex language.def,language.dat.lua dviluatex.ini +<span class="w"> </span>etex pdftex language.def -translate-file=cp227.tcx *etex.ini +<span class="gd">-#! luajittex luajittex language.def,language.dat.lua luatex.ini</span> +<span class="gi">+luajittex luajittex language.def,language.dat.lua luatex.ini</span> +<span class="w"> </span>luatex luatex language.def,language.dat.lua luatex.ini +<span class="w"> </span>mf mf-nowin - -translate-file=cp227.tcx mf.ini +<span class="w"> </span>pdfetex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini +<span class="gu">@@ -14,7 +14,7 @@</span> +<span class="w"> </span>tex tex - tex.ini +<span class="w"> </span>dvilualatex luatex language.dat,language.dat.lua dvilualatex.ini +<span class="w"> </span>latex pdftex language.dat -translate-file=cp227.tcx *latex.ini +<span class="gd">-#! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini</span> +<span class="gi">+luajitlatex luajittex language.dat,language.dat.lua lualatex.ini</span> +<span class="w"> </span>lualatex luatex language.dat,language.dat.lua lualatex.ini +<span class="w"> </span>mptopdf pdftex - -translate-file=cp227.tcx mptopdf.tex +<span class="w"> </span>pdflatex pdftex language.dat -translate-file=cp227.tcx *pdflatex.ini +</code></pre></div> +<h2 id="_4">使い方</h2> +<div class="highlight"><pre><span></span><code>luajittex<span class="w"> </span>--fmt<span class="o">=</span>luajitlatex.fmt<span class="w"> </span><span class="o">{</span>tex<span class="w"> </span>file<span class="o">}</span> +</code></pre></div> +<p>問題なくコンパイルできれば、pdfが生成されるはず。</p> +<h2 id="vscodetex">VSCodeでTeXする</h2> +<p><a href="https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop">LaTeX Workshop</a> をインストールして、以下の設定をする。<br/> +参考文献が必要なときは、 <code>luajittex_with_bib</code> のレシピでビルドするように書いている。</p> +<div class="highlight"><pre><span></span><code><span class="p">{</span> +<span class="w"> </span><span class="nt">"latex-workshop.chktex.enabled"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"latex-workshop.latex.recipes"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"luajittex"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"tools"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"luajitlatex"</span><span class="p">]</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"luajittex_with_bib"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"tools"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"luajitlatex"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"biber"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"luajitlatex"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"luajitlatex"</span> +<span class="w"> </span><span class="p">]</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"latex-workshop.latex.tools"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"luajitlatex"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"command"</span><span class="p">:</span><span class="w"> </span><span class="s2">"luajittex"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"args"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"--cmdx"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"--synctex=1"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"--fmt=luajitlatex.fmt"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"%DOCFILE%"</span> +<span class="w"> </span><span class="p">]</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"biber"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"command"</span><span class="p">:</span><span class="w"> </span><span class="s2">"biber"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"args"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"%DOCFILE%"</span> +<span class="w"> </span><span class="p">]</span> +<span class="w"> </span><span class="p">}</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"latex-workshop.intellisense.surroundCommand.enabled"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"latex-workshop.synctex.afterBuild.enabled"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span> +<span class="p">}</span> +</code></pre></div> +<h2 id="tex">その他実際のTeXを書く時に参考になりそうなもののメモ</h2> +<ul> +<li>参考文献まわり<ul> +<li><a href="https://ja.wikipedia.org/wiki/BibTeX#.E6.9B.B8.E8.AA.8C.E6.83.85.E5.A0.B1.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB">BibTeXの書誌情報の書き方知りたいとき: Wikipedia</a></li> +<li>参考文献を探したい時: Google Scholar</li> +</ul> +</li> +</ul>Debian でログインシェルをzshにしている人が snappy を使う場合の注意2018-04-11T10:58:00+09:002018-04-11T10:58:00+09:00hitsumabushitag:www.hitsumabushi.org,2018-04-11:/blog/2018/04/11/1058.html +<h2 id="snappy">Snappy について</h2> +<ul> +<li><a href="https://www.ubuntu.com/desktop/snappy">Snappy</a></li> +<li><a href="https://snapcraft.io/">snapcraft</a></li> +</ul> +<p>Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。<br/> +ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。<br/> +その分、sidを使っているとよく起きる、共通ライブラリの依存バ …</p> +<h2 id="snappy">Snappy について</h2> +<ul> +<li><a href="https://www.ubuntu.com/desktop/snappy">Snappy</a></li> +<li><a href="https://snapcraft.io/">snapcraft</a></li> +</ul> +<p>Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。<br/> +ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。<br/> +その分、sidを使っているとよく起きる、共通ライブラリの依存バージョンの不整合がおきる、という問題は起きない。</p> +<p>snapcraftのページではパッケージングの方法も紹介されているので、配布したい人自身がsnapパッケージを作りやすいはず。<br/> +少なくとも、ディストーションごとのパッケージを各アプリケーション作成者がやるよりは、遥かにやりやすい。<br/> +自動アップデートとかもあるので、サービス提供者が利用者に常に最新版を使ってもらいたい場合などにメリットもある。<br/> +実際、 Ubuntu以外にも、Debian, Arch Linux, Gentoo, Fedora, open SUSE などでも利用できる。</p> +<p>Snappy は、snapd というAPIデーモンが動くことになっている。</p> +<h3 id="snappy_1">snappy のインストール</h3> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>snapd +</code></pre></div> +<h3 id="snap">snap パッケージのインストール</h3> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>snap<span class="w"> </span>install<span class="w"> </span>hello-world +</code></pre></div> +<h2 id="_1">困ったこと</h2> +<ul> +<li>Snappy でインストールしたアプリケーションへのパスが通らない</li> +<li>Snappy でインストールしたデスクトップアプリケーションが、menuに登録されない</li> +</ul> +<h2 id="_2">調べたこと</h2> +<h3 id="_3">バージョン</h3> +<p>Kernel はpinningしているので、少し古い。</p> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>snap<span class="w"> </span>version +snap<span class="w"> </span><span class="m">2</span>.32.3 +snapd<span class="w"> </span><span class="m">2</span>.32.3 +series<span class="w"> </span><span class="m">16</span> +debian +kernel<span class="w"> </span><span class="m">4</span>.9.0-3-amd64 +</code></pre></div> +<h3 id="snappy_2">snappy でインストールした場合のパス</h3> +<ul> +<li>実態はバージョンごとに、 <code>/snap/_app_name_/_version_/</code> 以下に置かれる。現在利用しているものへのリンクは <code>/snap/_app_name_/current/</code></li> +<li>コマンドは、 <code>/snap/bin/</code> 以下にコピーされる。</li> +<li>デスクトップエントリのファイルは <code>/var/lib/snapd/desktop/applications/*.desktop</code> というファイルが作成される</li> +</ul> +<h3 id="_4">パスの設定方法について</h3> +<p><code>/etc/profile.d/apps-bin-path.sh</code> にパスを設定するためのスクリプトが置かれている。</p> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>cat<span class="w"> </span>/etc/profile.d/apps-bin-path.sh +<span class="c1">#!/bin/sh --this-shebang-is-just-here-to-inform-shellcheck--</span> + +<span class="c1"># Expand $PATH to include the directory where snappy applications go.</span> +<span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">"</span><span class="si">${</span><span class="nv">PATH</span><span class="p">#*/snap/bin</span><span class="si">}</span><span class="s2">"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"</span><span class="si">${</span><span class="nv">PATH</span><span class="si">}</span><span class="s2">"</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span> +<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/snap/bin +<span class="k">fi</span> + +<span class="c1"># desktop files (used by desktop environments within both X11 and Wayland) are</span> +<span class="c1"># looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for</span> +<span class="c1"># snappy applications' desktop files.</span> +<span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">"</span><span class="si">${</span><span class="nv">XDG_DATA_DIRS</span><span class="p">#*/snapd/desktop</span><span class="si">}</span><span class="s2">"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"</span><span class="si">${</span><span class="nv">XDG_DATA_DIRS</span><span class="si">}</span><span class="s2">"</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span> +<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">XDG_DATA_DIRS</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">XDG_DATA_DIRS</span><span class="k">:-</span><span class="p">/usr/local/share:/usr/share</span><span class="si">}</span><span class="s2">:/var/lib/snapd/desktop"</span> +<span class="k">fi</span> +</code></pre></div> +<p>zsh では <code>/etc/profile</code> などを読まないので、パスが設定できていない。<br/> +<code>/etc/zsh/zprofile</code> に、上記の内容を書いて置けば良い。<br/> +あるいは、 <code>/etc/zsh/zprofile</code> で以下のようにする。</p> +<div class="highlight"><pre><span></span><code><span class="k">for</span><span class="w"> </span>i<span class="w"> </span><span class="k">in</span><span class="w"> </span>/etc/profile.d/*.sh<span class="w"> </span><span class="p">;</span><span class="w"> </span><span class="k">do</span> +<span class="w"> </span><span class="o">[</span><span class="w"> </span>-r<span class="w"> </span><span class="nv">$i</span><span class="w"> </span><span class="o">]</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="nb">source</span><span class="w"> </span><span class="nv">$i</span> +<span class="k">done</span> +</code></pre></div>PyPIへパッケージをアップロードする2018-04-05T14:20:00+09:002018-04-05T14:20:00+09:00hitsumabushitag:www.hitsumabushi.org,2018-04-05:/blog/2018/04/05/1420.html +<h1 id="_1">資料</h1> +<ul> +<li>パッケージ構成については <a href="https://github.com/pypa/sampleproject">github.com/pypa/sampleproject</a></li> +<li>https://pypi.python.org/pypi/twine</li> +<li>https://packaging.python.org/tutorials/distributing-packages/</li> +</ul> +<h1 id="_2">手順</h1> +<h2 id="pypi">PyPIへユーザー登録する</h2> +<p>PyPI には普段使われている本番環境とは別に、テスト環境がある。<br/> +アカウントがそれぞれ独立しているので、両方で作成する必要がある。</p> +<ul> +<li><a href="https://pypi.org/">PyPI</a></li> +<li><a href="https://test.pypi.org/">PyPI Test</a></li> +</ul> +<h2 id="pypirc"><code>.pypirc</code> の作成</h2> +<p>以下のように <code>~/.pypirc</code> を作成して、test 環境を利用できるようにしておく。<br/> +平分でパスワードを書くことになる …</p> +<h1 id="_1">資料</h1> +<ul> +<li>パッケージ構成については <a href="https://github.com/pypa/sampleproject">github.com/pypa/sampleproject</a></li> +<li>https://pypi.python.org/pypi/twine</li> +<li>https://packaging.python.org/tutorials/distributing-packages/</li> +</ul> +<h1 id="_2">手順</h1> +<h2 id="pypi">PyPIへユーザー登録する</h2> +<p>PyPI には普段使われている本番環境とは別に、テスト環境がある。<br/> +アカウントがそれぞれ独立しているので、両方で作成する必要がある。</p> +<ul> +<li><a href="https://pypi.org/">PyPI</a></li> +<li><a href="https://test.pypi.org/">PyPI Test</a></li> +</ul> +<h2 id="pypirc"><code>.pypirc</code> の作成</h2> +<p>以下のように <code>~/.pypirc</code> を作成して、test 環境を利用できるようにしておく。<br/> +平分でパスワードを書くことになるので、最低限パーミッションを変えておくことにする。</p> +<div class="highlight"><pre><span></span><code><span class="err">$</span><span class="w"> </span><span class="n">cat</span><span class="w"> </span><span class="o">~/</span><span class="p">.</span><span class="n">pypirc</span> +<span class="o">[</span><span class="n">distutils</span><span class="o">]</span> +<span class="k">index</span><span class="o">-</span><span class="n">servers</span><span class="w"> </span><span class="o">=</span> +<span class="w"> </span><span class="n">pypi</span> +<span class="w"> </span><span class="n">testpypi</span> + +<span class="o">[</span><span class="n">pypi</span><span class="o">]</span> +<span class="n">repository</span><span class="o">=</span><span class="nl">https</span><span class="p">:</span><span class="o">//</span><span class="n">upload</span><span class="p">.</span><span class="n">pypi</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">legacy</span><span class="o">/</span> +<span class="n">username</span><span class="o">=</span><span class="n">_username_</span> +<span class="n">password</span><span class="o">=</span><span class="n">_password_</span> + +<span class="o">[</span><span class="n">testpypi</span><span class="o">]</span> +<span class="n">repository</span><span class="o">=</span><span class="nl">https</span><span class="p">:</span><span class="o">//</span><span class="n">test</span><span class="p">.</span><span class="n">pypi</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">legacy</span><span class="o">/</span> +<span class="n">username</span><span class="o">=</span><span class="n">_username_</span> +<span class="n">password</span><span class="o">=</span><span class="n">_password_</span> + +<span class="err">$</span><span class="w"> </span><span class="n">chmod</span><span class="w"> </span><span class="mi">0600</span><span class="w"> </span><span class="o">~/</span><span class="p">.</span><span class="n">pypirc</span> +</code></pre></div> +<h2 id="_3">パッケージのアップロード</h2> +<h3 id="_4">コマンドのインストール</h3> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>twine +</code></pre></div> +<h3 id="_5">パッケージング前のチェック</h3> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>check-manifest +$<span class="w"> </span>check-manifest +</code></pre></div> +<h3 id="_6">パッケージング</h3> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>wheel +$<span class="w"> </span>python<span class="w"> </span>setup.py<span class="w"> </span>sdist<span class="w"> </span>bdist_wheel +</code></pre></div> +<h3 id="test">Test 環境へアップロード</h3> +<div class="highlight"><pre><span></span><code><span class="o">$</span><span class="w"> </span><span class="n">twine</span><span class="w"> </span><span class="n">upload</span><span class="w"> </span><span class="o">-</span><span class="n">r</span><span class="w"> </span><span class="n">testpypi</span><span class="w"> </span><span class="n">dist</span><span class="o">/*</span> +</code></pre></div> +<p>pip でインストールするには、以下のようにする。</p> +<div class="highlight"><pre><span></span><code>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>--index-url<span class="w"> </span>https://test.pypi.org/simple/<span class="w"> </span>_package_ +</code></pre></div> +<h3 id="_7">本番へアップロード</h3> +<div class="highlight"><pre><span></span><code><span class="o">$</span><span class="w"> </span><span class="n">twine</span><span class="w"> </span><span class="n">upload</span><span class="w"> </span><span class="n">dist</span><span class="o">/*</span> +</code></pre></div>Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ2018-02-05T20:09:00+09:002018-02-05T20:09:00+09:00hitsumabushitag:www.hitsumabushi.org,2018-02-05:/blog/2018/02/05/2009.html +<h1 id="_1">概要</h1> +<p><a href="https://cloud.google.com/pubsub/overview?hl=ja">Google Pub/Sub</a> を <a href="https://github.com/GoogleCloudPlatform/google-cloud-go">GoのSDK</a> から使おうとしていました。<br/> +やっているといくつか詰まったので、メモしておきます。</p> +<ol> +<li>サービスアカウントを利用するためにCredentials JSONを指定する</li> +<li>サブスクリプションの <code>Pub/Sub サブスクライバー権限</code> を与えても Permission Denied になる</li> +</ol> +<h2 id="credentials-json">サービスアカウントを利用するためにCredentials JSONを指定する</h2> +<p>権限の都合上、サービスアカウントのCredentials JSONを利用して認証 …</p> +<h1 id="_1">概要</h1> +<p><a href="https://cloud.google.com/pubsub/overview?hl=ja">Google Pub/Sub</a> を <a href="https://github.com/GoogleCloudPlatform/google-cloud-go">GoのSDK</a> から使おうとしていました。<br/> +やっているといくつか詰まったので、メモしておきます。</p> +<ol> +<li>サービスアカウントを利用するためにCredentials JSONを指定する</li> +<li>サブスクリプションの <code>Pub/Sub サブスクライバー権限</code> を与えても Permission Denied になる</li> +</ol> +<h2 id="credentials-json">サービスアカウントを利用するためにCredentials JSONを指定する</h2> +<p>権限の都合上、サービスアカウントのCredentials JSONを利用して認証したい、という要件がありました。<br/> +ドキュメントを見ていると、 <a href="https://cloud.google.com/docs/authentication/production?hl=ja">ADC(Application Default Credentials)</a> を利用して認証している場合が多いです。<br/> +これを使う場合、 <code>GOOGLE_APPLICATION_CREDENTIALS</code> という環境変数が設定されていれば、そのファイルを読んでくれるのですが、今回の要件では複数の Credentials を利用したかったので、Go プログラム中で指定する必要がありました。</p> +<p>結論としては、以下のような形でpubsub client を作るときに認証情報を渡すことができます。</p> +<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nv">jsonKey</span><span class="p">,</span><span class="w"> </span><span class="nv">err</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nv">ioutil</span><span class="o">.</span><span class="nf">ReadFile</span><span class="p">(</span><span class="nv">credentialJSONPath</span><span class="p">)</span> +<span class="w"> </span><span class="nv">conf</span><span class="p">,</span><span class="w"> </span><span class="nv">err</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nv">google</span><span class="o">.</span><span class="nf">JWTConfigFromJSON</span><span class="p">(</span><span class="nv">jsonKey</span><span class="p">,</span><span class="w"> </span><span class="nv">pubsub</span><span class="o">.</span><span class="nv">ScopePubSub</span><span class="p">,</span><span class="w"> </span><span class="nv">pubsub</span><span class="o">.</span><span class="nv">ScopeCloudPlatform</span><span class="p">)</span> +<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nv">err</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nv">nil</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nv">log</span><span class="o">.</span><span class="nf">Fatal</span><span class="p">(</span><span class="nv">err</span><span class="p">)</span> +<span class="w"> </span><span class="p">}</span> +<span class="w"> </span><span class="nv">ctx</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nv">context</span><span class="o">.</span><span class="nf">Background</span><span class="p">()</span> +<span class="w"> </span><span class="nv">ts</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nv">conf</span><span class="o">.</span><span class="nf">TokenSource</span><span class="p">(</span><span class="nv">ctx</span><span class="p">)</span> +<span class="w"> </span><span class="nv">c</span><span class="p">,</span><span class="w"> </span><span class="nv">err</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nv">pubsub</span><span class="o">.</span><span class="nf">NewClient</span><span class="p">(</span><span class="nv">ctx</span><span class="p">,</span><span class="w"> </span><span class="nv">projectID</span><span class="p">,</span><span class="w"> </span><span class="nv">option</span><span class="o">.</span><span class="nf">WithTokenSource</span><span class="p">(</span><span class="nv">ts</span><span class="p">))</span> +</code></pre></div> +<p>Publisherのサンプルは以下の通りです。</p> +<script src="https://gist.github.com/hitsumabushi/7cf1fa45813208f314b29da84a3ff2cc.js"></script> +<h2 id="pubsub-permission-denied">サブスクリプションの <code>Pub/Sub サブスクライバー</code> 権限を与えても Permission Denied になる</h2> +<p>結論としては、 <code>Pub/Sub サブスクライバー</code> 権限に加えて、 <code>Pub/Sub 閲覧者</code> の権限が必要でした。<br/> +ドキュメント上は、 <code>Pub/Sub サブスクライバー</code> 権限だけで良さそうに見えますが、権限不足だったようでした。<br/> +Subscriberのサンプルは以下の通りです。</p> +<script src="https://gist.github.com/hitsumabushi/baaeefd241e27ab0414763bdc6a93f11.js"></script>さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話2017-12-05T17:48:00+09:002017-12-05T17:48:00+09:00hitsumabushitag:www.hitsumabushi.org,2017-12-05:/blog/2017/12/05/1748.html +<hr/> +<p>これは、<a href="https://qiita.com/advent-calendar/2017/sakura">さくらインターネット Advent Calendar 2017</a> として書いた<a href="https://qiita.com/hitsumabushi/items/e89b763dd4fc41e15136">記事</a> です。</p> +<hr/> +<p>さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。<br/> +sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。</p> +<p>私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。<br/> +その結果と …</p> +<hr/> +<p>これは、<a href="https://qiita.com/advent-calendar/2017/sakura">さくらインターネット Advent Calendar 2017</a> として書いた<a href="https://qiita.com/hitsumabushi/items/e89b763dd4fc41e15136">記事</a> です。</p> +<hr/> +<p>さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。<br/> +sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。</p> +<p>私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。<br/> +その結果としてTerraform を導入し、Terraform (+ Terraform for さくらのクラウド) + Ansible で運用することになりました。<br/> +導入までの課題と、どのように導入・利用しているのか、について書きたいと思います。</p> +<h2 id="_1">運用の課題</h2> +<h3 id="_2">検証環境と本番環境で構成に差分があり、それに気づきづらい</h3> +<p>mesos+marathon を利用したコンテナ実行環境を使ったマイクロサービスアーキテクチャになっていて、それ以外にも、redis, memcached, メッセージキューなどいろいろなコンポーネントがあります。<br/> +そのため、個別の開発者がクリーンな環境を気軽に用意しづらいです。</p> +<p>インフラの構成を変更したいと思ったとき、個別の開発者がクリーンな環境を個別に作るのは手間がかかってしまうため、直接検証環境でテストしがちです。その際に、行われた変更がそのまま残ってしまい、本番環境との差が残ってしまっているケースがありました。</p> +<h3 id="ansible-playbook">Ansible Playbook の内容と現実に差分がある</h3> +<p>もともとOS内の設定はansibleで管理していたのですが、対象ホストの増加、ansible playbookの肥大化に伴い、実行時間が増えてしまいました。<br/> +それに伴い、<code>--limit</code>, <code>--tags</code> をつけて部分的に実行するようになり、playbook と差分が散見されるようになりました。</p> +<h2 id="_3">方針</h2> +<p>ansible は全部実行しろ、などとルールを作ることは簡単なのですが、上記に書いたとおり、心理的なハードルによって発生している問題だと思いました。そこでルール化することはエンジニアリングの敗北という感じがしたので、差分がわかるように構成管理することと、差分を定期的にチェックして通知することに集中することにしました。</p> +<p>構成管理として、OS内の部分はansibleを利用していたためそのまま利用し、インフラの構成管理としては、ちょうど <a href="https://sacloud.github.io/terraform-provider-sakuracloud/">Terraform for さくらのクラウド</a> もあったため、terraformを利用することにしました。</p> +<p>差分の検知としては、terraform plan, ansible check mode を定期的に実行することにしました。</p> +<h2 id="terraform">terraform 導入のために</h2> +<h3 id="terraform_1">terraform のフォルダ構成</h3> +<p><a href="https://github.com/hashicorp/best-practices/tree/master/terraform">他のクラウドでのベストプラクティス</a> を参考に、フォルダ構成は以下のようにしています。<br/> +terraform plan, apply などする場合には、 <code>pod-xxx</code> ディレクトリ配下で実行します。</p> +<div class="highlight"><pre><span></span><code>. +├── module +│   └── sakuracloud +│   ├── compute +│   │   ├── compute.tf // compute のエントリーポイント。各roleのモジュールへ変数を渡す +│   │   ├── role-hoge // role ごとに作成 +│   │   │   └── role-hoge.tf // util の base-wrapperへ変数を渡す。role固有の変数変換はここでやる +│   │   └── util // 他のroleから読まれる +│   │   ├── base-wrapper // instance と service-dns を呼ぶためのやつ。他のroleからはこいつを見る +│   │   ├── instance // 個別のサーバーの、サーバー/ディスク/DNSレコードの作成 +│   │   └── service-dns // roleごとに、DNSレコードがある場合(VIPに紐づくレコードなど) +│   ├── dns // さくらのクラウドのドメイン/DNSレコードを管理するために利用 +│   │   ├── dns.tf +│   │   └── example +│   │   ├── example.tf +│   │   └── output.tf +│   ├── gslb // さくらのクラウドのGSLBを管理するために利用 +│   │   ├── api +│   │   │   └── api.tf +│   │   └── gslb.tf +│   ├── network // さくらのクラウドのスイッチ/ルーターを管理するために利用 +│   │   ├── internal +│   │   │   ├── internal.tf +│   │   │   └── output.tf +│   │   ├── network.tf +│   │   └── output.tf +│   └── simple-monitor // さくらのクラウドのシンプル監視を管理するために利用 +│   └── simple_monitor.tf +└── providers + └── sakuracloud + └── pod-xxx // システム単位ごとに作る + ├── pod-xxx.tf // compute.tf, dns.tf, ... などのモジュールごとのエントリーポイントへ変数を渡す + ├── terraform.tfstate.d // tfstate。env (今で言うworkspace) で本番と検証環境をわけてる。 + │   ├── dev + │   └── ... + └── terraform.tfvars // 変数をひたすら書く。具体的な値は全てここに書かれているはず。 +</code></pre></div> +<p>大体はさくらのクラウドのコンポーネントごとに、moduleを作っているのですが、compute のところは大きく変更しています。<br/> +サーバー作成と同時に、ディスクの作成や、DNSレコードの作成を行うためです。</p> +<p>例えば、role-hoge というロールが2台あるとき、tfvar中では以下のような変数を作っています。</p> +<div class="highlight"><pre><span></span><code><span class="nx">sakuracloud_dns_foo</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nx">dev</span><span class="p">.</span><span class="nx">zone</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s">"dev.example.com"</span> +<span class="w"> </span><span class="nx">staging</span><span class="p">.</span><span class="nx">zone</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s">"staging.example.com"</span> +<span class="p">}</span> + +<span class="nx">sakuracloud_role_hoge</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nx">dev</span><span class="p">.</span><span class="nx">ipaddresses</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="s">"192.168.0.10"</span><span class="p">,</span><span class="w"> </span><span class="s">"192.168.0.11"</span><span class="p">]</span> +<span class="w"> </span><span class="nx">dev</span><span class="p">.</span><span class="nx">server_tags</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="s">"hoge"</span><span class="p">,</span><span class="w"> </span><span class="s">"develop"</span><span class="p">,</span><span class="w"> </span><span class="s">"__with_sacloud_inventory"</span><span class="p">,</span><span class="w"> </span><span class="s">"starred"</span><span class="p">]</span> +<span class="w"> </span><span class="nx">dev</span><span class="p">.</span><span class="nx">disk_tags</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="s">"hoge"</span><span class="p">]</span> +<span class="w"> </span><span class="nx">staging</span><span class="p">.</span><span class="nx">ipaddresses</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="s">"192.168.1.10"</span><span class="p">,</span><span class="w"> </span><span class="s">"192.168.1.11"</span><span class="p">]</span> +<span class="w"> </span><span class="nx">staging</span><span class="p">.</span><span class="nx">server_tags</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="s">"hoge"</span><span class="p">,</span><span class="w"> </span><span class="s">"staging"</span><span class="p">,</span><span class="w"> </span><span class="s">"__with_sacloud_inventory"</span><span class="p">,</span><span class="w"> </span><span class="s">"starred"</span><span class="p">]</span> +<span class="w"> </span><span class="nx">staging</span><span class="p">.</span><span class="nx">disk_tags</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="s">"hoge"</span><span class="p">]</span> +</code></pre></div> +<p>これを使って、dev環境でサーバー作成したとき</p> +<ul> +<li>サーバー名をFQDNに一致させる<ul> +<li><code>hoge-01.dev.example.com</code>, <code>hoge-02.dev.example.com</code> </li> +</ul> +</li> +<li>DNSレコードも合わせて作成する<ul> +<li>Aレコードとして <code>hoge-01.dev.example.com</code> は192.168.0.10, <code>hoge-02.dev.example.com</code> は192.168.0.11 に対応させる</li> +</ul> +</li> +<li>サーバータグとして、ansibleのroleをつける<ul> +<li><code>hoge</code>, <code>develop</code>, <code>staging</code> がansible側で利用しているロール名です</li> +</ul> +</li> +<li>サーバータグとして、 <code>__with_sacloud_inventory</code> をつける<ul> +<li>一応、terraform 管理外のリソースを許すためにつけています</li> +</ul> +</li> +<li>サーバータグとして、 <code>@group=a</code> などのグループタグをつける<ul> +<li>1つ目のサーバーはa、2つ目はb、...4つ目はd、5つ目はaなどとしています</li> +</ul> +</li> +</ul> +<h3 id="terraformimport">既存リソースをterraformにimport</h3> +<p>既存のリソースをインポートします。形式としては、以下のような形式です。</p> +<div class="highlight"><pre><span></span><code><span class="n">terraform</span> <span class="kn">import</span> <span class="s1">'module.hoge.module.base-instance.sakuracloud_server.base[0]'</span> <span class="n">_リソースID_</span> +</code></pre></div> +<p>注意点としては、tfファイルを書いたあと、terraform planすれば、何をインポートしないといけないかわかるのですが、<br/> +その表示では、<code>module.hoge.base-instance.sakuracloud_server.base[0]</code> というように、途中にmoduleがない形式で表示されます。 import するには都度moduleを書く必要があります。</p> +<p>また、さくらのクラウドにはリソースIDがないけど、terraform で管理できるものがあります。例えばDNSレコードがそうです。<br/> +この場合、リソースIDに当たるものを自分で作成する必要があります。<br/> +どのように生成するかは、 terraform for さくらのクラウドのソースを見ればよいのですが、参考までにgolangで生成する例を載せておきます。<br/> +https://play.golang.org/p/OvQw6BdxVf</p> +<h3 id="ansible-dynamic-inventory">ansible の dynamic inventory のスクリプト作成</h3> +<script src="https://gist.github.com/hitsumabushi/73411a6bcb900a05c027ae0c8a39a9b3.js"></script> +<p>上記のような<code>sacloud_inventory.py</code>スクリプトをansibleのリポジトリに実行権限をつけて用意しています。<br/> +それにより、 <code>ansible-playbook -i sacloud_inventory.py ...</code> とすることで、インベントリファイルを書くことなくansibleを実行できます。</p> +<p>このスクリプトで、さくらのクラウドのAPIを叩くところはすべて、 <a href="https://github.com/sacloud/usacloud">usacloud</a> におまかせしています。<br/> +先程の terraform の例であったように、 <code>__with_sacloud_inventory</code> が入っていないものは全部無視し、タグは全てグループ名にすることにしています。<br/> +(13-22行目は、<a href="https://github.com/ansible/awx">Ansible TowerのOSS版であるAWX</a> を試しているために入れています。)</p> +<p>もしかしたら、さくらのクラウドの特殊タグである <code>@group=a</code> などは除いた方が使いやすいかもしれませんが、監視側からも見るために現状はすべて入れています。</p> +<h2 id="ansible">ansible 側の準備</h2> +<p><code>ansible-playbook -i sacloud_inventory.py site.yml --check</code> をしたいのですが、しばしば check modeで実行できていないplaybookや、変更がないのにchangedにしているplaybookがあります。これを直しましょう。<br/> +check modeで実行できていない、典型的なものとしては以下のようなものがあります。</p> +<h3 id="task">別のtaskの実行結果を参照している</h3> +<p>register を使っているタスクAの結果を参照しているタスクBがある場合、check mode 中でAが実行されないため、タスクBのcheck実行時に変数が参照できないエラーが出ます。<br/> +これを防ぐには、register を使っているタスクAに <code>check_mode: no</code> をつけることです。<br/> +check modeでも本当に実行されるようになるため、例えば、ファイルの存在だけを確認している場合など、副作用がない場合のみ、 <code>check_mode: no</code> をつけましょう。</p> +<h3 id="check-modeshell">check modeに対応していない(特にshellモジュール)</h3> +<p>実行する判断を行うようなタスクを作って、その結果次第で、タスクを実行するように書き換えます。<br/> +新しく作成したタスクでは、上述の通り副作用がないようにし、 <code>check_mode: no</code> をつけましょう。</p> +<h3 id="dns">補足: DNSゾーンファイルの更新</h3> +<p>今回、check modeで実行可能にするためにplaybookをみなしていると、ansible で更新されていないものとして、template指定されたDNSゾーンファイルがありました。<br/> +ゾーンファイルは、シリアルを増やしていく必要があるため、面倒だったのだと思います。</p> +<p>確かに、言われるとめんどくさいような気もしますが、やってみると以下のようにすれば良さそうです。</p> +<ol> +<li>現在のzone fileを見て、現在の serial を取り出し、registerで変数に入れる</li> +<li>template ファイルに、 1.で取ったserialを入れて、差分があるかどうかを確かめる</li> +<li>もし、2.で差分があったら serialをインクリメントした上で、template を実行する</li> +</ol> +<p>実際に書いてみると以下のようになると思います。(NSDを利用した場合の例)</p> +<div class="highlight"><pre><span></span><code><span class="n">server</span><span class="o">:</span> +<span class="w"> </span><span class="n">port</span><span class="o">:</span><span class="w"> </span><span class="mi">10053</span> +<span class="w"> </span><span class="n">zonesdir</span><span class="o">:</span><span class="w"> </span><span class="s2">"/etc/nsd/zones"</span> + +<span class="o">{%</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">zone</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="n">dns</span><span class="o">.</span><span class="na">zones</span><span class="w"> </span><span class="o">%}</span> +<span class="n">zone</span><span class="o">:</span> +<span class="w"> </span><span class="n">name</span><span class="o">:</span><span class="w"> </span><span class="s2">"{{ zone }}"</span> +<span class="w"> </span><span class="n">zonefile</span><span class="o">:</span><span class="w"> </span><span class="s2">"{{ zone }}"</span> + +<span class="o">{%</span><span class="w"> </span><span class="n">endfor</span><span class="w"> </span><span class="o">%}</span> +</code></pre></div> +<div class="highlight"><pre><span></span><code><span class="o">-</span><span class="w"> </span><span class="n">block</span><span class="p">:</span> +<span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">name</span><span class="p">:</span><span class="w"> </span><span class="n">parse</span><span class="w"> </span><span class="n">serial</span><span class="w"> </span><span class="n">from</span><span class="w"> </span><span class="n">zone</span><span class="w"> </span><span class="n">file</span> +<span class="w"> </span><span class="n">shell</span><span class="p">:</span><span class="w"> </span><span class="n">grep</span><span class="w"> </span><span class="s2">";Serial"</span><span class="w"> </span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nsd</span><span class="o">/</span><span class="n">zones</span><span class="o">/</span><span class="p">{{</span><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="p">}}</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">awk</span><span class="w"> </span><span class="s1">'{print $1}'</span> +<span class="w"> </span><span class="n">with_items</span><span class="p">:</span><span class="w"> </span><span class="s2">"{{ dns.zones }}"</span> +<span class="w"> </span><span class="n">register</span><span class="p">:</span><span class="w"> </span><span class="n">old_serials</span> +<span class="w"> </span><span class="n">check_mode</span><span class="p">:</span><span class="w"> </span><span class="n">no</span> +<span class="w"> </span><span class="n">changed_when</span><span class="p">:</span><span class="w"> </span><span class="n">no</span> +<span class="w"> </span><span class="n">tags</span><span class="p">:</span><span class="w"> </span><span class="n">nsd</span> +<span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">name</span><span class="p">:</span><span class="w"> </span><span class="n">check</span><span class="w"> </span><span class="n">whether</span><span class="w"> </span><span class="n">zone</span><span class="w"> </span><span class="n">files</span><span class="w"> </span><span class="n">updated</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="ow">not</span> +<span class="w"> </span><span class="n">template</span><span class="p">:</span><span class="w"> </span><span class="n">src</span><span class="o">=</span><span class="n">zones</span><span class="o">/</span><span class="p">{{</span><span class="w"> </span><span class="n">item</span><span class="o">.</span><span class="mi">1</span><span class="w"> </span><span class="p">}}</span><span class="o">.</span><span class="n">j2</span><span class="w"> </span><span class="n">dest</span><span class="o">=/</span><span class="n">etc</span><span class="o">/</span><span class="n">nsd</span><span class="o">/</span><span class="n">zones</span><span class="o">/</span><span class="p">{{</span><span class="w"> </span><span class="n">item</span><span class="o">.</span><span class="mi">1</span><span class="w"> </span><span class="p">}}</span><span class="w"> </span><span class="n">owner</span><span class="o">=</span><span class="n">root</span><span class="w"> </span><span class="n">group</span><span class="o">=</span><span class="n">root</span><span class="w"> </span><span class="n">mode</span><span class="o">=</span><span class="mi">0644</span> +<span class="w"> </span><span class="n">vars</span><span class="p">:</span> +<span class="w"> </span><span class="n">serial</span><span class="p">:</span><span class="w"> </span><span class="s2">"{{ old_serials.results[item.0].stdout }}"</span> +<span class="w"> </span><span class="n">with_indexed_items</span><span class="p">:</span><span class="w"> </span><span class="s2">"{{ dns.zones }}"</span> +<span class="w"> </span><span class="n">diff</span><span class="p">:</span><span class="w"> </span><span class="n">no</span> +<span class="w"> </span><span class="n">register</span><span class="p">:</span><span class="w"> </span><span class="n">zonefiles_changed</span> +<span class="w"> </span><span class="n">tags</span><span class="p">:</span><span class="w"> </span><span class="n">nsd</span> +<span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">name</span><span class="p">:</span><span class="w"> </span><span class="n">update</span><span class="w"> </span><span class="n">zonefile</span><span class="w"> </span><span class="n">when</span><span class="w"> </span><span class="n">changed</span> +<span class="w"> </span><span class="n">template</span><span class="p">:</span><span class="w"> </span><span class="n">src</span><span class="o">=</span><span class="n">zones</span><span class="o">/</span><span class="p">{{</span><span class="w"> </span><span class="n">item</span><span class="o">.</span><span class="mi">1</span><span class="w"> </span><span class="p">}}</span><span class="o">.</span><span class="n">j2</span><span class="w"> </span><span class="n">dest</span><span class="o">=/</span><span class="n">etc</span><span class="o">/</span><span class="n">nsd</span><span class="o">/</span><span class="n">zones</span><span class="o">/</span><span class="p">{{</span><span class="w"> </span><span class="n">item</span><span class="o">.</span><span class="mi">1</span><span class="w"> </span><span class="p">}}</span><span class="w"> </span><span class="n">owner</span><span class="o">=</span><span class="n">root</span><span class="w"> </span><span class="n">group</span><span class="o">=</span><span class="n">root</span><span class="w"> </span><span class="n">mode</span><span class="o">=</span><span class="mi">0644</span> +<span class="w"> </span><span class="n">vars</span><span class="p">:</span> +<span class="w"> </span><span class="n">serial</span><span class="p">:</span><span class="w"> </span><span class="s2">"{{ old_serials.results[item.0].stdout|int + 1 }}"</span> +<span class="w"> </span><span class="n">when</span><span class="p">:</span><span class="w"> </span><span class="n">zonefiles_changed</span><span class="o">.</span><span class="n">results</span><span class="p">[</span><span class="n">item</span><span class="o">.</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">changed</span> +<span class="w"> </span><span class="n">with_indexed_items</span><span class="p">:</span><span class="w"> </span><span class="s2">"{{ dns.zones }}"</span> +<span class="w"> </span><span class="n">notify</span><span class="p">:</span><span class="w"> </span><span class="n">reload</span><span class="w"> </span><span class="n">nsd</span> +<span class="w"> </span><span class="n">tags</span><span class="p">:</span><span class="w"> </span><span class="n">nsd</span> +</code></pre></div> +<h2 id="_4">定期的な差分チェック</h2> +<p>ここまでくれば、あとはcronなりJenkinsで、<code>terraform plan</code> と <code>ansible-playbook -i sacloud_inventory.py site.yml --check</code> を定期的に走らせて、差分があったらslackなりに通知すればオッケーです。<br/> +Jenkinsからapplyするようにしておけば、より良いと思います。</p> +<h2 id="_5">感想と今後に向けて</h2> +<p>ここではインフラのデプロイをどのように改善してきたのかを書きました。<br/> +usacloud や Terraform for さくらのクラウドがあるおかげで、規模が大きくなっても楽に管理できている実感があります。<br/> +実際、雑に自前スクリプトを書いていたものも捨てていっているところです。</p> +<p>この記事で書いたようにインフラの整合性を確かめることができるようになったので、今後としては、</p> +<ul> +<li>(ansibleの実行を <a href="https://github.com/ansible/awx">AWX</a> で行う(だいたいできた) )</li> +<li>インフラ/アプリケーションのCDを行うための監視改善。特に node/service discovery改善</li> +<li>アプリケーションのCD</li> +<li>terraform, ansible の自動適用<br/> +などを目標に改善活動を行っていく予定です。</li> +</ul>Mesos の sandbox のログローテーションをする2017-12-01T20:01:00+09:002017-12-01T20:01:00+09:00hitsumabushitag:www.hitsumabushi.org,2017-12-01:/blog/2017/12/01/2001.html +<h3 id="_1">結論</h3> +<ul> +<li>http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger</li> +<li><code>LogrotateContainerLogger</code> を使って、 module parameter を設定する</li> +</ul> +<h3 id="_2">概要</h3> +<p>Mesos + Marathon 環境でdockerを動かしている。<br/> +基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。<br/> +調べてみると、 <code>/var/lib/mesos-slave/slaves/</code> 以下にあるフォルダのうち、sandbox のログが肥大化していた。<br/> +sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosか …</p> +<h3 id="_1">結論</h3> +<ul> +<li>http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger</li> +<li><code>LogrotateContainerLogger</code> を使って、 module parameter を設定する</li> +</ul> +<h3 id="_2">概要</h3> +<p>Mesos + Marathon 環境でdockerを動かしている。<br/> +基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。<br/> +調べてみると、 <code>/var/lib/mesos-slave/slaves/</code> 以下にあるフォルダのうち、sandbox のログが肥大化していた。<br/> +sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosからファイルとして取得することができる。<br/> +長期的なものは fluentd で飛ばしているので問題ないため、障害時や直近の確認のために sandbox を使うことにして、<br/> +短期間でのログローテーションを行うことにした。</p> +<h3 id="_3">設定方法</h3> +<h4 id="logrotatecontainerlogger">LogrotateContainerLogger の利用が可能か調べる</h4> +<p>共有オブジェクト <code>/usr/lib/liblogrotate_container_logger.so</code> にあることを確認する。<br/> +パスが違っても良いが、その場合は以下で出てくるパスも変更する。</p> +<h4 id="_4">モジュールの設定ファイルを書く</h4> +<p><code>/etc/mesos_slave_modules.json</code> として以下を書く。</p> +<div class="highlight"><pre><span></span><code>{ + "libraries": [{ + "file": "/usr/lib/liblogrotate_container_logger.so", + "modules": [{ + "name": "org_apache_mesos_LogrotateContainerLogger" + # パラメータを指定するときはここに書く + }] + }] +} +</code></pre></div> +<h4 id="_5">モジュールの有効化</h4> +<p><code>/etc/mesos-slave/modules</code> として、以下が書かれたファイルを置く。</p> +<div class="highlight"><pre><span></span><code>file:///etc/mesos-slave-modules.json +</code></pre></div> +<p><code>/etc/mesos-slave/container_logger</code> として、以下が書かれたファイルを置く。</p> +<div class="highlight"><pre><span></span><code>org_apache_mesos_LogrotateContainerLogger +</code></pre></div> +<h4 id="mesos-slave">mesos-slave の起動</h4> +<p>mesos-slave を起動する。</p> +<h4 id="_6">動作確認</h4> +<p>sandbox を見ると、 stdout.logrotate.conf, stderr.logrotate.conf が出来ている。</p> +<p><img alt="" src="/images/2017/mesos/mesos_sandbox.png"/></p> +<p>ファイルの中身は</p> +<div class="highlight"><pre><span></span><code><span class="o">/</span><span class="nv">path</span><span class="o">/</span><span class="nv">to</span><span class="o">/</span><span class="nv">stdout</span><span class="o">/</span><span class="w"> </span>{ +##<span class="w"> </span><span class="k">logrotate</span><span class="w"> </span>オプション:<span class="w"> </span>パラメータで指定してない場合は<span class="w"> </span><span class="nv">size</span><span class="w"> </span><span class="mi">10481664</span><span class="w"> </span>くらいしかない +} +</code></pre></div> +<p>となっている。</p> \ No newline at end of file diff --git a/content/images/2014/ServiceInstance_AboutInfo_Detail.gif b/images/2014/ServiceInstance_AboutInfo_Detail.gif similarity index 100% rename from content/images/2014/ServiceInstance_AboutInfo_Detail.gif rename to images/2014/ServiceInstance_AboutInfo_Detail.gif diff --git a/content/images/2014/ServiceInstance_TopLevel_Figure.gif b/images/2014/ServiceInstance_TopLevel_Figure.gif similarity index 100% rename from content/images/2014/ServiceInstance_TopLevel_Figure.gif rename to images/2014/ServiceInstance_TopLevel_Figure.gif diff --git a/content/images/2014/XChat_201406061.jpg b/images/2014/XChat_201406061.jpg similarity index 100% rename from content/images/2014/XChat_201406061.jpg rename to images/2014/XChat_201406061.jpg diff --git a/content/images/2014/legend_figures.jpg b/images/2014/legend_figures.jpg similarity index 100% rename from content/images/2014/legend_figures.jpg rename to images/2014/legend_figures.jpg diff --git a/content/images/2014/vpd_vdpa.png b/images/2014/vpd_vdpa.png similarity index 100% rename from content/images/2014/vpd_vdpa.png rename to images/2014/vpd_vdpa.png diff --git a/content/images/2016/advent-calendar/01.png b/images/2016/advent-calendar/01.png similarity index 100% rename from content/images/2016/advent-calendar/01.png rename to images/2016/advent-calendar/01.png diff --git a/content/images/2016/advent-calendar/03.png b/images/2016/advent-calendar/03.png similarity index 100% rename from content/images/2016/advent-calendar/03.png rename to images/2016/advent-calendar/03.png diff --git a/content/images/2016/advent-calendar/04.png b/images/2016/advent-calendar/04.png similarity index 100% rename from content/images/2016/advent-calendar/04.png rename to images/2016/advent-calendar/04.png diff --git a/content/images/2016/aptly/aptly_logo.png b/images/2016/aptly/aptly_logo.png similarity index 100% rename from content/images/2016/aptly/aptly_logo.png rename to images/2016/aptly/aptly_logo.png diff --git a/content/images/2016/vmware_vcp/VCP6-NV.png b/images/2016/vmware_vcp/VCP6-NV.png similarity index 100% rename from content/images/2016/vmware_vcp/VCP6-NV.png rename to images/2016/vmware_vcp/VCP6-NV.png diff --git a/content/images/2016/vpn/create_vpn_connection.png b/images/2016/vpn/create_vpn_connection.png similarity index 100% rename from content/images/2016/vpn/create_vpn_connection.png rename to images/2016/vpn/create_vpn_connection.png diff --git a/content/images/2016/vpn/customer_gateway.png b/images/2016/vpn/customer_gateway.png similarity index 100% rename from content/images/2016/vpn/customer_gateway.png rename to images/2016/vpn/customer_gateway.png diff --git a/content/images/2016/vpn/network_line.png b/images/2016/vpn/network_line.png similarity index 100% rename from content/images/2016/vpn/network_line.png rename to images/2016/vpn/network_line.png diff --git a/content/images/2016/vpn/template.png b/images/2016/vpn/template.png similarity index 100% rename from content/images/2016/vpn/template.png rename to images/2016/vpn/template.png diff --git a/content/images/2017/mesos/mesos_sandbox.png b/images/2017/mesos/mesos_sandbox.png similarity index 100% rename from content/images/2017/mesos/mesos_sandbox.png rename to images/2017/mesos/mesos_sandbox.png diff --git a/content/images/2017/openapi/structure_2.0_3.0.png b/images/2017/openapi/structure_2.0_3.0.png similarity index 100% rename from content/images/2017/openapi/structure_2.0_3.0.png rename to images/2017/openapi/structure_2.0_3.0.png diff --git a/index.html b/index.html new file mode 100644 index 00000000..95a6d392 --- /dev/null +++ b/index.html @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

CloudFormation Stackを安全に削除する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以前、CloudFormation の不満点 というのを書いたが、諦めて大半のCfnをterraformに移行した。
+その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。

+

概要

+

アイデアは簡単で以下の通り。

+
    +
  1. cfn の操作のみが許可されているIAM roleを作成する
  2. +
  3. 上記roleを指定して cfn stackをdeleteする
  4. +
+

モチベーション

+

そもそも以前の記事でも、予期せぬ手作業の …

+
+ + Continue reading + +
+
+
+
+
+

1Password CLIを使ってTOTPを取得する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, 1password +

+
+
+
+

2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。
+TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。
+ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。

+

1Password CLIの初期設定

+

1Password CLI を利用できるようにする。
+1Password CLIのGetting Startedを見て、初期設定 …

+
+ + Continue reading + +
+
+
+
+
+

Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった

+

+ Posted on Tue 12 February 2019 in blog + + • Tagged with + python, yaml +

+
+
+
+

資料

+ +

背景

+

とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。
+sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。

+
    +
  • コメントは消したくない
  • +
  • ブロックスタイルのままにしたい
  • +
  • diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)
  • +
+

ruamel.yaml

+

python で yaml を扱うときは …

+
+ + Continue reading + +
+
+
+
+
+

CloudFormation の不満点

+

+ Posted on Fri 25 January 2019 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。

+

要点

+
    +
  • CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない
  • +
  • Drift 検出は誤検出が多すぎて使いづらい
  • +
  • Change Set は動いている状態との差分を見ていないので、信用できない
  • +
+

経緯

+

CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。
+ただ、各サービ …

+
+ + Continue reading + +
+
+
+
+
+

DebianでLuaJITTeXを使いたい

+

+ Posted on Wed 31 October 2018 in blog + + • Tagged with + tex, debian +

+
+
+
+

そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。

+

参考

+ +

未解決の問題

+
    +
  • /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST が自動生成されている、とコメントされているが、元ファイルがわからない
  • +
+
### This file was automatically generated by update-fmtutil.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on …
+
+ + Continue reading + +
+
+
+
+
+

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + + • Tagged with + debian, snappy, zsh +

+
+
+
+

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バ …

+
+ + Continue reading + +
+
+
+
+
+

PyPIへパッケージをアップロードする

+

+ Posted on Thu 05 April 2018 in blog + + • Tagged with + pypi, python +

+
+
+
+

資料

+
    +
  • パッケージ構成については github.com/pypa/sampleproject
  • +
  • https://pypi.python.org/pypi/twine
  • +
  • https://packaging.python.org/tutorials/distributing-packages/
  • +
+

手順

+

PyPIへユーザー登録する

+

PyPI には普段使われている本番環境とは別に、テスト環境がある。
+アカウントがそれぞれ独立しているので、両方で作成する必要がある。

+ +

.pypirc の作成

+

以下のように ~/.pypirc を作成して、test 環境を利用できるようにしておく。
+平分でパスワードを書くことになる …

+
+ + Continue reading + +
+
+
+
+
+

Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ

+

+ Posted on Mon 05 February 2018 in blog + + • Tagged with + GCP, golang +

+
+
+
+

概要

+

Google Pub/SubGoのSDK から使おうとしていました。
+やっているといくつか詰まったので、メモしておきます。

+
    +
  1. サービスアカウントを利用するためにCredentials JSONを指定する
  2. +
  3. サブスクリプションの Pub/Sub サブスクライバー権限 を与えても Permission Denied になる
  4. +
+

サービスアカウントを利用するためにCredentials JSONを指定する

+

権限の都合上、サービスアカウントのCredentials JSONを利用して認証 …

+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + + • Tagged with + sakrua, ansible, terraform +

+
+
+
+
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果と …

+
+ + Continue reading + +
+
+
+
+
+

Mesos の sandbox のログローテーションをする

+

+ Posted on Fri 01 December 2017 in blog + + • Tagged with + mesos, docker +

+
+
+
+

結論

+
    +
  • http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger
  • +
  • LogrotateContainerLogger を使って、 module parameter を設定する
  • +
+

概要

+

Mesos + Marathon 環境でdockerを動かしている。
+基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。
+調べてみると、 /var/lib/mesos-slave/slaves/ 以下にあるフォルダのうち、sandbox のログが肥大化していた。
+sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosか …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index2.html b/index2.html new file mode 100644 index 00000000..2cd3fe11 --- /dev/null +++ b/index2.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

Ansible でバージョンチェックする

+

+ Posted on Fri 10 November 2017 in blog + + • Tagged with + ansible, debian +

+
+
+
+

やりたいこと

+

サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。
+- インストールされていなかったらインストール
+- あるバージョン未満だったらアップデート

+

pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。
+いい感じに playbook の中でバー …

+
+ + Continue reading + +
+
+
+
+
+

Travis CIで git submodule update --init --recursive を止める

+

+ Posted on Tue 17 October 2017 in blog + + • Tagged with + git, travis-ci +

+
+
+
+

結論

+ +
git:
+  submodule: false
+
+
    +
  • 個別に git submodule update --init hoge していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 $TRAVIS_BUILD_DIR を使えば良い。
  • +
+

経緯

+

久しぶりにこのブログを書いたらビルドに失敗していた。
+原因としては、このブログで利用している getpelican/pelican-plugins のsubmoduleの設定によって、
+取得で …

+
+ + Continue reading + +
+
+
+
+
+

Intel NUC 上に vSphere 6.5 のVSAN環境を作る

+

+ Posted on Fri 13 October 2017 in blog + + • Tagged with + vmware +

+
+
+
+

あまりVMwareを触らなくなってきて、何も見ずにvCenterの設定とかMaximum configurationsとか言えなくなってきたので、VMware周りのことをメモに残しておくことにする。
+ひとまず、自宅のVSAN環境の構築メモ。

+

環境

+

以下の構成のIntel NUC 3台にESXiをインストールして、その上にvCenterを立て、VSAN環境を作る。

+
+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + + • Tagged with + sakura, terraform, peco +

+
+
+
+

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example …
+
+ + Continue reading + +
+
+
+
+
+

自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ

+

+ Posted on Wed 08 February 2017 in blog + + • Tagged with + coreos, containerlinux +

+
+
+
+

構成

+

Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。

+

OSイメージ

+

VMware用のイメージを利用。
+/usr/share/oem/cloud-config.yml に vmware tools周りの設定が入っているので便利。

+

password の変更

+

grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。

+

初期設定: cloud-config

+

/var/lib/coreos-install/user_data を編集する。
+(作法を無視すれば、 /usr/share/oem/cloud-config.yml でも良いはず。)

+
#cloud-config
+coreos:
+  units:
+    - name: docker-tcp.socket
+      command …
+
+ + Continue reading + +
+
+
+
+
+

Rust を始めるための設定

+

+ Posted on Tue 07 February 2017 in blog + + • Tagged with + rust, vim +

+
+
+
+

rust のインストール

+

公式からインストールのためのスクリプトが提供されている。
+これを使うと、rustup というrustのマネージャが使えるようになって、
+rustc のバージョンアップや切替なんかができるらしい。

+
## rustup のインストール
+curl https://sh.rustup.rs -sSf | sh
+
+## これを .zshrc などに加える
+source ${HOME}/.cargo/env
+
+

rust のツールのインストール

+

cargo というので、いろんなライブラリとかツールをダウン …

+
+ + Continue reading + +
+
+
+
+
+

ニフティ株式会社を退職しました

+

+ Posted on Tue 31 January 2017 in blog + + +

+
+
+
+

本日最終出社日でした。

+

ニフティでやったこと

+

ニフティでは、ニフティクラウドのIaaSを中心に仕事をしていました。
+基本的にずっと @ysaotome さんの下で働いており、
+チームメンバーも優秀だったので、とても面白い環境でした。

+

本来は仮想ネットワークチームという名前だったのですが、割と何でもやるチームで、
+自身がやっていた仕事も、仮想ファイアウォー …

+
+ + Continue reading + +
+
+
+
+
+

チーム活動で失敗したことの振り返り

+

+ Posted on Thu 15 December 2016 in blog + + • Tagged with + teaming +

+
+
+
+
+

これは、 NIFTY Advent Calendar 2016 の15日目です。

+

@plan0213 さんの 『ネットワーク機器へのコマンド入力自動化』でした。
+ネットワークインフラエンジニアが大好きな話でしたね。

+

はじめに

+

今日の記事ですが、私が社内でやっていたチーム活動について振り返りを書きます。
+特に、失敗した点に注目して共有することで役に立てばと思っています。
+大前提としては、私は一般社員であ …

+
+ + Continue reading + +
+
+
+
+
+

git bisect でバグ/仕様変更のコミットを探す

+

+ Posted on Thu 10 November 2016 in blog + + • Tagged with + git, ansible +

+
+
+
+

まとめ

+
    +
  • git bisect が便利
  • +
  • ansible 2.1.0 -> 2.1.1 で group名に / を入れるとうまく動かないケースが存在する
      +
    • ansible リポジトリでbisect すると対象のコミットは 7287effb5ce241ce645d61e55e981edc73fa382a
    • +
    • group名には / を入れないように、 group_vars 以下はフラットな構成にしよう
    • +
    +
  • +
+

遭遇した問題

+

ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、
+複数のリージョンやゾーンにまたがるシステムのため、うまく設 …

+
+ + Continue reading + +
+
+
+
+
+

DockerHub で docker build のオプションを設定したい

+

+ Posted on Tue 27 September 2016 in blog + + • Tagged with + docker, dockerhub +

+
+
+
+

参考リポジトリ

+
    +
  • https://github.com/hitsumabushi/docker-phpipam
  • +
+

目的

+
    +
  • Dockerfile の中で、 ARGを使いたい。
      +
    • LABEL としてビルドした日付や、 VCSのリビジョンを入れたい
    • +
    • ソフトウェアのバージョンをARGで指定したい
    • +
    +
  • +
+

やること

+
    +
  1. Dockerfile と同じ場所に、 hook ディレクトリを作成する。
  2. +
  3. hook ディレクトリ以下に、 build というファイルを作成する。
      +
    • build には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。
    • +
    • 自分で docker build …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index3.html b/index3.html new file mode 100644 index 00000000..d3f33be9 --- /dev/null +++ b/index3.html @@ -0,0 +1,509 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

GnuPGのメモ @ Debian Sid

+

+ Posted on Tue 12 July 2016 in blog + + • Tagged with + gpg, debian +

+
+
+
+

Debain での GnuPG

+

GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。
+Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。
+普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。
+以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思っ …

+
+ + Continue reading + +
+
+
+
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+
+
+
+

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + + • Tagged with + debian, apt, s3 +

+
+
+
+

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバ …
+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読 …

+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系 …

+
+ + Continue reading + +
+
+
+
+
+

会社にslack入ったので、色々やってた

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + slack, hubot +

+
+
+
+

勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。

+

現在のチャンネル構成

+
    +
  • 定常系
      +
    • 分報用のチャンネル。個々人が作る
    • +
    • 部署用
    • +
    • チーム用
    • +
    • プロジェクト用
    • +
    +
  • +
  • 雑多な情報共有用
      +
    • ニュース用
    • +
    +
  • +
  • トラブル用
  • +
  • その他
      +
    • 臨時に必要になるとか
    • +
    • テストとか
    • +
    +
  • +
+

やったことメモ

+

RSS を Slack に移行

+

live dwango reader をずっと使っていたのだけど、更新頻度が …

+
+ + Continue reading + +
+
+
+
+
+

Anisble for Windows

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + ansible, windows +

+
+
+
+

久しぶりに ansible で windows を操作するので、メモ。
+実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。
+ansibleは2.1.0を使っている。

+

やること

+

以下を anisble で実行する。

+
    +
  1. Windows Update
  2. +
  3. Windows Server 2012 R2 に AD をインストール
  4. +
  5. ADに適当なダミーエントリを突っ込む
  6. +
+

初期設定

+

ansible 実行サーバーの準備

+

winrm経由で実行することになるので、 pywinrm が必要。

+
# pip install ansible pywinrm
+
+

Inventory

+
[windows_server …
+
+ + Continue reading + +
+
+
+
+
+

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + + • Tagged with + vyos, YAMAHA, NIFTY +

+
+
+
+

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index4.html b/index4.html new file mode 100644 index 00000000..7441ebcc --- /dev/null +++ b/index4.html @@ -0,0 +1,471 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

久しぶりにGitHub Pagesのjekyll触ったので、メモ

+

+ Posted on Fri 25 March 2016 in blog + + • Tagged with + jekyll, github +

+
+
+
+

このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、
+昔とだいぶ状況も変わっていそうだったので、メモをしておく。

+

gem

+

とりあえず、Gemfileを用意して、以下の2行を書く

+
source 'https://rubygems.org'
+gem 'github-pages'
+
+

全体的なconfig

+

GFMを使う

+

ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、_config.ymlに以下を追加しておいた方が良さそう。

+
markdown: kramdown
+kramdown:
+  input: GFM
+
+

related post …

+
+ + Continue reading + +
+
+
+
+
+

Travis コマンドでのエラー

+

+ Posted on Sat 02 January 2016 in blog + + • Tagged with + travis +

+
+
+
+

Travis CIでCIする素振りをしていたら、最新版のtravisコマンドでエラーが出るようになった。

+

発生した問題

+
$ travis setup releases
+Invalid scheme format: git@github.com
+for a full error report, run travis report
+
+

問題の解析

+

こういう時には、

+
$ travis report
+
+

をして、スタックトレースを見るものらしい。

+
$ travis report
+System
+Ruby:                     Ruby 2.3.0-p0
+Operating System:         Mac OS X 10.11.2
+RubyGems:                 RubyGems 2.5.1
+
+CLI
+Version:                  1.8.0
+Plugins:                  none
+Auto-Completion:          yes
+Last Version Check:       2016-01-02 14:54:05 +0900
+
+Session
+API Endpoint:             https://api.travis-ci.org/
+Logged In:                as "<username>"
+Verify SSL:               yes
+Enterprise:               no
+
+Endpoints
+org …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 6.0 でのHA機能のエンハンスの要点

+

+ Posted on Tue 08 December 2015 in blog + + • Tagged with + VMware, vSphere +

+
+
+
+

まとめ

+
    +
  1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。
  2. +
  3. vCenterは watchdogs によりプロセス落下時には再起動される
  4. +
  5. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある
  6. +
+

資料

+
    +
  1. VMware vSphere 6 のドキュメント
    +
  2. +
  3. http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf
  4. +
  5. vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)
  6. +
+

vSphere 5.5 までの …

+
+ + Continue reading + +
+
+
+
+
+

最近の仕事の振り返り

+

+ Posted on Sat 31 October 2015 in blog + + +

+
+
+

最近、仕事のやり方について考えている(悩んでいるに近いかも)ことが多いので、
+頭の中を整理するために、文章にしてみようと思う。

+

なので、技術的な内容は一切ない。

+ +

目次

+
    +
  1. スケジュール調整と突発案件
  2. +
  3. エンジニアの成長パス
  4. +
  5. 愚痴とポエム
  6. +
+

スケジュール調整と突発案件

+

前置き

+

どんな仕事にも突発的な仕事は大なり小なりあると思う。
+自分としては精神 …

+
+ + Continue reading + +
+
+
+
+
+

Dockerの細々としたメモ

+

+ Posted on Tue 15 September 2015 in blog + + • Tagged with + docker, debian +

+
+
+

Debian で利用する際のメモを書いておく。

+ +

grub でのカーネルパラメータ

+
    +
  1. systemd を利用する設定
  2. +
  3. cgroups で、メモリに制限をかけるための設定
  4. +
+
# quiet はあってもなくても良い
+GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

cgroups まわり

+

cgroups のディレクトリ配下に設定がある

+
/sys/fs/cgroup/cpu,cpuacct/docker/
+
+

network

+

参考: Dockerのネットワーク管理とnetnsの関係

+

docker コンテナを1つ立ち上げるごとに、vethデバイスができる …

+
+ + Continue reading + +
+
+
+ +
+
+

Twitterからメールアドレス拾えるんじゃね?的な攻撃について

+

+ Posted on Fri 26 June 2015 in blog + + • Tagged with + security +

+
+
+

任意のTwitterアカウントの登録メールアドレス(伏せ字含)を表示させる攻撃が急増中(対策設定有り) というエントリが盛り上がっていたらしい。(とてもシェアされている)
+ただ、自分には有用な攻撃シナリオには見えなかったので、考えを整理するために書いておきます。
+自分はセキュリティ素人なので、間違った考察かもしれません。

+ +

リンク先ブログの主張 …

+
+ + Continue reading + +
+
+
+
+
+

runCをDebianで実行する

+

+ Posted on Tue 23 June 2015 in blog + + • Tagged with + runc, debian +

+
+
+

opencontainers/runc を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。

+ +

runCのインストール

+

golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。

+
git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc
+cd $GOPATH/src/github.com/opencontainers/runc/
+make
+sudo make install
+
+

状況

+

ディレクトリ構成

+
.
+├── container.json (とりあえず、runc spec で生成されるもので …
+
+ + Continue reading + +
+
+
+
+
+

Windowsの勉強を始めた

+

+ Posted on Mon 15 June 2015 in blog + + • Tagged with + Windows +

+
+
+

人生で初めて、Windowsの勉強を始めた。
+進捗は以下のgithub pagesから確認できる。
+とりあえず、章立てを書いて、内容を徐々に埋めているところ。

+ +

内容の誤りやコメントなどあれば、githubのissueで欲しい。

+
+
+
+
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index5.html b/index5.html new file mode 100644 index 00000000..4f875869 --- /dev/null +++ b/index5.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

WindowsをAnsibleで設定する

+

+ Posted on Thu 28 May 2015 in blog + + • Tagged with + Windows, ansible +

+
+
+
+

資料

+

Windows Support — Ansible Documentation

+

マシンの準備

+

ansibleコマンドを実行するマシン

+

ansibleがすでに実行できる状況であれば、

+
pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm
+pip install kerberos # AD accountを使う場合
+
+

とすればOK。

+

Windowsマシン

+

要件

+
    +
  1. WinRM がインストール済み
  2. +
  3. PowerShell version > 3.0
  4. +
  5. 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる
  6. +
  7. Windows Server 2012ははじめからPowershell 4.0がインストールされている
  8. +
+

セットアップ方法

+
    +
  1. Powershell 3.0にアップデートが必要な場合 …
+
+ + Continue reading + +
+
+
+
+
+

Ravelloが便利

+

+ Posted on Sat 09 May 2015 in blog + + • Tagged with + ravello, VMware +

+
+
+
+

VMware環境のテストをしたい

+

会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。
+今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。
+あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、という …

+
+ + Continue reading + +
+
+
+
+
+

Xmonadの設定

+

+ Posted on Sun 05 April 2015 in blog + + • Tagged with + debian, xmonad +

+
+
+
+

資料

+
    +
  1. http://xmonad.org/documentation.html
  2. +
  3. Archlinux Wiki - Xmonad
  4. +
  5. Xmonad/Config archive/John Goerzen's Configuration
  6. +
  7. Xmonadの設定 1/3 「基本」編 - ナレッジエース
  8. +
+

環境

+

Debian Sid & Xfce4

+

Install and Initial Configure

+

Package install

+
# basic packages
+sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev
+# for adding launcher
+sudo apt-get install dmenu
+# for status bar
+sudo apt-get install xmobar
+# tools
+sudo apt-get install suckless-tools scrot tilda trayer
+
+

Xsession

+
    +
  1. +

    add /usr/share/xsessions/custom.desktop

    +
    [Desktop Entry]
    +Name=Xsession
    +Exec=/etc/X11/Xsession
    +
    +
  2. +
  3. +

    ${HOME}/.xsession

    +
    xmodmap ~/.Xmodmap
    +exec xmonad
    +
    +
  4. +
+

Edit config

+
import XMonad
+
+main = do
+xmonad $ defaultConfig
+
+

Set xmonad as the default window manager

+
$ sudo update-alternatives --config x-window-manager
+
+

デフォルトのキーボードショートカットは、man xmonadで見ることができる。
+とりあえず、Alt + Shift …

+
+ + Continue reading + +
+
+
+
+
+

Hatena Engineer Seminar #4に行ってきました

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + 勉強会 +

+
+
+
+

Intro

+

タイトルどおり、行ってきました。
+目当ては、mackerelの話だったんですが、思ったより他の話も面白かったです。
+今回は抽選だったし、参加できなかった人のためにも、メモと感想を書いておきます。
+序盤の話はTwitterでつぶやいているので、参考までに。(後半はPCの電源が死んだのでないです)

+

資料は見つけたら追加します。

+

開会の挨拶

+

はてなの東京オフィスが増床 …

+
+ + Continue reading + +
+
+
+
+
+

fioを使ったベンチマーク

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + fio, benchmark +

+
+
+
+

Intro

+

ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。
+今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。
+ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。

+

オプション

+

オプションの与え方

+

以下の2つが使える。

+
    +
  • コマンドラインオプション …
+
+ + Continue reading + +
+
+
+
+
+

Easter Egg Collections

+

+ Posted on Sat 07 February 2015 in blog + + • Tagged with + 遊び +

+
+
+

イースターエッグは、見つかるとよく話題に上がっているけど、
+実際にどんなものがあるのか、よく知らないなー、と思ったので集めようと思う。
+ただ、調べてみると、昔あったものがなくなってたりして、このリストも最新状態に保つ必要があるので、なくなってたら教えてほしいです。

+

とりあえずは、いろいろ見つけるたびに徐々に更新していきたいと思い …

+
+ + Continue reading + +
+
+
+
+
+

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + + • Tagged with + Algorithm, papers, 論文 +

+
+
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノー …
+
+ + Continue reading + +
+
+
+
+
+

CROSS 2015のアンカンファレンスで話しました

+

+ Posted on Sat 31 January 2015 in blog + + • Tagged with + 勉強会, 脆弱性 +

+
+
+

CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。
+スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。
+たぶんプレゼン作成時間30分くらい。

+ + +

書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。
+自分自身は何か情報系の教育を受 …

+
+ + Continue reading + +
+
+
+
+
+

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + + • Tagged with + CROSS, 勉強会, 運営 +

+
+
+
+

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋 …

+
+ + Continue reading + +
+
+
+
+
+

Dockerのプロキシ設定

+

+ Posted on Thu 29 January 2015 in blog + + • Tagged with + Docker, Debian +

+
+
+

自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。
+bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、
+あらためて考えると解決できた。

+

結論は、dockerのデーモンが起動すると …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index6.html b/index6.html new file mode 100644 index 00000000..43cbcb8c --- /dev/null +++ b/index6.html @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

DNS サーバーの比較資料集め

+

+ Posted on Mon 26 January 2015 in blog + + • Tagged with + DNS, Debian +

+
+
+

自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。
+DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。
+以下に、参考ページを列挙する。

+ +

参考になるページ

+

権威サーバ

+ +

キャッシュサーバ

+
+
+ + Continue reading + +
+
+
+
+
+

vShere Beta Program の注意点

+

+ Posted on Sun 25 January 2015 in blog + + • Tagged with + VMware +

+
+
+

VMware のBetaプログラムの利用について、基本的なルールがあるので、忘れないようにまとめた。
+ここに書いてあることは、オレオレ要約なので、きちんと自分で確認してください。

+

ざっくり言うと、「ここで知ったことは他で話すなよ」ってことでした。

+ +

資料

+ +

利用方法

+

上記ページから"Join Now!"して、規約に同意すれば良い。
+規約は以下の2つあるので、それぞれ同意 …

+
+ + Continue reading + +
+
+
+
+
+

VCP5-DCV取得した

+

+ Posted on Fri 16 January 2015 in blog + + • Tagged with + VMware, VCP +

+
+
+

最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。
+VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。

+ +

VCPトレーニングと試験内容のギャップ

+

トレーニングを受講しても、おそらく言われると思いますが、
+VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたこと …

+
+ + Continue reading + +
+
+
+
+
+

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + + • Tagged with + VMware, VCP, vDS +

+
+
+
+

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バイン …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+
+
+
+

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, VDP +

+
+
+
+

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる …
+
+ + Continue reading + +
+
+
+
+
+

ESXiをkickstartでインストールする

+

+ Posted on Tue 06 January 2015 in blog + + • Tagged with + VMware, ESXi +

+
+
+

ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。

+ +

利用OS

+
    +
  • ESXi 5.5
  • +
  • Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる)
  • +
+

DHCP, TFTP, HTTPサーバーの準備

+

必要なソフトウェアのインストール

+
apt-get install tftpd-hpa isc-dhcp-server xinetd apache2
+
+

DHCPサーバーの設定

+

BOOTPでインストールするため、あまり自由度がない。

+
+ +
+
+ + Continue reading + +
+
+
+
+
+

vCloud Airの価格感を調べる

+

+ Posted on Mon 05 January 2015 in blog + + • Tagged with + VMware, クラウド +

+
+
+
+

資料

+ +

vCloud Airとは

+

VMwareが提供している、ハイブリッドクラウドのサービス。

+

特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、
+vSphere Clientのプラグインと統合して操作ができることが挙げられる。

+

日本では、ソフトバンクと提携しているようだ

+

vCloud Air の価格感を調べる

+

大前提として、一般的なクラウドサービスと …

+
+ + Continue reading + +
+
+
+
+
+

2014年のまとめをしておかねば

+

+ Posted on Wed 31 December 2014 in blog + + • Tagged with + KPT +

+
+
+

今年1年は反省の多い年だったので、きちんと書いて残しておく。

+ +

2014年面白かった技術、触りたかったソフトウェア

+

新たに導入したもの

+
    +
  1. Ansible
  2. +
  3. Ceph
  4. +
  5. Pelican(このブログを生成してるやつ)
  6. +
  7. Flask
  8. +
+

ちょっとしか触れず...

+
    +
  1. VyOS
  2. +
  3. Consul
  4. +
  5. Fluentd
  6. +
  7. Golang
  8. +
  9. Docker
  10. +
  11. CoreOS
  12. +
  13. Hashicorpのツールその他
  14. +
  15. Hadoop
  16. +
+

触りたかったけど、触らず

+
    +
  1. Strom
  2. +
  3. Rust
  4. +
+

2014年のトピックス

+

思い返すと1月のこととかは何年も前に感じるが、今年は割と色々あっ …

+
+ + Continue reading + +
+
+
+
+
+

VCPの学習中のメモ

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VCP, VMware +

+
+
+

項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。
+特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。

+ +

VMware Data Recovery

+

資料

+ +

概要

+

デプロイ

+

OVF形式で提供されているので、OVF deployします。

+

動作

+

VMware vStorage API for Data Protectionを使って、バックアップを …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index7.html b/index7.html new file mode 100644 index 00000000..97bfd648 --- /dev/null +++ b/index7.html @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+ +
+
+
+
+

VCP-DCVの概要 : VCP550

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

資料

+

VCP-Data Center Virtualization
+受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。

+

VCP-DCVの概要

+

バージョン

+

VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。
+例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。

+

さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバ …

+
+ + Continue reading + +
+
+
+
+
+

fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編)

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + Ruby, Fluentd +

+
+
+

本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。
+ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。

+ +

基本情報

+
    +
  1. +

    lib/fluent/plugin/{TYPE}_{NAME}.rb 以下がプラグインの本体。

    +
      +
    • TYPE : in, out, buf,... etc
    • +
    • NAME : プラグインの名前
    • +
    +
  2. +
  3. +

    pluginを書く時のお約束

    +
      +
    • Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する
    • +
    • 設 …
+
+ + Continue reading + +
+
+
+
+
+

VMware 環境でのMACアドレス割当て

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

1. まとめ

+

vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、

+
    +
  1. vCenter環境でプレフィックス指定
  2. +
  3. 固定割当て
  4. +
+

といった方法を使いましょう

+

2. MACアドレスの割当て方式

+
    +
  1. vCenterによる自動割当て
      +
    1. VMware OUI
    2. +
    3. プレフィックスベース
    4. +
    5. 範囲ベース
    6. +
    +
  2. +
  3. vCenterに接続されていないESXiによる自動割当て
  4. +
  5. 手動での割当て
  6. +
+

vCenterによる自動割当て

+

設定の …

+
+ + Continue reading + +
+
+
+
+
+

ソースコードリーディングをするときにctagsを使いたい

+

+ Posted on Tue 16 December 2014 in blog + + • Tagged with + Emacs, Ruby +

+
+
+

きっかけ

+

とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。
+でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。
+そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、
+ぱっと見でわからず、いちいち時 …

+
+ + Continue reading + +
+
+
+
+
+

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + + • Tagged with + CI, drone.io, pelican +

+
+
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分が …

+
+ + Continue reading + +
+
+
+
+
+

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + + • Tagged with + consul, provisioning, cluster +

+
+
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス …
+
+ + Continue reading + +
+
+
+
+
+

vSphere API事始め

+

+ Posted on Thu 14 August 2014 in blog + + • Tagged with + VMware +

+
+
+

リファレンス

+
    +
  • https://www.vmware.com/support/developer/vc-sdk/
  • +
  • https:// "vcenter_ip" /mob/
  • +
+

参考サイト

+
    +
  • http://thinkit.co.jp/story/2010/06/23/1617
  • +
+

Overview

+

Types

+

4つのタイプがある。

+ + + + + + + + + + + + + + + + + + + + + + + + + +
vSphere APIの型普通のプログラミングとの類推
managed object typeプリミティブ型、複合型
data object type抽象データ型
enumerated type定数
Fault type例外型
+

1. Managed object types

+

Managed object typeとは

+

(サーバーサイドのオブジェクトモデルの基本的なデータを担っている。data objectも同じく。)
+managed objectには、大きく2つの種類が …

+
+ + Continue reading + +
+
+
+
+
+

IPv6のことを調べ始めた

+

+ Posted on Tue 12 August 2014 in blog + + • Tagged with + IPv6 +

+
+
+

IPv6 環境構築

+

ひとまず参照すべきRFC

+
    +
  • RFC3315(DHCPv6) とそれをupdateしているやつ
  • +
  • RFC4861(Neighbor DiscoveryのIPv6バージョン)
  • +
  • RFC5942(IPv6のsubnet model)
  • +
+

IPv6 アドレス配布方式について

+

全体としては、下記の4パターンある。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
アドレス配布方式RAは必要?RAにプレフィックス情報は必要?m-flago-flag配布できるもの
手動xx---
ステートレスアドレス自動設定(SLAAC)oooffoffプレフィックスのみ
ステートフルDHCPv6oo(たぶ …
+
+ + Continue reading + +
+
+
+
+
+

DebianにOzをインストールする

+

+ Posted on Sun 27 July 2014 in blog + + • Tagged with + Debian, CTMCP +

+
+
+

ガウディ本読みはじめた。

+ + +

困ったこと

+

この本で使われるOzという言語をDebian上で実行するのに、少し困った。
+morzart2をダウンロードして、適当にインストールしただけだと、
+emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。
+正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。

+

このために、必要なパッケージが …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index8.html b/index8.html new file mode 100644 index 00000000..7d60b1f1 --- /dev/null +++ b/index8.html @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

[論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads

+

+ Posted on Thu 17 July 2014 in blog + + • Tagged with + Paper +

+
+
+
+

読んだもの

+

http://research.google.com/pubs/pub41179.html

+

主な内容

+
    +
  • 『2種類の異なるストレージ(フラッシュとディスク)を複数のワークロードで共用する』効率的な使い方を最適化問題への帰着
    + 使い方に2つの戦略があって、『FIFO or LRU』。
  • +
  • LRUの方がキャッシュヒットレート的には良いけど、メトリクスを取るのが複雑になりがちなので、FIFOで良いのでは。
  • +
  • 実システムでの計測結果
  • +
+

使われて …

+
+ + Continue reading + +
+
+
+
+
+

DebianでZNCを使って、快適なIRC生活を送る

+

+ Posted on Mon 09 June 2014 in blog + + • Tagged with + Debian +

+
+
+

やりたいこと

+

最近、自分の興味のあるソフトウェアのIRCによく引きこもっています。
+自宅のPCはつけっぱなしにしておけば、全部のログを見れるのですが、
+会社やスマホで見るときには、接続している間のことしか確認できず、若干もどかしいです。

+

そういうわけで、ZNCサーバーを立てて、IRCのログを出先からでも確認できるようにしましょう。

+

実現するこ …

+
+ + Continue reading + +
+
+
+
+
+

WebHDFSで詰まったこと

+

+ Posted on Sun 08 June 2014 in blog + + • Tagged with + Hadoop, WebHDFS +

+
+
+

困っていたこと

+

HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。
+ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。
+しかし、実際にやっているとうまくいかないケースがあった。

+
% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open"
+HTTP/1.1 307 TEMPORARY_REDIRECT …
+
+ + Continue reading + +
+
+
+
+
+

LEDバックライトの調整

+

+ Posted on Mon 02 June 2014 in blog + + • Tagged with + Debian, Linux +

+
+
+

ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。
+GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。

+

環境

+
    +
  • PC: ASUS 24A
  • +
  • OS: Linux(Debian sid amd64)
  • +
+

調整可能な範囲

+
  cat /sys/class/backlight/intel_backlight/max_brightness
+
+ +

ディスプレイの明るさ変更

+
  # 明るさを800にするとき
+  echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness
+
+
+
+
+
+
+

Perl の正規表現

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

マッチ演算子

+

評価の結果は真偽値としては、マッチすれば真、そうでなければ偽。 +and, or, ! が役立つのは間違いない。

+
+

$_ にマッチさせる

+
/regex/
+m:regex:
+
+
+
+

string にマッチさせる

+
string =~ /regex/
+string =~ m:regex:
+
+
+
+

$_ の文字列置換

+
s/regex/new/
+s:regex:new:
+
+
+
+

string の文字列置換

+
string =~ s/regex/new/
+string =~ s:regex:new:
+
+
+
+
+

特殊なメタキャラクタ

+
+

^, $

+
    +
  • 行頭、末尾にマッチ
  • +
+
+
+

.

+
    +
  • ニューライン以外の任意の文字にマッチ
  • +
+
+
+

[chars]

+
    +
  • chars に含まれる任意の1文字にマッチ …
+
+ + Continue reading + +
+
+
+
+
+

Perlスクリプトメモ

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考文献

+
    +
  1. Perl基礎文法最速マスター
  2. +
  3. ミニマル perl
  4. +
+
+
+

スクリプトを書く時

+
    +
  • プラグマ +
  • +
  • 推奨 : スクリプト先頭に書く
  • +
+
use strict;
+use warnings;
+
+
    +
  • 1文字でも減らしたい

    +
    +
      +
    • print のデフォルト引数は、 $_
    • +
    • print $_; したいだけなら書く必要ない。
    • +
    +
    +
  • +
+
+
+

用語

+
+

レコード

+
    +
  • 1つのまとまりとして読み書きされる文字の集合
  • +
  • 入出力の際、ファイルはレコードの集まりと見ることができる。 +この時、デフォルトでは …
+
+ + Continue reading + +
+
+
+
+
+

VPLSについてのメモ

+

+ Posted on Mon 06 January 2014 in blog + + • Tagged with + vpls +

+
+
+
+

What is VPLS

+
    +
  • Virtual Private LAN
  • +
  • MACフレームを、ルーターを含むネットワークを超えて、やり取りするための技術の1つ
  • +
  • +
    MPLSはIPにラベルをつけるが、VPLSはMACにラベルをつけるというイメージ
    +
      +
    • ラベルを使う理由としては、元々、経路計算を高速にしたかったはずだけど、今はそんなに気にしなくて良いっぽい
    • +
    +
    +
    +
  • +
+
+
+

Why VPLS

+

MPLSが便利なのと、同じ。

+
    +
  • VPN
  • +
  • +
    TE(Trafic Engineering)
    +
      +
    • 明示的な経路選択
    • +
    • 回線使用率か …
+
+ + Continue reading + +
+
+
+
+
+

便利なツール

+

+ Posted on Thu 02 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

POD

+
    +
  • Plain Old Documentation
  • +
  • man perldoc を参照
  • +
+
+
+

lwp-request

+
    +
  • Webサーバーにリクエストを送って、適当な形式に変換してくれる
  • +
  • GET, POST, PUT も選べる。
  • +
  • 出力形式としては、 text, ps, links, html, dump
  • +
+
lwp-request -o text www.example.com
+
+
+
+

Text::Autoformat

+
+
+

Text::Tabs

+
    +
  • タブをスペースに変換
  • +
+
+
+

String::Approx

+
    +
  • あいまいなマッチをする
  • +
+
+
+

Template-Toolkit

+
+
+

Lingua::En::Inflect 'PL_N'

+
    +
  • 単数形と複数形を変換してくれる
  • +
+
+
+
+
+
+
+
+

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + pxe, preseed, kickstart +

+
+
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立 …
+
+ + Continue reading + +
+
+
+
+
+

実UID, 実行UID

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + linux +

+
+
+

プロセスはいくつかのIDを持っている。 +あまり深く考えず、実UIDと実行UIDについて考える。

+
+

実UID(UID)

+
    +
  • 呼び出し元のプロセス(親プロセス)の実ユーザーID。
  • +
  • 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。
  • +
+
+
+

実効UID

+
    +
  • 呼び出し元のプロセス(親プロセス)の実効ユーザーID …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index9.html b/index9.html new file mode 100644 index 00000000..cf663f9c --- /dev/null +++ b/index9.html @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい + + + + +
+ + + + + +
+
+

DNS サーバー

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + dns +

+
+
+

ニフティクラウド上でサーバーを立てた。 +いろいろと設定していこうかと思っているが、まずはDNSから始める。

+
+

作業内容

+

1. /etc/bind/named.conf.options +以下のように書き換える:

+
+// v6の設定: v6は応答しない
+// listen-on-v6 { any; };
+listen-on-v6 { none; };
+
+// transfer を許すIPを制限
+allow-transfer "192.168.100.1";
+
+

2. /etc/bind/named.conf.local +ゾーンの設定:

+
+zone "example.com" {
+   type master;
+   file "example.db";
+};
+zone "100.168.192.in-addr.arpa" {
+   type master;
+   file "192.rev"
+};
+
+
+
+
+
+
+
+
+

Perl のコンパイラオプション

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考ページ

+ +
+
+

基本的なオプション

+
+

-e

+
    +
  • ワンライナーを書くために必須。
  • +
  • 複数並べられるので、それなりに色々書ける
  • +
  • 直後にperlプログラムを書ける。
  • +
+
perl -e 'print 11/2'
+
+
+
+

-l[8進数]

+
    +
  • 行末に指定された8進数に変える。-l のみの場合、改行になる。
  • +
+
perl -e 'print 22'       #=> 22
+perl -l -e 'print 22'    #=> 22\n
+perl -l101 -e 'print 22' #=> 22A
+
+
+
+

-0[digits]

+
    +
  • -l の入力セパレータバージョン

    +
  • +
  • -00 とすれば、空行を区切 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/pelicanconf.py b/pelicanconf.py deleted file mode 100644 index b86f4954..00000000 --- a/pelicanconf.py +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- # -from __future__ import unicode_literals - -AUTHOR = 'hitsumabushi' -SITENAME = 'ひつまぶし食べたい' -SITEURL = 'https://www.hitsumabushi.org' -SITESUBTITLE = 'メモ代わりのブログ' - -THEME = 'themes/Flex' -PATH = 'content' - -# TIMEZONE -TIMEZONE = 'Asia/Tokyo' -DEFAULT_LANG = 'ja' - -# Setting article URLs -ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{date:%d}/{date:%H%M}.html' -ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{date:%d}/{date:%H%M}.html' -# Default Settings -DEFAULT_CATEGORY = 'blog' - -# Custom CSS -CUSTOM_CSS = 'static/custom.css' - -# Top page summary -DISPLAY_ARTICLE_INFO_ON_INDEX = True -SUMMARY_MAX_LENGTH = 150 -DEFAULT_PAGINATION = 10 - -# Feed generation is usually not desired when developing -FEED_MAX_ITEMS = 10 -FEED_ALL_ATOM = 'feeds/all.atom.xml' -CATEGORY_FEED_ATOM = None -TRANSLATION_FEED_ATOM = None -AUTHOR_FEED_ATOM = None -AUTHOR_FEED_RSS = None - -# Social widget -SOCIAL = ( - ('twitter', 'https://twitter.com/_hitsumabushi_'), - ('github', 'https://github.com/hitsumabushi'), - ('rss', 'feeds/all.atom.xml'), - ) - -# もう古いのはいいか、ということで削除 -#LINKS = ( -# ('Old blog', 'https://hitsumabushi-pc.blogspot.com/'), -# ) - -# Uncomment following line if you want document-relative URLs when developing -#RELATIVE_URLS = True - -# These are optional settings -STATIC_PATHS = [ - 'images', 'extra/robots.txt', 'extra/favicon.ico', - 'extra/CNAME', 'extra/icon.jpg', 'extra/profile.jpg','extra/custom.css', - 'extra/my.js', - 'extra/_well-known' - ] -EXTRA_PATH_METADATA = { - 'extra/robots.txt': {'path': 'robots.txt'}, - 'extra/favicon.ico': {'path': 'static/favicon.ico'}, - 'extra/CNAME': {'path': 'CNAME'}, - 'extra/icon.jpg': {'path': 'static/icon.jpg'}, - 'extra/profile.jpg': {'path': 'static/profile.jpg'}, - 'extra/custom.css': {'path': 'static/custom.css'}, - 'extra/my.js': {'path': 'static/js/my.js'}, - 'extra/_well-known/nostr.json': {'path': '.well-known/nostr.json'} -} -FAVICON = '/static/favicon.ico' - -# For Adding search and sitemap -DIRECT_TEMPLATES = ('index', 'tags', 'categories', 'archives', 'search', 'sitemap') -SITEMAP_SAVE_AS = 'sitemap.xml' - -# Extentions -# See https://www.ainoniwa.net/pelican/2020/0830a.html -# See https://qiita.com/5t111111/items/d745af778969bf00f038 -MARKDOWN = { - 'extension_configs': { - 'markdown.extensions.codehilite': {'css_class': 'highlight'}, - 'markdown.extensions.extra': {}, - 'markdown.extensions.meta': {}, - 'markdown.extensions.fenced_code': {}, - 'markdown.extensions.nl2br': {}, - 'markdown.extensions.tables': {}, - 'markdown.extensions.admonition': {}, - #'mdx_linkify.mdx_linkify': {}, - #'markdown.extensions.toc': {}, - 'toc': {}, # use extract_toc - }, - 'output_format': 'html5', -} - -# Plugins -PLUGIN_PATHS = ['plugins/pelican-plugins'] -PLUGINS = [ - 'sitemap', - 'related_posts', - 'render_math', - 'tipue_search', - 'neighbors', - 'pelican_gist', - 'extract_toc', - ] - - -# Plugin Settings -## sitemap -SITEMAP = { - 'format': 'xml', - 'priorities': { - 'articles': 0.8, - 'indexes': 1.0, - 'pages': 1.0 - }, - 'changefreqs': { - 'articles': 'daily', - 'indexes': 'daily', - 'pages': 'weekly' - } -} -## related_posts -RELATED_POSTS_MAX = 5 - -#--- -# Flex Theme settings -#--- -COPYRIGHT_NAME = AUTHOR -COPYRIGHT_YEAR = 2021 -# 上部のメニュー表示 -MAIN_MENU = True -MENUITEMS = ( - ("Archives", "/archives.html"), -) -# アイコン画像 -SITELOGO = "/static/profile.jpg" -# コードハイライト指定 -PYGMENTS_STYLE = "monokai" -# Analytics -GOOGLE_GLOBAL_SITE_TAG = 'G-JPYFS3RY30' # Your Google Analytics 4 Property ID -CC_LICENSE = { - "name": "Creative Commons Attribution-ShareAlike", - "version": "4.0", - "slug": "by-nc", - "language": "ja" -} diff --git a/plugins/pelican-plugins b/plugins/pelican-plugins deleted file mode 160000 index 5c3b2774..00000000 --- a/plugins/pelican-plugins +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5c3b2774191244918eb9930830f54523ca8c0dc5 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c2fc2ed0..00000000 --- a/requirements.txt +++ /dev/null @@ -1,28 +0,0 @@ -beautifulsoup4==4.10.0 -blinker==1.4 -certifi==2023.7.22 -charset-normalizer==2.0.6 -colorama==0.4.4 -commonmark==0.9.1 -cssutils==2.3.0 -docutils==0.17.1 -feedgenerator==2.0.0 -idna==3.2 -Jinja2==3.1.3 -Markdown==3.3.4 -MarkupSafe==2.0.1 -pelican==4.7.0 -pelican-gist==0.3.4 -Pillow==10.0.1 -Pygments==2.15.0 -pysvg-py3==0.2.2.post3 -python-dateutil==2.8.2 -pytz==2021.3 -requests==2.31.0 -rich==10.12.0 -six==1.16.0 -smartypants==2.0.1 -soupsieve==2.2.1 -typogrify==2.0.7 -Unidecode==1.3.2 -urllib3==1.26.18 diff --git a/content/extra/robots.txt b/robots.txt similarity index 100% rename from content/extra/robots.txt rename to robots.txt diff --git a/script/deploy.sh b/script/deploy.sh deleted file mode 100755 index 03fa30c3..00000000 --- a/script/deploy.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -set -e - -# build html -make clean -make html || exit 1 - -# git config -git config user.email "action@github.com" -git config user.name "GitHub Actions" - -# checkout branch -git checkout -b gh-pages - -# copy output to top of repository -cp -r output/* . && cp -r output/.* . || true - -# Remove unpublish files -rm -rf content \ - output \ - script \ - plugins \ - themes \ - __pycache__ \ - cache - -rm -f *.py \ - Makefile \ - requirements.txt \ - .gitmodules \ - .travis.yml - -# Git push -git add -A . -git commit -m "Build by GitHub Actions" -git push -fq origin gh-pages - -# For cloudflare : purge caches of all -# For cloudflare : purge caches of index.html -curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/purge_cache" \ - -H "X-Auth-Email: ${CLOUDFLARE_AUTH_EMAIL}" \ - -H "X-Auth-Key: ${CLOUDFLARE_AUTH_KEY}" \ - -H "Content-Type: application/json" \ - --data '{"purge_everything":true}' > /dev/null 2>&1 diff --git a/search.html b/search.html new file mode 100644 index 00000000..c46f83d3 --- /dev/null +++ b/search.html @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたいSearch - ひつまぶし食べたい + + + + +
+ + + +
+
+

Search Results

+
+
+
+ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..cc97bec2 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,1287 @@ + + + + +https://www.hitsumabushi.org/ +2024-01-16T01:53:09-00:00 +daily +1.0 + + + +https://www.hitsumabushi.org/tags.html +2024-01-16T01:53:09-00:00 +daily +1.0 + + + +https://www.hitsumabushi.org/categories.html +2024-01-16T01:53:09-00:00 +daily +1.0 + + + +https://www.hitsumabushi.org/archives.html +2024-01-16T01:53:09-00:00 +daily +1.0 + + + +https://www.hitsumabushi.org/search.html +2024-01-16T01:53:09-00:00 +daily +1.0 + + + +https://www.hitsumabushi.org/sitemap.html +2024-01-16T01:53:09-00:00 +daily +1.0 + + + +https://www.hitsumabushi.org/blog/2021/10/12/0200.html +2021-10-12T02:00:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2021/10/12/0100.html +2021-10-12T01:00:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2019/02/12/1630.html +2019-02-12T16:30:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2019/01/25/1454.html +2019-01-25T14:54:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2018/10/31/1901.html +2018-10-31T19:01:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2018/04/11/1058.html +2018-04-11T10:58:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2018/04/05/1420.html +2018-04-05T14:20:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2018/02/05/2009.html +2018-02-05T20:09:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/12/05/1748.html +2017-12-05T17:48:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/12/01/2001.html +2017-12-01T20:01:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/11/10/1402.html +2017-11-10T14:02:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/10/17/0336.html +2017-10-17T03:36:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/10/13/0106.html +2017-10-13T01:06:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/07/10/1600.html +2017-07-10T16:00:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/02/08/2231.html +2017-02-08T22:31:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/02/07/2355.html +2017-02-07T23:55:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2017/01/31/1936.html +2017-01-31T19:36:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/12/15/0000.html +2016-12-15T00:00:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/11/10/0352.html +2016-11-10T03:52:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/09/27/1445.html +2016-09-27T14:45:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/12/0742.html +2016-07-12T07:42:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/11/0428.html +2016-07-11T04:28:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/10/0344.html +2016-07-10T03:44:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/09/1232.html +2016-07-09T12:32:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/07/0742.html +2016-07-07T07:42:46+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/05/2121.html +2016-07-05T21:21:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/07/05/2040.html +2016-07-05T20:40:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/06/16/1445.html +2016-06-16T14:45:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/06/16/0602.html +2016-06-16T06:02:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/05/03/0624.html +2016-05-03T06:24:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/03/25/0306.html +2016-03-25T03:06:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2016/01/02/1513.html +2016-01-02T15:13:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/12/08/0551.html +2015-12-08T05:51:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/10/31/1350.html +2015-10-31T13:50:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/09/15/0421.html +2015-09-15T04:21:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/07/26/2030.html +2015-07-26T20:30:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/06/26/1250.html +2015-06-26T12:50:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/06/23/2047.html +2015-06-23T20:47:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/06/15/0004.html +2015-06-15T00:04:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/06/07/0331.html +2015-06-07T03:31:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/05/28/0607.html +2015-05-28T06:07:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/05/09/1822.html +2015-05-09T18:22:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/04/05/0138.html +2015-04-05T01:38:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/02/09/2245.html +2015-02-09T22:45:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/02/09/2227.html +2015-02-09T22:27:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/02/07/2144.html +2015-02-07T21:44:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/02/01/0033.html +2015-02-01T00:33:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/31/0320.html +2015-01-31T03:20:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/30/2209.html +2015-01-30T22:09:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/29/0754.html +2015-01-29T07:54:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/26/0312.html +2015-01-26T03:12:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/25/2101.html +2015-01-25T21:01:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/16/2348.html +2015-01-16T23:48:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/10/2349.html +2015-01-10T23:49:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/07/2029.html +2015-01-07T20:29:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/07/1924.html +2015-01-07T19:24:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/06/2338.html +2015-01-06T23:38:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2015/01/05/1735.html +2015-01-05T17:35:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/31/1805.html +2014-12-31T18:05:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/30/0548.html +2014-12-30T05:48:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/30/0257.html +2014-12-30T02:57:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/30/0130.html +2014-12-30T01:30:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/17/2345.html +2014-12-17T23:45:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/17/1440.html +2014-12-17T14:40:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/16/2000.html +2014-12-16T20:00:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/12/15/2300.html +2014-12-15T23:00:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/11/01/0243.html +2014-11-01T02:43:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/08/14/1639.html +2014-08-14T16:39:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/08/12/1638.html +2014-08-12T16:38:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/07/27/1637.html +2014-07-27T16:37:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/07/17/1635.html +2014-07-17T16:35:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/06/09/1634.html +2014-06-09T16:34:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/06/08/1633.html +2014-06-08T16:33:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/06/02/1631.html +2014-06-02T16:31:00+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/07/0239.html +2014-01-07T02:39:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/07/0238.html +2014-01-07T02:38:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/06/0243.html +2014-01-06T02:43:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/02/0240.html +2014-01-02T02:40:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/01/0244.html +2014-01-01T02:44:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/01/0243.html +2014-01-01T02:43:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/01/0241.html +2014-01-01T02:41:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/blog/2014/01/01/0237.html +2014-01-01T02:37:20+09:00 +daily +0.8 + + + +https://www.hitsumabushi.org/category/blog.html +2021-10-12T02:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/aws.html +2021-10-12T02:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/cloudformation.html +2021-10-12T02:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/1password.html +2021-10-12T01:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/python.html +2019-02-12T16:30:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/yaml.html +2019-02-12T16:30:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/tex.html +2018-10-31T19:01:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/debian.html +2018-10-31T19:01:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/snappy.html +2018-04-11T10:58:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/zsh.html +2018-04-11T10:58:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/pypi.html +2018-04-05T14:20:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/gcp.html +2018-02-05T20:09:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/golang.html +2018-02-05T20:09:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/sakrua.html +2017-12-05T17:48:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/ansible.html +2017-12-05T17:48:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/terraform.html +2017-12-05T17:48:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/mesos.html +2017-12-01T20:01:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/docker.html +2017-12-01T20:01:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/git.html +2017-10-17T03:36:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/travis-ci.html +2017-10-17T03:36:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vmware.html +2017-10-13T01:06:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/sakura.html +2017-07-10T16:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/peco.html +2017-07-10T16:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/coreos.html +2017-02-08T22:31:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/containerlinux.html +2017-02-08T22:31:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/rust.html +2017-02-07T23:55:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vim.html +2017-02-07T23:55:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/teaming.html +2016-12-15T00:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/dockerhub.html +2016-09-27T14:45:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/gpg.html +2016-07-12T07:42:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/deb.html +2016-07-11T04:28:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/package.html +2016-07-11T04:28:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/apt.html +2016-07-11T04:28:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/s3.html +2016-07-10T03:44:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/nsx.html +2016-07-09T12:32:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vcp.html +2016-07-09T12:32:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/slack.html +2016-06-16T14:45:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/hubot.html +2016-06-16T14:45:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/windows.html +2016-06-16T06:02:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vyos.html +2016-05-03T06:24:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/yamaha.html +2016-05-03T06:24:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/nifty.html +2016-05-03T06:24:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/jekyll.html +2016-03-25T03:06:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/github.html +2016-03-25T03:06:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/travis.html +2016-01-02T15:13:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vsphere.html +2015-12-08T05:51:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/math.html +2015-07-26T20:30:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/papers.html +2015-07-26T20:30:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/lun-wen.html +2015-07-26T20:30:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/security.html +2015-06-26T12:50:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/runc.html +2015-06-23T20:47:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vdi.html +2015-06-07T03:31:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/daas.html +2015-06-07T03:31:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/azure.html +2015-06-07T03:31:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/ravello.html +2015-05-09T18:22:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/xmonad.html +2015-04-05T01:38:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/mian-qiang-hui.html +2015-02-09T22:45:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/fio.html +2015-02-09T22:27:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/benchmark.html +2015-02-09T22:27:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/you-bi.html +2015-02-07T21:44:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/algorithm.html +2015-02-01T00:33:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/cui-ruo-xing.html +2015-01-31T03:20:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/cross.html +2015-01-30T22:09:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/yun-ying.html +2015-01-30T22:09:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/dns.html +2015-01-26T03:12:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vds.html +2015-01-10T23:49:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/microsoft.html +2015-01-07T20:29:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/mscs.html +2015-01-07T20:29:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vdp.html +2015-01-07T19:24:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/esxi.html +2015-01-06T23:38:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/kuraudo.html +2015-01-05T17:35:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/kpt.html +2014-12-31T18:05:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/npiv.html +2014-12-30T02:57:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/storage.html +2014-12-30T02:57:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/ruby.html +2014-12-17T23:45:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/fluentd.html +2014-12-17T23:45:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/emacs.html +2014-12-16T20:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/ci.html +2014-12-15T23:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/droneio.html +2014-12-15T23:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/pelican.html +2014-12-15T23:00:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/consul.html +2014-11-01T02:43:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/provisioning.html +2014-11-01T02:43:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/cluster.html +2014-11-01T02:43:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/ipv6.html +2014-08-12T16:38:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/ctmcp.html +2014-07-27T16:37:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/paper.html +2014-07-17T16:35:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/hadoop.html +2014-06-08T16:33:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/webhdfs.html +2014-06-08T16:33:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/linux.html +2014-06-02T16:31:00+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/perl.html +2014-01-07T02:39:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/vpls.html +2014-01-06T02:43:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/pxe.html +2014-01-01T02:44:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/preseed.html +2014-01-01T02:44:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/tag/kickstart.html +2014-01-01T02:44:20+09:19 +daily +1.0 + + + +https://www.hitsumabushi.org/author/hitsumabushi.html +2021-10-12T02:00:00+09:19 +daily +1.0 + + + diff --git a/content/extra/custom.css b/static/custom.css similarity index 100% rename from content/extra/custom.css rename to static/custom.css diff --git a/content/extra/favicon.ico b/static/favicon.ico similarity index 100% rename from content/extra/favicon.ico rename to static/favicon.ico diff --git a/content/extra/icon.jpg b/static/icon.jpg similarity index 100% rename from content/extra/icon.jpg rename to static/icon.jpg diff --git a/content/extra/my.js b/static/js/my.js similarity index 100% rename from content/extra/my.js rename to static/js/my.js diff --git a/content/extra/profile.jpg b/static/profile.jpg similarity index 100% rename from content/extra/profile.jpg rename to static/profile.jpg diff --git a/tag/1password.html b/tag/1password.html new file mode 100644 index 00000000..72962ed3 --- /dev/null +++ b/tag/1password.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 1password + + + + +
+ + + + + +
+
+

1Password CLIを使ってTOTPを取得する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, 1password +

+
+
+
+

2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。
+TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。
+ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。

+

1Password CLIの初期設定

+

1Password CLI を利用できるようにする。
+1Password CLIのGetting Startedを見て、初期設定 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/algorithm.html b/tag/algorithm.html new file mode 100644 index 00000000..58d0f6e7 --- /dev/null +++ b/tag/algorithm.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Algorithm + + + + +
+ + + + + +
+
+

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + + • Tagged with + Algorithm, papers, 論文 +

+
+
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノー …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ansible.html b/tag/ansible.html new file mode 100644 index 00000000..e8ecc4d0 --- /dev/null +++ b/tag/ansible.html @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag ansible + + + + +
+ + + + + +
+
+

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + + • Tagged with + sakrua, ansible, terraform +

+
+
+
+
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果と …

+
+ + Continue reading + +
+
+
+
+
+

Ansible でバージョンチェックする

+

+ Posted on Fri 10 November 2017 in blog + + • Tagged with + ansible, debian +

+
+
+
+

やりたいこと

+

サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。
+- インストールされていなかったらインストール
+- あるバージョン未満だったらアップデート

+

pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。
+いい感じに playbook の中でバー …

+
+ + Continue reading + +
+
+
+
+
+

git bisect でバグ/仕様変更のコミットを探す

+

+ Posted on Thu 10 November 2016 in blog + + • Tagged with + git, ansible +

+
+
+
+

まとめ

+
    +
  • git bisect が便利
  • +
  • ansible 2.1.0 -> 2.1.1 で group名に / を入れるとうまく動かないケースが存在する
      +
    • ansible リポジトリでbisect すると対象のコミットは 7287effb5ce241ce645d61e55e981edc73fa382a
    • +
    • group名には / を入れないように、 group_vars 以下はフラットな構成にしよう
    • +
    +
  • +
+

遭遇した問題

+

ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、
+複数のリージョンやゾーンにまたがるシステムのため、うまく設 …

+
+ + Continue reading + +
+
+
+
+
+

Anisble for Windows

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + ansible, windows +

+
+
+
+

久しぶりに ansible で windows を操作するので、メモ。
+実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。
+ansibleは2.1.0を使っている。

+

やること

+

以下を anisble で実行する。

+
    +
  1. Windows Update
  2. +
  3. Windows Server 2012 R2 に AD をインストール
  4. +
  5. ADに適当なダミーエントリを突っ込む
  6. +
+

初期設定

+

ansible 実行サーバーの準備

+

winrm経由で実行することになるので、 pywinrm が必要。

+
# pip install ansible pywinrm
+
+

Inventory

+
[windows_server …
+
+ + Continue reading + +
+
+
+
+
+

WindowsをAnsibleで設定する

+

+ Posted on Thu 28 May 2015 in blog + + • Tagged with + Windows, ansible +

+
+
+
+

資料

+

Windows Support — Ansible Documentation

+

マシンの準備

+

ansibleコマンドを実行するマシン

+

ansibleがすでに実行できる状況であれば、

+
pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm
+pip install kerberos # AD accountを使う場合
+
+

とすればOK。

+

Windowsマシン

+

要件

+
    +
  1. WinRM がインストール済み
  2. +
  3. PowerShell version > 3.0
  4. +
  5. 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる
  6. +
  7. Windows Server 2012ははじめからPowershell 4.0がインストールされている
  8. +
+

セットアップ方法

+
    +
  1. Powershell 3.0にアップデートが必要な場合 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/api.html b/tag/api.html new file mode 100644 index 00000000..36617a61 --- /dev/null +++ b/tag/api.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag api + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/application.html b/tag/application.html new file mode 100644 index 00000000..bb347077 --- /dev/null +++ b/tag/application.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag application + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/apt.html b/tag/apt.html new file mode 100644 index 00000000..b1e9c937 --- /dev/null +++ b/tag/apt.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag apt + + + + +
+ + + + + +
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+
+
+
+

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + + • Tagged with + debian, apt, s3 +

+
+
+
+

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバ …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/automation.html b/tag/automation.html new file mode 100644 index 00000000..c302eea7 --- /dev/null +++ b/tag/automation.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag automation + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/aws.html b/tag/aws.html new file mode 100644 index 00000000..6211350b --- /dev/null +++ b/tag/aws.html @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag aws + + + + +
+ + + + + +
+
+

CloudFormation Stackを安全に削除する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以前、CloudFormation の不満点 というのを書いたが、諦めて大半のCfnをterraformに移行した。
+その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。

+

概要

+

アイデアは簡単で以下の通り。

+
    +
  1. cfn の操作のみが許可されているIAM roleを作成する
  2. +
  3. 上記roleを指定して cfn stackをdeleteする
  4. +
+

モチベーション

+

そもそも以前の記事でも、予期せぬ手作業の …

+
+ + Continue reading + +
+
+
+
+
+

1Password CLIを使ってTOTPを取得する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, 1password +

+
+
+
+

2要素認証を必須にしたAWSのswitch roleで、temporary credentialsをCLIで取得したかった。
+TOTPの数字を毎回調べるのが面倒で、簡単にできないか調べたところ、1Password CLIというのがあった。1Passwordユーザなので、これを利用する。
+ただし、当然のことだが、2要素認証のデバイスとして、1Passwordが利用されている状況とする。

+

1Password CLIの初期設定

+

1Password CLI を利用できるようにする。
+1Password CLIのGetting Startedを見て、初期設定 …

+
+ + Continue reading + +
+
+
+
+
+

CloudFormation の不満点

+

+ Posted on Fri 25 January 2019 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。

+

要点

+
    +
  • CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない
  • +
  • Drift 検出は誤検出が多すぎて使いづらい
  • +
  • Change Set は動いている状態との差分を見ていないので、信用できない
  • +
+

経緯

+

CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。
+ただ、各サービ …

+
+ + Continue reading + +
+
+
+
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/azure.html b/tag/azure.html new file mode 100644 index 00000000..f9cb56c8 --- /dev/null +++ b/tag/azure.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Azure + + + + +
+ + + + + +
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ben.html b/tag/ben.html new file mode 100644 index 00000000..df460f2a --- /dev/null +++ b/tag/ben.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 本 + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/benchmark.html b/tag/benchmark.html new file mode 100644 index 00000000..7a2c903b --- /dev/null +++ b/tag/benchmark.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag benchmark + + + + +
+ + + + + +
+
+

fioを使ったベンチマーク

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + fio, benchmark +

+
+
+
+

Intro

+

ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。
+今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。
+ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。

+

オプション

+

オプションの与え方

+

以下の2つが使える。

+
    +
  • コマンドラインオプション …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ci.html b/tag/ci.html new file mode 100644 index 00000000..e5ad13a7 --- /dev/null +++ b/tag/ci.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag CI + + + + +
+ + + + + +
+
+

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + + • Tagged with + CI, drone.io, pelican +

+
+
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分が …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/cloudformation.html b/tag/cloudformation.html new file mode 100644 index 00000000..bb4832e0 --- /dev/null +++ b/tag/cloudformation.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag cloudformation + + + + +
+ + + + + +
+
+

CloudFormation Stackを安全に削除する

+

+ Posted on Tue 12 October 2021 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以前、CloudFormation の不満点 というのを書いたが、諦めて大半のCfnをterraformに移行した。
+その際、cfn リソースをきれいにするために、cfn stackを安全に削除する必要があり、その方法をメモしておく。

+

概要

+

アイデアは簡単で以下の通り。

+
    +
  1. cfn の操作のみが許可されているIAM roleを作成する
  2. +
  3. 上記roleを指定して cfn stackをdeleteする
  4. +
+

モチベーション

+

そもそも以前の記事でも、予期せぬ手作業の …

+
+ + Continue reading + +
+
+
+
+
+

CloudFormation の不満点

+

+ Posted on Fri 25 January 2019 in blog + + • Tagged with + aws, cloudformation +

+
+
+
+

以下では「手作業で」というのは、「CloudFormation管理外で」という意味で使う。

+

要点

+
    +
  • CloudFormation は、リソースが何かの理由で手作業で変更されていた場合に安全に操作できない
  • +
  • Drift 検出は誤検出が多すぎて使いづらい
  • +
  • Change Set は動いている状態との差分を見ていないので、信用できない
  • +
+

経緯

+

CloudFormation で管理されているリソースすべてについて、新しいタグをつけたくなった。
+ただ、各サービ …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/cluster.html b/tag/cluster.html new file mode 100644 index 00000000..8f44d32d --- /dev/null +++ b/tag/cluster.html @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag cluster + + + + +
+ + + + + +
+
+

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + + • Tagged with + consul, provisioning, cluster +

+
+
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/consul.html b/tag/consul.html new file mode 100644 index 00000000..1f047197 --- /dev/null +++ b/tag/consul.html @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag consul + + + + +
+ + + + + +
+
+

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + + • Tagged with + consul, provisioning, cluster +

+
+
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/containerlinux.html b/tag/containerlinux.html new file mode 100644 index 00000000..e8c49598 --- /dev/null +++ b/tag/containerlinux.html @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag containerlinux + + + + +
+ + + + + +
+
+

自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ

+

+ Posted on Wed 08 February 2017 in blog + + • Tagged with + coreos, containerlinux +

+
+
+
+

構成

+

Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。

+

OSイメージ

+

VMware用のイメージを利用。
+/usr/share/oem/cloud-config.yml に vmware tools周りの設定が入っているので便利。

+

password の変更

+

grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。

+

初期設定: cloud-config

+

/var/lib/coreos-install/user_data を編集する。
+(作法を無視すれば、 /usr/share/oem/cloud-config.yml でも良いはず。)

+
#cloud-config
+coreos:
+  units:
+    - name: docker-tcp.socket
+      command …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/coreos.html b/tag/coreos.html new file mode 100644 index 00000000..e737867e --- /dev/null +++ b/tag/coreos.html @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag coreos + + + + +
+ + + + + +
+
+

自宅 vSphere 上の CoreOS (Container Linux) のデプロイメモ

+

+ Posted on Wed 08 February 2017 in blog + + • Tagged with + coreos, containerlinux +

+
+
+
+

構成

+

Mesos などを立てるため、Master 3台, Slave 2台以上の予定で作る。

+

OSイメージ

+

VMware用のイメージを利用。
+/usr/share/oem/cloud-config.yml に vmware tools周りの設定が入っているので便利。

+

password の変更

+

grub で linux...の行の末尾に coreos.autologin と入れてパスワードなしログインをしてから、パスワード変更する。

+

初期設定: cloud-config

+

/var/lib/coreos-install/user_data を編集する。
+(作法を無視すれば、 /usr/share/oem/cloud-config.yml でも良いはず。)

+
#cloud-config
+coreos:
+  units:
+    - name: docker-tcp.socket
+      command …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/cross.html b/tag/cross.html new file mode 100644 index 00000000..08c2a0fa --- /dev/null +++ b/tag/cross.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag CROSS + + + + +
+ + + + + +
+
+

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + + • Tagged with + CROSS, 勉強会, 運営 +

+
+
+
+

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ctmcp.html b/tag/ctmcp.html new file mode 100644 index 00000000..1c38981f --- /dev/null +++ b/tag/ctmcp.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag CTMCP + + + + +
+ + + + + +
+
+

DebianにOzをインストールする

+

+ Posted on Sun 27 July 2014 in blog + + • Tagged with + Debian, CTMCP +

+
+
+

ガウディ本読みはじめた。

+ + +

困ったこと

+

この本で使われるOzという言語をDebian上で実行するのに、少し困った。
+morzart2をダウンロードして、適当にインストールしただけだと、
+emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。
+正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。

+

このために、必要なパッケージが …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/cui-ruo-xing.html b/tag/cui-ruo-xing.html new file mode 100644 index 00000000..a4154954 --- /dev/null +++ b/tag/cui-ruo-xing.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 脆弱性 + + + + +
+ + + + + +
+
+

CROSS 2015のアンカンファレンスで話しました

+

+ Posted on Sat 31 January 2015 in blog + + • Tagged with + 勉強会, 脆弱性 +

+
+
+

CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。
+スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。
+たぶんプレゼン作成時間30分くらい。

+ + +

書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。
+自分自身は何か情報系の教育を受 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/daas.html b/tag/daas.html new file mode 100644 index 00000000..cccb1532 --- /dev/null +++ b/tag/daas.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag DaaS + + + + +
+ + + + + +
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/dataflow.html b/tag/dataflow.html new file mode 100644 index 00000000..16d045ab --- /dev/null +++ b/tag/dataflow.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag dataflow + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/deb.html b/tag/deb.html new file mode 100644 index 00000000..d1ba11f2 --- /dev/null +++ b/tag/deb.html @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag deb + + + + +
+ + + + + +
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/debian.html b/tag/debian.html new file mode 100644 index 00000000..3f42e1ce --- /dev/null +++ b/tag/debian.html @@ -0,0 +1,499 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag debian + + + + +
+ + + + + +
+
+

DebianでLuaJITTeXを使いたい

+

+ Posted on Wed 31 October 2018 in blog + + • Tagged with + tex, debian +

+
+
+
+

そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。

+

参考

+ +

未解決の問題

+
    +
  • /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST が自動生成されている、とコメントされているが、元ファイルがわからない
  • +
+
### This file was automatically generated by update-fmtutil.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on …
+
+ + Continue reading + +
+
+
+
+
+

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + + • Tagged with + debian, snappy, zsh +

+
+
+
+

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バ …

+
+ + Continue reading + +
+
+
+
+
+

Ansible でバージョンチェックする

+

+ Posted on Fri 10 November 2017 in blog + + • Tagged with + ansible, debian +

+
+
+
+

やりたいこと

+

サーバー管理には ansible を使っていますが、apt で入れているパッケージに対して、以下をやりたい状況がありました。
+- インストールされていなかったらインストール
+- あるバージョン未満だったらアップデート

+

pipやgemといった言語のパッケージマネージャと違って、apt ではバージョンの制約を書くことが面倒です。
+いい感じに playbook の中でバー …

+
+ + Continue reading + +
+
+
+
+
+

GnuPGのメモ @ Debian Sid

+

+ Posted on Tue 12 July 2016 in blog + + • Tagged with + gpg, debian +

+
+
+
+

Debain での GnuPG

+

GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。
+Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。
+普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。
+以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思っ …

+
+ + Continue reading + +
+
+
+
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+
+
+
+

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + + • Tagged with + debian, apt, s3 +

+
+
+
+

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバ …
+
+ + Continue reading + +
+
+
+
+
+

Dockerの細々としたメモ

+

+ Posted on Tue 15 September 2015 in blog + + • Tagged with + docker, debian +

+
+
+

Debian で利用する際のメモを書いておく。

+ +

grub でのカーネルパラメータ

+
    +
  1. systemd を利用する設定
  2. +
  3. cgroups で、メモリに制限をかけるための設定
  4. +
+
# quiet はあってもなくても良い
+GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

cgroups まわり

+

cgroups のディレクトリ配下に設定がある

+
/sys/fs/cgroup/cpu,cpuacct/docker/
+
+

network

+

参考: Dockerのネットワーク管理とnetnsの関係

+

docker コンテナを1つ立ち上げるごとに、vethデバイスができる …

+
+ + Continue reading + +
+
+
+
+
+

runCをDebianで実行する

+

+ Posted on Tue 23 June 2015 in blog + + • Tagged with + runc, debian +

+
+
+

opencontainers/runc を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。

+ +

runCのインストール

+

golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。

+
git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc
+cd $GOPATH/src/github.com/opencontainers/runc/
+make
+sudo make install
+
+

状況

+

ディレクトリ構成

+
.
+├── container.json (とりあえず、runc spec で生成されるもので …
+
+ + Continue reading + +
+
+
+
+
+

Xmonadの設定

+

+ Posted on Sun 05 April 2015 in blog + + • Tagged with + debian, xmonad +

+
+
+
+

資料

+
    +
  1. http://xmonad.org/documentation.html
  2. +
  3. Archlinux Wiki - Xmonad
  4. +
  5. Xmonad/Config archive/John Goerzen's Configuration
  6. +
  7. Xmonadの設定 1/3 「基本」編 - ナレッジエース
  8. +
+

環境

+

Debian Sid & Xfce4

+

Install and Initial Configure

+

Package install

+
# basic packages
+sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev
+# for adding launcher
+sudo apt-get install dmenu
+# for status bar
+sudo apt-get install xmobar
+# tools
+sudo apt-get install suckless-tools scrot tilda trayer
+
+

Xsession

+
    +
  1. +

    add /usr/share/xsessions/custom.desktop

    +
    [Desktop Entry]
    +Name=Xsession
    +Exec=/etc/X11/Xsession
    +
    +
  2. +
  3. +

    ${HOME}/.xsession

    +
    xmodmap ~/.Xmodmap
    +exec xmonad
    +
    +
  4. +
+

Edit config

+
import XMonad
+
+main = do
+xmonad $ defaultConfig
+
+

Set xmonad as the default window manager

+
$ sudo update-alternatives --config x-window-manager
+
+

デフォルトのキーボードショートカットは、man xmonadで見ることができる。
+とりあえず、Alt + Shift …

+
+ + Continue reading + +
+
+
+
+
+

Dockerのプロキシ設定

+

+ Posted on Thu 29 January 2015 in blog + + • Tagged with + Docker, Debian +

+
+
+

自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。
+bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、
+あらためて考えると解決できた。

+

結論は、dockerのデーモンが起動すると …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/debian2.html b/tag/debian2.html new file mode 100644 index 00000000..da236227 --- /dev/null +++ b/tag/debian2.html @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag debian + + + + +
+ + + + + +
+
+

DNS サーバーの比較資料集め

+

+ Posted on Mon 26 January 2015 in blog + + • Tagged with + DNS, Debian +

+
+
+

自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。
+DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。
+以下に、参考ページを列挙する。

+ +

参考になるページ

+

権威サーバ

+ +

キャッシュサーバ

+
+
+ + Continue reading + +
+
+
+
+
+

DebianにOzをインストールする

+

+ Posted on Sun 27 July 2014 in blog + + • Tagged with + Debian, CTMCP +

+
+
+

ガウディ本読みはじめた。

+ + +

困ったこと

+

この本で使われるOzという言語をDebian上で実行するのに、少し困った。
+morzart2をダウンロードして、適当にインストールしただけだと、
+emacs上でコンパイルはできるのに、実行結果が表示できない状況になった。
+正常な動作は、コンパイルできるとウィンドウが開いて、そこに結果が表示される。

+

このために、必要なパッケージが …

+
+ + Continue reading + +
+
+
+
+
+

DebianでZNCを使って、快適なIRC生活を送る

+

+ Posted on Mon 09 June 2014 in blog + + • Tagged with + Debian +

+
+
+

やりたいこと

+

最近、自分の興味のあるソフトウェアのIRCによく引きこもっています。
+自宅のPCはつけっぱなしにしておけば、全部のログを見れるのですが、
+会社やスマホで見るときには、接続している間のことしか確認できず、若干もどかしいです。

+

そういうわけで、ZNCサーバーを立てて、IRCのログを出先からでも確認できるようにしましょう。

+

実現するこ …

+
+ + Continue reading + +
+
+
+
+
+

LEDバックライトの調整

+

+ Posted on Mon 02 June 2014 in blog + + • Tagged with + Debian, Linux +

+
+
+

ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。
+GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。

+

環境

+
    +
  • PC: ASUS 24A
  • +
  • OS: Linux(Debian sid amd64)
  • +
+

調整可能な範囲

+
  cat /sys/class/backlight/intel_backlight/max_brightness
+
+ +

ディスプレイの明るさ変更

+
  # 明るさを800にするとき
+  echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness
+
+
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/dns.html b/tag/dns.html new file mode 100644 index 00000000..5df60459 --- /dev/null +++ b/tag/dns.html @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag DNS + + + + +
+ + + + + +
+
+

DNS サーバーの比較資料集め

+

+ Posted on Mon 26 January 2015 in blog + + • Tagged with + DNS, Debian +

+
+
+

自宅開発環境を一新するついでに、真面目にサーバー構成を見直すことにした。
+DNSサーバーは今までbind+dnsmasqでやっていたが、改めてパフォーマンスの観点から選定したい。
+以下に、参考ページを列挙する。

+ +

参考になるページ

+

権威サーバ

+ +

キャッシュサーバ

+
+
+ + Continue reading + +
+
+
+
+
+

DNS サーバー

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + dns +

+
+
+

ニフティクラウド上でサーバーを立てた。 +いろいろと設定していこうかと思っているが、まずはDNSから始める。

+
+

作業内容

+

1. /etc/bind/named.conf.options +以下のように書き換える:

+
+// v6の設定: v6は応答しない
+// listen-on-v6 { any; };
+listen-on-v6 { none; };
+
+// transfer を許すIPを制限
+allow-transfer "192.168.100.1";
+
+

2. /etc/bind/named.conf.local +ゾーンの設定:

+
+zone "example.com" {
+   type master;
+   file "example.db";
+};
+zone "100.168.192.in-addr.arpa" {
+   type master;
+   file "192.rev"
+};
+
+
+
+
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/docker.html b/tag/docker.html new file mode 100644 index 00000000..c671e41f --- /dev/null +++ b/tag/docker.html @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag docker + + + + +
+ + + + + +
+
+

Mesos の sandbox のログローテーションをする

+

+ Posted on Fri 01 December 2017 in blog + + • Tagged with + mesos, docker +

+
+
+
+

結論

+
    +
  • http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger
  • +
  • LogrotateContainerLogger を使って、 module parameter を設定する
  • +
+

概要

+

Mesos + Marathon 環境でdockerを動かしている。
+基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。
+調べてみると、 /var/lib/mesos-slave/slaves/ 以下にあるフォルダのうち、sandbox のログが肥大化していた。
+sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosか …

+
+ + Continue reading + +
+
+
+
+
+

DockerHub で docker build のオプションを設定したい

+

+ Posted on Tue 27 September 2016 in blog + + • Tagged with + docker, dockerhub +

+
+
+
+

参考リポジトリ

+
    +
  • https://github.com/hitsumabushi/docker-phpipam
  • +
+

目的

+
    +
  • Dockerfile の中で、 ARGを使いたい。
      +
    • LABEL としてビルドした日付や、 VCSのリビジョンを入れたい
    • +
    • ソフトウェアのバージョンをARGで指定したい
    • +
    +
  • +
+

やること

+
    +
  1. Dockerfile と同じ場所に、 hook ディレクトリを作成する。
  2. +
  3. hook ディレクトリ以下に、 build というファイルを作成する。
      +
    • build には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。
    • +
    • 自分で docker build …
+
+ + Continue reading + +
+
+
+
+
+

Dockerの細々としたメモ

+

+ Posted on Tue 15 September 2015 in blog + + • Tagged with + docker, debian +

+
+
+

Debian で利用する際のメモを書いておく。

+ +

grub でのカーネルパラメータ

+
    +
  1. systemd を利用する設定
  2. +
  3. cgroups で、メモリに制限をかけるための設定
  4. +
+
# quiet はあってもなくても良い
+GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd"
+GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
+
+

cgroups まわり

+

cgroups のディレクトリ配下に設定がある

+
/sys/fs/cgroup/cpu,cpuacct/docker/
+
+

network

+

参考: Dockerのネットワーク管理とnetnsの関係

+

docker コンテナを1つ立ち上げるごとに、vethデバイスができる …

+
+ + Continue reading + +
+
+
+
+
+

Dockerのプロキシ設定

+

+ Posted on Thu 29 January 2015 in blog + + • Tagged with + Docker, Debian +

+
+
+

自宅ではプロキシを立てていないので問題なかったが、会社でDockerをいじろうとするとプロキシに阻まれてうまくいかず困っていた。
+bashの環境変数を設定するのはうまくいかなくて、しばらく手元ではdockerをやらず、作業用マシンをクラウドに立ててどうにかごまかしていたのだけど、
+あらためて考えると解決できた。

+

結論は、dockerのデーモンが起動すると …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/dockerhub.html b/tag/dockerhub.html new file mode 100644 index 00000000..9168090e --- /dev/null +++ b/tag/dockerhub.html @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag dockerhub + + + + +
+ + + + + +
+
+

DockerHub で docker build のオプションを設定したい

+

+ Posted on Tue 27 September 2016 in blog + + • Tagged with + docker, dockerhub +

+
+
+
+

参考リポジトリ

+
    +
  • https://github.com/hitsumabushi/docker-phpipam
  • +
+

目的

+
    +
  • Dockerfile の中で、 ARGを使いたい。
      +
    • LABEL としてビルドした日付や、 VCSのリビジョンを入れたい
    • +
    • ソフトウェアのバージョンをARGで指定したい
    • +
    +
  • +
+

やること

+
    +
  1. Dockerfile と同じ場所に、 hook ディレクトリを作成する。
  2. +
  3. hook ディレクトリ以下に、 build というファイルを作成する。
      +
    • build には、 build時に実行したいシェルスクリプトを書くと、build 時に実行される。
    • +
    • 自分で docker build …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/droneio.html b/tag/droneio.html new file mode 100644 index 00000000..c899c344 --- /dev/null +++ b/tag/droneio.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag drone.io + + + + +
+ + + + + +
+
+

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + + • Tagged with + CI, drone.io, pelican +

+
+
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分が …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/emacs.html b/tag/emacs.html new file mode 100644 index 00000000..aac327cc --- /dev/null +++ b/tag/emacs.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Emacs + + + + +
+ + + + + +
+
+

ソースコードリーディングをするときにctagsを使いたい

+

+ Posted on Tue 16 December 2014 in blog + + • Tagged with + Emacs, Ruby +

+
+
+

きっかけ

+

とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。
+でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。
+そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、
+ぱっと見でわからず、いちいち時 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/esxi.html b/tag/esxi.html new file mode 100644 index 00000000..6c9566c6 --- /dev/null +++ b/tag/esxi.html @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag ESXi + + + + +
+ + + + + +
+
+

ESXiをkickstartでインストールする

+

+ Posted on Tue 06 January 2015 in blog + + • Tagged with + VMware, ESXi +

+
+
+

ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。

+ +

利用OS

+
    +
  • ESXi 5.5
  • +
  • Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる)
  • +
+

DHCP, TFTP, HTTPサーバーの準備

+

必要なソフトウェアのインストール

+
apt-get install tftpd-hpa isc-dhcp-server xinetd apache2
+
+

DHCPサーバーの設定

+

BOOTPでインストールするため、あまり自由度がない。

+
+ +
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/fio.html b/tag/fio.html new file mode 100644 index 00000000..d8823fc6 --- /dev/null +++ b/tag/fio.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag fio + + + + +
+ + + + + +
+
+

fioを使ったベンチマーク

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + fio, benchmark +

+
+
+
+

Intro

+

ディスクベンチマークのツールとして、dbenchであるとか、もっと簡単にはhdparmなどがある。
+今回はfioという、単純なread/writeの計測には必要十分なツールを使おうと思う。
+ただ、ベンチマークツールはたいていオプションが多く、またアウトプットも複雑なので、一旦まとめてみる。

+

オプション

+

オプションの与え方

+

以下の2つが使える。

+
    +
  • コマンドラインオプション …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/fluentd.html b/tag/fluentd.html new file mode 100644 index 00000000..8ea39d74 --- /dev/null +++ b/tag/fluentd.html @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Fluentd + + + + +
+ + + + + +
+
+

fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編)

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + Ruby, Fluentd +

+
+
+

本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。
+ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。

+ +

基本情報

+
    +
  1. +

    lib/fluent/plugin/{TYPE}_{NAME}.rb 以下がプラグインの本体。

    +
      +
    • TYPE : in, out, buf,... etc
    • +
    • NAME : プラグインの名前
    • +
    +
  2. +
  3. +

    pluginを書く時のお約束

    +
      +
    • Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する
    • +
    • 設 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/gcp.html b/tag/gcp.html new file mode 100644 index 00000000..0e502612 --- /dev/null +++ b/tag/gcp.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag GCP + + + + +
+ + + + + +
+
+

Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ

+

+ Posted on Mon 05 February 2018 in blog + + • Tagged with + GCP, golang +

+
+
+
+

概要

+

Google Pub/SubGoのSDK から使おうとしていました。
+やっているといくつか詰まったので、メモしておきます。

+
    +
  1. サービスアカウントを利用するためにCredentials JSONを指定する
  2. +
  3. サブスクリプションの Pub/Sub サブスクライバー権限 を与えても Permission Denied になる
  4. +
+

サービスアカウントを利用するためにCredentials JSONを指定する

+

権限の都合上、サービスアカウントのCredentials JSONを利用して認証 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/git.html b/tag/git.html new file mode 100644 index 00000000..106987c9 --- /dev/null +++ b/tag/git.html @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag git + + + + +
+ + + + + +
+
+

Travis CIで git submodule update --init --recursive を止める

+

+ Posted on Tue 17 October 2017 in blog + + • Tagged with + git, travis-ci +

+
+
+
+

結論

+ +
git:
+  submodule: false
+
+
    +
  • 個別に git submodule update --init hoge していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 $TRAVIS_BUILD_DIR を使えば良い。
  • +
+

経緯

+

久しぶりにこのブログを書いたらビルドに失敗していた。
+原因としては、このブログで利用している getpelican/pelican-plugins のsubmoduleの設定によって、
+取得で …

+
+ + Continue reading + +
+
+
+
+
+

git bisect でバグ/仕様変更のコミットを探す

+

+ Posted on Thu 10 November 2016 in blog + + • Tagged with + git, ansible +

+
+
+
+

まとめ

+
    +
  • git bisect が便利
  • +
  • ansible 2.1.0 -> 2.1.1 で group名に / を入れるとうまく動かないケースが存在する
      +
    • ansible リポジトリでbisect すると対象のコミットは 7287effb5ce241ce645d61e55e981edc73fa382a
    • +
    • group名には / を入れないように、 group_vars 以下はフラットな構成にしよう
    • +
    +
  • +
+

遭遇した問題

+

ansible で構成/コンフィグ管理やプロビジョニングをしているのだけど、
+複数のリージョンやゾーンにまたがるシステムのため、うまく設 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/github.html b/tag/github.html new file mode 100644 index 00000000..1f90d7bd --- /dev/null +++ b/tag/github.html @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag github + + + + +
+ + + + + +
+
+

久しぶりにGitHub Pagesのjekyll触ったので、メモ

+

+ Posted on Fri 25 March 2016 in blog + + • Tagged with + jekyll, github +

+
+
+
+

このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、
+昔とだいぶ状況も変わっていそうだったので、メモをしておく。

+

gem

+

とりあえず、Gemfileを用意して、以下の2行を書く

+
source 'https://rubygems.org'
+gem 'github-pages'
+
+

全体的なconfig

+

GFMを使う

+

ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、_config.ymlに以下を追加しておいた方が良さそう。

+
markdown: kramdown
+kramdown:
+  input: GFM
+
+

related post …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/go.html b/tag/go.html new file mode 100644 index 00000000..79abdbbd --- /dev/null +++ b/tag/go.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag go + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/golang.html b/tag/golang.html new file mode 100644 index 00000000..34e33192 --- /dev/null +++ b/tag/golang.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag golang + + + + +
+ + + + + +
+
+

Google Cloud Pub/Sub をGolangから使おうとしてハマったことまとめ

+

+ Posted on Mon 05 February 2018 in blog + + • Tagged with + GCP, golang +

+
+
+
+

概要

+

Google Pub/SubGoのSDK から使おうとしていました。
+やっているといくつか詰まったので、メモしておきます。

+
    +
  1. サービスアカウントを利用するためにCredentials JSONを指定する
  2. +
  3. サブスクリプションの Pub/Sub サブスクライバー権限 を与えても Permission Denied になる
  4. +
+

サービスアカウントを利用するためにCredentials JSONを指定する

+

権限の都合上、サービスアカウントのCredentials JSONを利用して認証 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/gpg.html b/tag/gpg.html new file mode 100644 index 00000000..6742eaf9 --- /dev/null +++ b/tag/gpg.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag gpg + + + + +
+ + + + + +
+
+

GnuPGのメモ @ Debian Sid

+

+ Posted on Tue 12 July 2016 in blog + + • Tagged with + gpg, debian +

+
+
+
+

Debain での GnuPG

+

GnuPG は OpenPGPの実装の一つで、GPGと呼ばれることもあります。
+Debian では、2016/07/12現在、gpg コマンドは 1.4系で、 gpg2 パッケージで 2.1系を提供しています。
+普段使いでgpg 1.4系をわざわざ使う必要はないとは思うので、以下ではgpg2 を利用することにしています。
+以下では、gpg と gpg2 の違いに触れることはありませんが、例えば、RSAではなく楕円暗号を使おうと思っ …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/hadoop.html b/tag/hadoop.html new file mode 100644 index 00000000..cd1057ea --- /dev/null +++ b/tag/hadoop.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Hadoop + + + + +
+ + + + + +
+
+

WebHDFSで詰まったこと

+

+ Posted on Sun 08 June 2014 in blog + + • Tagged with + Hadoop, WebHDFS +

+
+
+

困っていたこと

+

HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。
+ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。
+しかし、実際にやっているとうまくいかないケースがあった。

+
% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open"
+HTTP/1.1 307 TEMPORARY_REDIRECT …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/hubot.html b/tag/hubot.html new file mode 100644 index 00000000..b8c013c1 --- /dev/null +++ b/tag/hubot.html @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag hubot + + + + +
+ + + + + +
+
+

会社にslack入ったので、色々やってた

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + slack, hubot +

+
+
+
+

勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。

+

現在のチャンネル構成

+
    +
  • 定常系
      +
    • 分報用のチャンネル。個々人が作る
    • +
    • 部署用
    • +
    • チーム用
    • +
    • プロジェクト用
    • +
    +
  • +
  • 雑多な情報共有用
      +
    • ニュース用
    • +
    +
  • +
  • トラブル用
  • +
  • その他
      +
    • 臨時に必要になるとか
    • +
    • テストとか
    • +
    +
  • +
+

やったことメモ

+

RSS を Slack に移行

+

live dwango reader をずっと使っていたのだけど、更新頻度が …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/infrastructure.html b/tag/infrastructure.html new file mode 100644 index 00000000..fd0a4ee7 --- /dev/null +++ b/tag/infrastructure.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Infrastructure + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ios.html b/tag/ios.html new file mode 100644 index 00000000..af497970 --- /dev/null +++ b/tag/ios.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag ios + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ipv6.html b/tag/ipv6.html new file mode 100644 index 00000000..2f24d70a --- /dev/null +++ b/tag/ipv6.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag IPv6 + + + + +
+ + + + + +
+
+

IPv6のことを調べ始めた

+

+ Posted on Tue 12 August 2014 in blog + + • Tagged with + IPv6 +

+
+
+

IPv6 環境構築

+

ひとまず参照すべきRFC

+
    +
  • RFC3315(DHCPv6) とそれをupdateしているやつ
  • +
  • RFC4861(Neighbor DiscoveryのIPv6バージョン)
  • +
  • RFC5942(IPv6のsubnet model)
  • +
+

IPv6 アドレス配布方式について

+

全体としては、下記の4パターンある。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
アドレス配布方式RAは必要?RAにプレフィックス情報は必要?m-flago-flag配布できるもの
手動xx---
ステートレスアドレス自動設定(SLAAC)oooffoffプレフィックスのみ
ステートフルDHCPv6oo(たぶ …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/jekyll.html b/tag/jekyll.html new file mode 100644 index 00000000..315cad56 --- /dev/null +++ b/tag/jekyll.html @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag jekyll + + + + +
+ + + + + +
+
+

久しぶりにGitHub Pagesのjekyll触ったので、メモ

+

+ Posted on Fri 25 March 2016 in blog + + • Tagged with + jekyll, github +

+
+
+
+

このブログは、pelicanを使っているのだけど、久しぶりにGitHub Pagesのjekyllを触ることがあって、
+昔とだいぶ状況も変わっていそうだったので、メモをしておく。

+

gem

+

とりあえず、Gemfileを用意して、以下の2行を書く

+
source 'https://rubygems.org'
+gem 'github-pages'
+
+

全体的なconfig

+

GFMを使う

+

ローカルでのテストと、GitHub Pages上のテストを同じにするためにも、_config.ymlに以下を追加しておいた方が良さそう。

+
markdown: kramdown
+kramdown:
+  input: GFM
+
+

related post …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/kickstart.html b/tag/kickstart.html new file mode 100644 index 00000000..c5f78fe1 --- /dev/null +++ b/tag/kickstart.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag kickstart + + + + +
+ + + + + +
+
+

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + pxe, preseed, kickstart +

+
+
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/kpt.html b/tag/kpt.html new file mode 100644 index 00000000..bcc19228 --- /dev/null +++ b/tag/kpt.html @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag KPT + + + + +
+ + + + + +
+
+

2014年のまとめをしておかねば

+

+ Posted on Wed 31 December 2014 in blog + + • Tagged with + KPT +

+
+
+

今年1年は反省の多い年だったので、きちんと書いて残しておく。

+ +

2014年面白かった技術、触りたかったソフトウェア

+

新たに導入したもの

+
    +
  1. Ansible
  2. +
  3. Ceph
  4. +
  5. Pelican(このブログを生成してるやつ)
  6. +
  7. Flask
  8. +
+

ちょっとしか触れず...

+
    +
  1. VyOS
  2. +
  3. Consul
  4. +
  5. Fluentd
  6. +
  7. Golang
  8. +
  9. Docker
  10. +
  11. CoreOS
  12. +
  13. Hashicorpのツールその他
  14. +
  15. Hadoop
  16. +
+

触りたかったけど、触らず

+
    +
  1. Strom
  2. +
  3. Rust
  4. +
+

2014年のトピックス

+

思い返すと1月のこととかは何年も前に感じるが、今年は割と色々あっ …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/kubernetes.html b/tag/kubernetes.html new file mode 100644 index 00000000..78825b5a --- /dev/null +++ b/tag/kubernetes.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag kubernetes + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/kuraudo.html b/tag/kuraudo.html new file mode 100644 index 00000000..82277014 --- /dev/null +++ b/tag/kuraudo.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag クラウド + + + + +
+ + + + + +
+
+

vCloud Airの価格感を調べる

+

+ Posted on Mon 05 January 2015 in blog + + • Tagged with + VMware, クラウド +

+
+
+
+

資料

+ +

vCloud Airとは

+

VMwareが提供している、ハイブリッドクラウドのサービス。

+

特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、
+vSphere Clientのプラグインと統合して操作ができることが挙げられる。

+

日本では、ソフトバンクと提携しているようだ

+

vCloud Air の価格感を調べる

+

大前提として、一般的なクラウドサービスと …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/linux.html b/tag/linux.html new file mode 100644 index 00000000..d5a87d44 --- /dev/null +++ b/tag/linux.html @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Linux + + + + +
+ + + + + +
+
+

LEDバックライトの調整

+

+ Posted on Mon 02 June 2014 in blog + + • Tagged with + Debian, Linux +

+
+
+

ディスプレイの輝度が高すぎて目が痛いので、輝度を下げたい。
+GUIでやっても良いけど、CLIの方が簡単そうだったので、CLIでやってみることにした。

+

環境

+
    +
  • PC: ASUS 24A
  • +
  • OS: Linux(Debian sid amd64)
  • +
+

調整可能な範囲

+
  cat /sys/class/backlight/intel_backlight/max_brightness
+
+ +

ディスプレイの明るさ変更

+
  # 明るさを800にするとき
+  echo 800 | sudo tee /sys/class/backlight/intel_backlight/brightness
+
+
+
+
+
+
+

実UID, 実行UID

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + linux +

+
+
+

プロセスはいくつかのIDを持っている。 +あまり深く考えず、実UIDと実行UIDについて考える。

+
+

実UID(UID)

+
    +
  • 呼び出し元のプロセス(親プロセス)の実ユーザーID。
  • +
  • 普通にログインして、何かプロセスをシェルから走らせる場合、ログインシェルのUIDがログインユーザーIDなので、ログインユーザーIDになる。
  • +
+
+
+

実効UID

+
    +
  • 呼び出し元のプロセス(親プロセス)の実効ユーザーID …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/lun-wen.html b/tag/lun-wen.html new file mode 100644 index 00000000..1c3308e7 --- /dev/null +++ b/tag/lun-wen.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 論文 + + + + +
+ + + + + + +
+
+

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + + • Tagged with + Algorithm, papers, 論文 +

+
+
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノー …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/marketing.html b/tag/marketing.html new file mode 100644 index 00000000..7ab69ca5 --- /dev/null +++ b/tag/marketing.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag marketing + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/math.html b/tag/math.html new file mode 100644 index 00000000..d63a24d1 --- /dev/null +++ b/tag/math.html @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag math + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/mesos.html b/tag/mesos.html new file mode 100644 index 00000000..c19df24d --- /dev/null +++ b/tag/mesos.html @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag mesos + + + + +
+ + + + + +
+
+

Mesos の sandbox のログローテーションをする

+

+ Posted on Fri 01 December 2017 in blog + + • Tagged with + mesos, docker +

+
+
+
+

結論

+
    +
  • http://mesos.apache.org/documentation/latest/logging/#logrotatecontainerlogger
  • +
  • LogrotateContainerLogger を使って、 module parameter を設定する
  • +
+

概要

+

Mesos + Marathon 環境でdockerを動かしている。
+基本的にコンテナのログは fluentd で飛ばしているのだけど、日に日に mesos slave のディスク容量が圧迫されていた。
+調べてみると、 /var/lib/mesos-slave/slaves/ 以下にあるフォルダのうち、sandbox のログが肥大化していた。
+sandbox には stdout, stderr があって、それぞれコンテナのstdout, stderrを記録しているファイルで、mesosか …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/mian-qiang-hui.html b/tag/mian-qiang-hui.html new file mode 100644 index 00000000..4895cfb2 --- /dev/null +++ b/tag/mian-qiang-hui.html @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 勉強会 + + + + +
+ + + + + +
+
+

Hatena Engineer Seminar #4に行ってきました

+

+ Posted on Mon 09 February 2015 in blog + + • Tagged with + 勉強会 +

+
+
+
+

Intro

+

タイトルどおり、行ってきました。
+目当ては、mackerelの話だったんですが、思ったより他の話も面白かったです。
+今回は抽選だったし、参加できなかった人のためにも、メモと感想を書いておきます。
+序盤の話はTwitterでつぶやいているので、参考までに。(後半はPCの電源が死んだのでないです)

+

資料は見つけたら追加します。

+

開会の挨拶

+

はてなの東京オフィスが増床 …

+
+ + Continue reading + +
+
+
+
+
+

CROSS 2015のアンカンファレンスで話しました

+

+ Posted on Sat 31 January 2015 in blog + + • Tagged with + 勉強会, 脆弱性 +

+
+
+

CROSS 2015のアンカンファレンスで脆弱性の評価って困る、話をしました。
+スタッフやりつつ、当日資料作りもやったので、あまり資料としての完成度はないです。
+たぶんプレゼン作成時間30分くらい。

+ + +

書いてある通りなのだけど、脆弱性とかセキュリティの話は、リスクが無限大に評価されがちに見えるのをどうにかしたい。
+自分自身は何か情報系の教育を受 …

+
+ + Continue reading + +
+
+
+
+
+

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + + • Tagged with + CROSS, 勉強会, 運営 +

+
+
+
+

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/microsoft.html b/tag/microsoft.html new file mode 100644 index 00000000..4bd6fb54 --- /dev/null +++ b/tag/microsoft.html @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Microsoft + + + + +
+ + + + + +
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/mobile.html b/tag/mobile.html new file mode 100644 index 00000000..79f1766f --- /dev/null +++ b/tag/mobile.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag mobile + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/mscs.html b/tag/mscs.html new file mode 100644 index 00000000..65afbaea --- /dev/null +++ b/tag/mscs.html @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag MSCS + + + + +
+ + + + + +
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/network.html b/tag/network.html new file mode 100644 index 00000000..a9cb9451 --- /dev/null +++ b/tag/network.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag network + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/nifty.html b/tag/nifty.html new file mode 100644 index 00000000..fcf79cd7 --- /dev/null +++ b/tag/nifty.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag NIFTY + + + + +
+ + + + + +
+
+

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + + • Tagged with + vyos, YAMAHA, NIFTY +

+
+
+
+

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/npiv.html b/tag/npiv.html new file mode 100644 index 00000000..c6d772e1 --- /dev/null +++ b/tag/npiv.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag NPIV + + + + +
+ + + + + +
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+ +
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/nsx.html b/tag/nsx.html new file mode 100644 index 00000000..e844891a --- /dev/null +++ b/tag/nsx.html @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag NSX + + + + +
+ + + + + +
+
+

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読 …

+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/openapi.html b/tag/openapi.html new file mode 100644 index 00000000..77c6f284 --- /dev/null +++ b/tag/openapi.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag openapi + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/package.html b/tag/package.html new file mode 100644 index 00000000..848a3a45 --- /dev/null +++ b/tag/package.html @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag package + + + + +
+ + + + + +
+
+

もともとgitで管理されているアプリケーションをdebパッケージにしたいというメモ

+

+ Posted on Mon 11 July 2016 in blog + + • Tagged with + debian, deb, package, apt +

+
+
+
+

はじめに

+

debパッケージを作る経験が少ないので、あまり良い方法ではないかもしれない。

+

サンプル

+

https://github.com/hitsumabushi/hub

+

手順

+
# install
+sudo apt install fakeroot
+
+# tag, release をきれいにする
+git tag -l > tag_list
+for x in $(cat tag_list); do git push origin :$x ; done
+
+# 色々リポジトリを整理した後、空っぽの masterを作る
+git checkout --orphan master
+
+# 自前で control, copyright ファイルを書く
+# アップストリームのものを持ってくる
+# 参考: https://github.com/bcandrea/consul-deb/tree/debian/debian
+fakeroot dpkg-deb --build pkg tmp
+
+# 生成 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/paper.html b/tag/paper.html new file mode 100644 index 00000000..6a5ab69d --- /dev/null +++ b/tag/paper.html @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Paper + + + + +
+ + + + + +
+
+

[論文]Janus: Optimal Flash Provisioning for Cloud Storage Workloads

+

+ Posted on Thu 17 July 2014 in blog + + • Tagged with + Paper +

+
+
+
+

読んだもの

+

http://research.google.com/pubs/pub41179.html

+

主な内容

+
    +
  • 『2種類の異なるストレージ(フラッシュとディスク)を複数のワークロードで共用する』効率的な使い方を最適化問題への帰着
    + 使い方に2つの戦略があって、『FIFO or LRU』。
  • +
  • LRUの方がキャッシュヒットレート的には良いけど、メトリクスを取るのが複雑になりがちなので、FIFOで良いのでは。
  • +
  • 実システムでの計測結果
  • +
+

使われて …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/papers.html b/tag/papers.html new file mode 100644 index 00000000..d49d2463 --- /dev/null +++ b/tag/papers.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag papers + + + + +
+ + + + + + +
+
+

Consistent Algorithm

+

+ Posted on Sun 01 February 2015 in blog + + • Tagged with + Algorithm, papers, 論文 +

+
+
+

Consistent Hash Algorithmという負荷分散などの目的で使えるアルゴリズムがある。
+たまたまarxivでシンプルで高速, 省メモリな実装についての論文を見つけたので、読んだ。

+

読んだ内容

+

pandoc+beamerを試してみるついでに、スライドにまとめた。

+ + +

疑問点

+
    +
  1. 論文では、キャッシュとしては使いづらい、という趣旨のことが書かれている。ノードのIDをかぶらせてもたせるだけではダメ?
  2. +
  3. ノー …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/peco.html b/tag/peco.html new file mode 100644 index 00000000..f67c87be --- /dev/null +++ b/tag/peco.html @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag peco + + + + +
+ + + + + +
+
+

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + + • Tagged with + sakura, terraform, peco +

+
+
+
+

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/pelican.html b/tag/pelican.html new file mode 100644 index 00000000..6a77291f --- /dev/null +++ b/tag/pelican.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag pelican + + + + +
+ + + + + +
+
+

drone.ioを使って、pelicanをビルドする

+

+ Posted on Mon 15 December 2014 in blog + + • Tagged with + CI, drone.io, pelican +

+
+
+

動機

+

最近はWordpressでブログをやっていたけど、
+あくまで Wordpressを使う人の気持ちがわかりたかったので、使ってたのでした。
+そろそろ、Wordpressの便利さもわかってきたし、vimとかemacsから書きやすいものを使いたいなー、と思ってました。

+

そこでpelicanですよ。

+

OctpressとかSphinxとかで書いても良いんですが、なんとなく微妙な修正だったり、追加のプラグインが必要だったので、気分が …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/perl.html b/tag/perl.html new file mode 100644 index 00000000..33a98965 --- /dev/null +++ b/tag/perl.html @@ -0,0 +1,383 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag perl + + + + +
+ + + + + +
+
+

Perl の正規表現

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

マッチ演算子

+

評価の結果は真偽値としては、マッチすれば真、そうでなければ偽。 +and, or, ! が役立つのは間違いない。

+
+

$_ にマッチさせる

+
/regex/
+m:regex:
+
+
+
+

string にマッチさせる

+
string =~ /regex/
+string =~ m:regex:
+
+
+
+

$_ の文字列置換

+
s/regex/new/
+s:regex:new:
+
+
+
+

string の文字列置換

+
string =~ s/regex/new/
+string =~ s:regex:new:
+
+
+
+
+

特殊なメタキャラクタ

+
+

^, $

+
    +
  • 行頭、末尾にマッチ
  • +
+
+
+

.

+
    +
  • ニューライン以外の任意の文字にマッチ
  • +
+
+
+

[chars]

+
    +
  • chars に含まれる任意の1文字にマッチ …
+
+ + Continue reading + +
+
+
+
+
+

Perlスクリプトメモ

+

+ Posted on Tue 07 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考文献

+
    +
  1. Perl基礎文法最速マスター
  2. +
  3. ミニマル perl
  4. +
+
+
+

スクリプトを書く時

+
    +
  • プラグマ +
  • +
  • 推奨 : スクリプト先頭に書く
  • +
+
use strict;
+use warnings;
+
+
    +
  • 1文字でも減らしたい

    +
    +
      +
    • print のデフォルト引数は、 $_
    • +
    • print $_; したいだけなら書く必要ない。
    • +
    +
    +
  • +
+
+
+

用語

+
+

レコード

+
    +
  • 1つのまとまりとして読み書きされる文字の集合
  • +
  • 入出力の際、ファイルはレコードの集まりと見ることができる。 +この時、デフォルトでは …
+
+ + Continue reading + +
+
+
+
+
+

便利なツール

+

+ Posted on Thu 02 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

POD

+
    +
  • Plain Old Documentation
  • +
  • man perldoc を参照
  • +
+
+
+

lwp-request

+
    +
  • Webサーバーにリクエストを送って、適当な形式に変換してくれる
  • +
  • GET, POST, PUT も選べる。
  • +
  • 出力形式としては、 text, ps, links, html, dump
  • +
+
lwp-request -o text www.example.com
+
+
+
+

Text::Autoformat

+
+
+

Text::Tabs

+
    +
  • タブをスペースに変換
  • +
+
+
+

String::Approx

+
    +
  • あいまいなマッチをする
  • +
+
+
+

Template-Toolkit

+
+
+

Lingua::En::Inflect 'PL_N'

+
    +
  • 単数形と複数形を変換してくれる
  • +
+
+
+
+
+
+
+
+

Perl のコンパイラオプション

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + perl +

+
+
+
+

参考ページ

+ +
+
+

基本的なオプション

+
+

-e

+
    +
  • ワンライナーを書くために必須。
  • +
  • 複数並べられるので、それなりに色々書ける
  • +
  • 直後にperlプログラムを書ける。
  • +
+
perl -e 'print 11/2'
+
+
+
+

-l[8進数]

+
    +
  • 行末に指定された8進数に変える。-l のみの場合、改行になる。
  • +
+
perl -e 'print 22'       #=> 22
+perl -l -e 'print 22'    #=> 22\n
+perl -l101 -e 'print 22' #=> 22A
+
+
+
+

-0[digits]

+
    +
  • -l の入力セパレータバージョン

    +
  • +
  • -00 とすれば、空行を区切 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/preseed.html b/tag/preseed.html new file mode 100644 index 00000000..3ea571d6 --- /dev/null +++ b/tag/preseed.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag preseed + + + + +
+ + + + + +
+
+

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + pxe, preseed, kickstart +

+
+
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/provisioning.html b/tag/provisioning.html new file mode 100644 index 00000000..78074a6e --- /dev/null +++ b/tag/provisioning.html @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag provisioning + + + + +
+ + + + + +
+
+

Consul 使ってみる

+

+ Posted on Sat 01 November 2014 in blog + + • Tagged with + consul, provisioning, cluster +

+
+
+
+

Consul とは

+
+

特徴

+
    +
  • Service Discovery

    +
    +
      +
    • Consulのクライアントは、"api"や"mysql"といった与えられた名前を持つサービスを提供
    • +
    • 他のクライアントは、Consulを使ってサービスを検出
    • +
    • アプリケーションはConsulが検出したサービスを、DNSやHTTP経由で検出
    • +
    +
    +
  • +
  • Health Check

    +
    +
      +
    • 多くのヘルスチェックの提供
    • +
    • 実行されているサービスやノード上の情報などと連携
    • +
    • この情報を元に、クラスターの状態を監視
    • +
    • サービス …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/pxe.html b/tag/pxe.html new file mode 100644 index 00000000..cb8fad2b --- /dev/null +++ b/tag/pxe.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag pxe + + + + +
+ + + + + +
+
+

PXEブートでインストーラを起動する

+

+ Posted on Wed 01 January 2014 in blog + + • Tagged with + pxe, preseed, kickstart +

+
+
+
+
最近、VMwareのESXiで仮想環境を作っています。
+
触っていて気づいたのですが、空の仮想マシンを起動するとPXEブートを試みてくれます。
+
この仕様をうまく使いたいなーと思って、PXEブートでインストールを自動化する方法を調べました。
+
+
+
PXEブートしてインストールを自動化するまでの手順を簡単に書いていきます。
+
Debianをインストールサーバーとして予め立 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/pypi.html b/tag/pypi.html new file mode 100644 index 00000000..8a30ffaf --- /dev/null +++ b/tag/pypi.html @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag pypi + + + + +
+ + + + + +
+
+

PyPIへパッケージをアップロードする

+

+ Posted on Thu 05 April 2018 in blog + + • Tagged with + pypi, python +

+
+
+
+

資料

+
    +
  • パッケージ構成については github.com/pypa/sampleproject
  • +
  • https://pypi.python.org/pypi/twine
  • +
  • https://packaging.python.org/tutorials/distributing-packages/
  • +
+

手順

+

PyPIへユーザー登録する

+

PyPI には普段使われている本番環境とは別に、テスト環境がある。
+アカウントがそれぞれ独立しているので、両方で作成する必要がある。

+ +

.pypirc の作成

+

以下のように ~/.pypirc を作成して、test 環境を利用できるようにしておく。
+平分でパスワードを書くことになる …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/python.html b/tag/python.html new file mode 100644 index 00000000..08cec87d --- /dev/null +++ b/tag/python.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag python + + + + +
+ + + + + +
+
+

Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった

+

+ Posted on Tue 12 February 2019 in blog + + • Tagged with + python, yaml +

+
+
+
+

資料

+ +

背景

+

とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。
+sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。

+
    +
  • コメントは消したくない
  • +
  • ブロックスタイルのままにしたい
  • +
  • diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)
  • +
+

ruamel.yaml

+

python で yaml を扱うときは …

+
+ + Continue reading + +
+
+
+
+
+

PyPIへパッケージをアップロードする

+

+ Posted on Thu 05 April 2018 in blog + + • Tagged with + pypi, python +

+
+
+
+

資料

+
    +
  • パッケージ構成については github.com/pypa/sampleproject
  • +
  • https://pypi.python.org/pypi/twine
  • +
  • https://packaging.python.org/tutorials/distributing-packages/
  • +
+

手順

+

PyPIへユーザー登録する

+

PyPI には普段使われている本番環境とは別に、テスト環境がある。
+アカウントがそれぞれ独立しているので、両方で作成する必要がある。

+ +

.pypirc の作成

+

以下のように ~/.pypirc を作成して、test 環境を利用できるようにしておく。
+平分でパスワードを書くことになる …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ravello.html b/tag/ravello.html new file mode 100644 index 00000000..87b46d60 --- /dev/null +++ b/tag/ravello.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag ravello + + + + +
+ + + + + +
+
+

Ravelloが便利

+

+ Posted on Sat 09 May 2015 in blog + + • Tagged with + ravello, VMware +

+
+
+
+

VMware環境のテストをしたい

+

会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。
+今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。
+あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、という …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/ruby.html b/tag/ruby.html new file mode 100644 index 00000000..707b7e04 --- /dev/null +++ b/tag/ruby.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Ruby + + + + +
+ + + + + +
+
+

fluentd-plugin-secure-forward のソースを読んでみる(Input プラグイン編)

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + Ruby, Fluentd +

+
+
+

本当は全部読もうと思っていたけど、想像以上に疲れたので、Inputだけにしました。
+ただ、整理されているコードなので、Ruby知らなくても読みやすいのは読みやすいと思います。

+ +

基本情報

+
    +
  1. +

    lib/fluent/plugin/{TYPE}_{NAME}.rb 以下がプラグインの本体。

    +
      +
    • TYPE : in, out, buf,... etc
    • +
    • NAME : プラグインの名前
    • +
    +
  2. +
  3. +

    pluginを書く時のお約束

    +
      +
    • Input(Output)プラグインは、module Fluentd内でInput(Output)プラグインを継承してクラスを定義する
    • +
    • 設 …
+
+ + Continue reading + +
+
+
+
+
+

ソースコードリーディングをするときにctagsを使いたい

+

+ Posted on Tue 16 December 2014 in blog + + • Tagged with + Emacs, Ruby +

+
+
+

きっかけ

+

とある事情によって、Fluentdプラグインを自作する or 世間の良い実装のプラグインを見つける必要がありました。
+でも、Fluentdを真面目に使ったことがないので、いまいち眺めていても難しいなー、と思っていました。
+そもそも、Rubyもまともに書いていないため、ソースを見ても、Rubyのものなのか、Fluentdで定義されているのかが、
+ぱっと見でわからず、いちいち時 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/runc.html b/tag/runc.html new file mode 100644 index 00000000..cbabe026 --- /dev/null +++ b/tag/runc.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag runc + + + + +
+ + + + + +
+
+

runCをDebianで実行する

+

+ Posted on Tue 23 June 2015 in blog + + • Tagged with + runc, debian +

+
+
+

opencontainers/runc を実行してみようとしたところ、コンパイルまではすぐできるのに、実行するとエラーが出て困ったので、対処方法を書いておく。

+ +

runCのインストール

+

golang的に普通の場所に置いてビルドすると良い。git clone の代わりに go getでも良い。

+
git clone https://github.com/opencontainers/runc $GOPATH/src/github.com/opencontainers/runc
+cd $GOPATH/src/github.com/opencontainers/runc/
+make
+sudo make install
+
+

状況

+

ディレクトリ構成

+
.
+├── container.json (とりあえず、runc spec で生成されるもので …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/rust.html b/tag/rust.html new file mode 100644 index 00000000..64fec00a --- /dev/null +++ b/tag/rust.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag rust + + + + +
+ + + + + +
+
+

Rust を始めるための設定

+

+ Posted on Tue 07 February 2017 in blog + + • Tagged with + rust, vim +

+
+
+
+

rust のインストール

+

公式からインストールのためのスクリプトが提供されている。
+これを使うと、rustup というrustのマネージャが使えるようになって、
+rustc のバージョンアップや切替なんかができるらしい。

+
## rustup のインストール
+curl https://sh.rustup.rs -sSf | sh
+
+## これを .zshrc などに加える
+source ${HOME}/.cargo/env
+
+

rust のツールのインストール

+

cargo というので、いろんなライブラリとかツールをダウン …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/s3.html b/tag/s3.html new file mode 100644 index 00000000..17fe0f82 --- /dev/null +++ b/tag/s3.html @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag s3 + + + + +
+ + + + + +
+
+

s3で自前 Debian Package リポジトリを作る

+

+ Posted on Sun 10 July 2016 in blog + + • Tagged with + debian, apt, s3 +

+
+
+
+

この記事でやること

+
    +
  • aptly の初歩的な使い方
  • +
  • aptly を使ってs3へ自前リポジトリを公開する。
  • +
+

自前パッケージの作成については、書かないです。

+

自前 Debian Package リポジトリ

+

なぜ自前のリポジトリが欲しいかというと、個人的には以下の3つくらいかと思います。

+
    +
  • カジュアルにパッチを当てて、サーバに適用したい
  • +
  • 必要なパッケージをフリーズしたいが全てのサーバ …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/sakrua.html b/tag/sakrua.html new file mode 100644 index 00000000..ac2a04ed --- /dev/null +++ b/tag/sakrua.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag sakrua + + + + +
+ + + + + +
+
+

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + + • Tagged with + sakrua, ansible, terraform +

+
+
+
+
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果と …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/sakura.html b/tag/sakura.html new file mode 100644 index 00000000..6976f0bf --- /dev/null +++ b/tag/sakura.html @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag sakura + + + + +
+ + + + + +
+
+

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + + • Tagged with + sakura, terraform, peco +

+
+
+
+

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/sample.html b/tag/sample.html new file mode 100644 index 00000000..6c1d1b3b --- /dev/null +++ b/tag/sample.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag sample + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/security.html b/tag/security.html new file mode 100644 index 00000000..b47cdac5 --- /dev/null +++ b/tag/security.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag security + + + + +
+ + + + + +
+
+

Twitterからメールアドレス拾えるんじゃね?的な攻撃について

+

+ Posted on Fri 26 June 2015 in blog + + • Tagged with + security +

+
+
+

任意のTwitterアカウントの登録メールアドレス(伏せ字含)を表示させる攻撃が急増中(対策設定有り) というエントリが盛り上がっていたらしい。(とてもシェアされている)
+ただ、自分には有用な攻撃シナリオには見えなかったので、考えを整理するために書いておきます。
+自分はセキュリティ素人なので、間違った考察かもしれません。

+ +

リンク先ブログの主張 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/slack.html b/tag/slack.html new file mode 100644 index 00000000..f04fc1db --- /dev/null +++ b/tag/slack.html @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag slack + + + + +
+ + + + + +
+
+

会社にslack入ったので、色々やってた

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + slack, hubot +

+
+
+
+

勤務先の会社に今日(2016/06/16)から真面目にSlackが導入されたので、やった設定をメモしておく。

+

現在のチャンネル構成

+
    +
  • 定常系
      +
    • 分報用のチャンネル。個々人が作る
    • +
    • 部署用
    • +
    • チーム用
    • +
    • プロジェクト用
    • +
    +
  • +
  • 雑多な情報共有用
      +
    • ニュース用
    • +
    +
  • +
  • トラブル用
  • +
  • その他
      +
    • 臨時に必要になるとか
    • +
    • テストとか
    • +
    +
  • +
+

やったことメモ

+

RSS を Slack に移行

+

live dwango reader をずっと使っていたのだけど、更新頻度が …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/snappy.html b/tag/snappy.html new file mode 100644 index 00000000..75f9d8de --- /dev/null +++ b/tag/snappy.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag snappy + + + + +
+ + + + + +
+
+

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + + • Tagged with + debian, snappy, zsh +

+
+
+
+

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バ …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/storage.html b/tag/storage.html new file mode 100644 index 00000000..43827b9b --- /dev/null +++ b/tag/storage.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag Storage + + + + +
+ + + + + +
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+ +
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/swagger.html b/tag/swagger.html new file mode 100644 index 00000000..04ed62cd --- /dev/null +++ b/tag/swagger.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag swagger + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/swift.html b/tag/swift.html new file mode 100644 index 00000000..333dcc80 --- /dev/null +++ b/tag/swift.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag swift + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/sysprep.html b/tag/sysprep.html new file mode 100644 index 00000000..828b50ee --- /dev/null +++ b/tag/sysprep.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag sysprep + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/tdd.html b/tag/tdd.html new file mode 100644 index 00000000..05290ef9 --- /dev/null +++ b/tag/tdd.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag tdd + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/teaming.html b/tag/teaming.html new file mode 100644 index 00000000..71fec091 --- /dev/null +++ b/tag/teaming.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag teaming + + + + +
+ + + + + +
+
+

チーム活動で失敗したことの振り返り

+

+ Posted on Thu 15 December 2016 in blog + + • Tagged with + teaming +

+
+
+
+
+

これは、 NIFTY Advent Calendar 2016 の15日目です。

+

@plan0213 さんの 『ネットワーク機器へのコマンド入力自動化』でした。
+ネットワークインフラエンジニアが大好きな話でしたね。

+

はじめに

+

今日の記事ですが、私が社内でやっていたチーム活動について振り返りを書きます。
+特に、失敗した点に注目して共有することで役に立てばと思っています。
+大前提としては、私は一般社員であ …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/terraform.html b/tag/terraform.html new file mode 100644 index 00000000..1fbefb59 --- /dev/null +++ b/tag/terraform.html @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag terraform + + + + +
+ + + + + +
+
+

さくらのクラウドでN百台を管理するためにterraformとansibleを使っている話

+

+ Posted on Tue 05 December 2017 in blog + + • Tagged with + sakrua, ansible, terraform +

+
+
+
+
+

これは、さくらインターネット Advent Calendar 2017 として書いた記事 です。

+
+

さくらインターネットでは、今年4月からIoTプラットフォームの sakura.io をサービス提供しています。
+sakura.io は、さくらのクラウド上で本番・検証環境を構築しており、数百台のサーバーを利用しています。

+

私はリリース直前にチームに参加し、開発の傍ら運用改善活動をしていました。
+その結果と …

+
+ + Continue reading + +
+
+
+
+
+

さくらのクラウドを便利に使うためのツールメモ

+

+ Posted on Mon 10 July 2017 in blog + + • Tagged with + sakura, terraform, peco +

+
+
+
+

1. CLIで操作したい

+

usacloud が今一番良い。
+非公式と書かれているが、サポートされている機能、更新頻度、使い勝手、導入のしやすさ、などどれをとっても usacloud を使うべき。

+

https://sacloud.github.io/usacloud/

+

便利なコマンド

+

〇〇の一覧が欲しい

+

〇〇 list すれば良い。例えば、以下の通り。

+
## サーバー
+usacloud server list
+## スイッチ
+usacloud switch list
+
+

サーバーのメンテナンス情報を知りたい

+
usacloud server maintenance-info
+
+

サーバーにSSHしたい

+
usacloud server ssh -l username example …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/test-kitchen.html b/tag/test-kitchen.html new file mode 100644 index 00000000..9fc982c6 --- /dev/null +++ b/tag/test-kitchen.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag test-kitchen + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/test.html b/tag/test.html new file mode 100644 index 00000000..dfb736b9 --- /dev/null +++ b/tag/test.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag test + + + + +
+ + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/tex.html b/tag/tex.html new file mode 100644 index 00000000..0a87dd8e --- /dev/null +++ b/tag/tex.html @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag tex + + + + +
+ + + + + +
+
+

DebianでLuaJITTeXを使いたい

+

+ Posted on Wed 31 October 2018 in blog + + • Tagged with + tex, debian +

+
+
+
+

そろそろLuaTex使ってみたいなと思ったところ、LuaJITTeXの方が早い場合があるということで、試してみようと思った。

+

参考

+ +

未解決の問題

+
    +
  • /var/lib/texmf/fmtutil.cnf-TEXLIVEDIST が自動生成されている、とコメントされているが、元ファイルがわからない
  • +
+
### This file was automatically generated by update-fmtutil.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/travis-ci.html b/tag/travis-ci.html new file mode 100644 index 00000000..6ac7c053 --- /dev/null +++ b/tag/travis-ci.html @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag travis-ci + + + + +
+ + + + + +
+
+

Travis CIで git submodule update --init --recursive を止める

+

+ Posted on Tue 17 October 2017 in blog + + • Tagged with + git, travis-ci +

+
+
+
+

結論

+ +
git:
+  submodule: false
+
+
    +
  • 個別に git submodule update --init hoge していくとき、ビルドのトップディレクトリに戻りたくなることがある。この場合には、 $TRAVIS_BUILD_DIR を使えば良い。
  • +
+

経緯

+

久しぶりにこのブログを書いたらビルドに失敗していた。
+原因としては、このブログで利用している getpelican/pelican-plugins のsubmoduleの設定によって、
+取得で …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/travis.html b/tag/travis.html new file mode 100644 index 00000000..cace0c2b --- /dev/null +++ b/tag/travis.html @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag travis + + + + +
+ + + + + +
+
+

Travis コマンドでのエラー

+

+ Posted on Sat 02 January 2016 in blog + + • Tagged with + travis +

+
+
+
+

Travis CIでCIする素振りをしていたら、最新版のtravisコマンドでエラーが出るようになった。

+

発生した問題

+
$ travis setup releases
+Invalid scheme format: git@github.com
+for a full error report, run travis report
+
+

問題の解析

+

こういう時には、

+
$ travis report
+
+

をして、スタックトレースを見るものらしい。

+
$ travis report
+System
+Ruby:                     Ruby 2.3.0-p0
+Operating System:         Mac OS X 10.11.2
+RubyGems:                 RubyGems 2.5.1
+
+CLI
+Version:                  1.8.0
+Plugins:                  none
+Auto-Completion:          yes
+Last Version Check:       2016-01-02 14:54:05 +0900
+
+Session
+API Endpoint:             https://api.travis-ci.org/
+Logged In:                as "<username>"
+Verify SSL:               yes
+Enterprise:               no
+
+Endpoints
+org …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vcp.html b/tag/vcp.html new file mode 100644 index 00000000..77a8f9d9 --- /dev/null +++ b/tag/vcp.html @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag VCP + + + + +
+ + + + + +
+
+

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読 …

+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系 …

+
+ + Continue reading + +
+
+
+
+
+

VCP5-DCV取得した

+

+ Posted on Fri 16 January 2015 in blog + + • Tagged with + VMware, VCP +

+
+
+

最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。
+VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。

+ +

VCPトレーニングと試験内容のギャップ

+

トレーニングを受講しても、おそらく言われると思いますが、
+VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたこと …

+
+ + Continue reading + +
+
+
+
+
+

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + + • Tagged with + VMware, VCP, vDS +

+
+
+
+

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バイン …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+
+
+
+

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, VDP +

+
+
+
+

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる …
+
+ + Continue reading + +
+
+
+
+
+

VCPの学習中のメモ

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VCP, VMware +

+
+
+

項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。
+特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。

+ +

VMware Data Recovery

+

資料

+ +

概要

+

デプロイ

+

OVF形式で提供されているので、OVF deployします。

+

動作

+

VMware vStorage API for Data Protectionを使って、バックアップを …

+
+ + Continue reading + +
+
+
+
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+ +
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vcp2.html b/tag/vcp2.html new file mode 100644 index 00000000..db58b631 --- /dev/null +++ b/tag/vcp2.html @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag VCP + + + + +
+ + + + + +
+
+

VCP-DCVの概要 : VCP550

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

資料

+

VCP-Data Center Virtualization
+受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。

+

VCP-DCVの概要

+

バージョン

+

VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。
+例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。

+

さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバ …

+
+ + Continue reading + +
+
+
+
+
+

VMware 環境でのMACアドレス割当て

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

1. まとめ

+

vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、

+
    +
  1. vCenter環境でプレフィックス指定
  2. +
  3. 固定割当て
  4. +
+

といった方法を使いましょう

+

2. MACアドレスの割当て方式

+
    +
  1. vCenterによる自動割当て
      +
    1. VMware OUI
    2. +
    3. プレフィックスベース
    4. +
    5. 範囲ベース
    6. +
    +
  2. +
  3. vCenterに接続されていないESXiによる自動割当て
  4. +
  5. 手動での割当て
  6. +
+

vCenterによる自動割当て

+

設定の …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vdi.html b/tag/vdi.html new file mode 100644 index 00000000..cb263c14 --- /dev/null +++ b/tag/vdi.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag VDI + + + + +
+ + + + + +
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vdp.html b/tag/vdp.html new file mode 100644 index 00000000..dd919527 --- /dev/null +++ b/tag/vdp.html @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag VDP + + + + +
+ + + + + +
+
+

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, VDP +

+
+
+
+

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vds.html b/tag/vds.html new file mode 100644 index 00000000..998ace4b --- /dev/null +++ b/tag/vds.html @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vDS + + + + +
+ + + + + +
+
+

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + + • Tagged with + VMware, VCP, vDS +

+
+
+
+

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バイン …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vim.html b/tag/vim.html new file mode 100644 index 00000000..3cdc6dee --- /dev/null +++ b/tag/vim.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vim + + + + +
+ + + + + +
+
+

Rust を始めるための設定

+

+ Posted on Tue 07 February 2017 in blog + + • Tagged with + rust, vim +

+
+
+
+

rust のインストール

+

公式からインストールのためのスクリプトが提供されている。
+これを使うと、rustup というrustのマネージャが使えるようになって、
+rustc のバージョンアップや切替なんかができるらしい。

+
## rustup のインストール
+curl https://sh.rustup.rs -sSf | sh
+
+## これを .zshrc などに加える
+source ${HOME}/.cargo/env
+
+

rust のツールのインストール

+

cargo というので、いろんなライブラリとかツールをダウン …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vmware.html b/tag/vmware.html new file mode 100644 index 00000000..5a43b718 --- /dev/null +++ b/tag/vmware.html @@ -0,0 +1,471 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vmware + + + + +
+ + + + + +
+
+

Intel NUC 上に vSphere 6.5 のVSAN環境を作る

+

+ Posted on Fri 13 October 2017 in blog + + • Tagged with + vmware +

+
+
+
+

あまりVMwareを触らなくなってきて、何も見ずにvCenterの設定とかMaximum configurationsとか言えなくなってきたので、VMware周りのことをメモに残しておくことにする。
+ひとまず、自宅のVSAN環境の構築メモ。

+

環境

+

以下の構成のIntel NUC 3台にESXiをインストールして、その上にvCenterを立て、VSAN環境を作る。

+
+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 取得した

+

+ Posted on Sat 09 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

結果

+

462 / 500 (合格点: 300)

+

試験の内容について

+

割と事前に学習した内容が出ていたと感じる。
+VCP-DCV (といっても、VCP5-DCVしか受けたことはない。) と違って、トレーニングの内容と試験内容がきちんと一致しているので、トレーニングのテキストを読 …

+
+ + Continue reading + +
+
+
+
+
+

VCP6-NV 試験勉強メモ 2日目

+

+ Posted on Thu 07 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VCP6-NV 試験勉強メモ

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+ +
+
+
+
+

VMware VCP-NV (VCP6-NV) の試験を今週受けるので、試験について調べる

+

+ Posted on Tue 05 July 2016 in blog + + • Tagged with + VMware, NSX, VCP +

+
+
+
+

VCP6-NV 受験シリーズ

+ +

この記事について

+
    +
  1. 書くこと
      +
    • VCP6-NV の試験要項
    • +
    • VCP6-NV の受験方法
    • +
    +
  2. +
  3. 書かないこと
      +
    • 試験の勉強方法
    • +
    • 試験内容
    • +
    +
  4. +
+

VCP6-NV について

+

VCP-NVは、VMwareのNSXを用いた仮想ネットワーク管理についての試験です。
+他のVCPと同様に、VCA-NV → VCP-NV → VCAP-NV {Design, Deploy} → VCIX-NV → VCDX-NV というような資格体系 …

+
+ + Continue reading + +
+
+
+
+
+

vSphere 6.0 でのHA機能のエンハンスの要点

+

+ Posted on Tue 08 December 2015 in blog + + • Tagged with + VMware, vSphere +

+
+
+
+

まとめ

+
    +
  1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。
  2. +
  3. vCenterは watchdogs によりプロセス落下時には再起動される
  4. +
  5. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある
  6. +
+

資料

+
    +
  1. VMware vSphere 6 のドキュメント
    +
  2. +
  3. http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf
  4. +
  5. vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)
  6. +
+

vSphere 5.5 までの …

+
+ + Continue reading + +
+
+
+
+
+

VDI, DaaS市場を調べてみた

+

+ Posted on Sun 07 June 2015 in blog + + • Tagged with + VDI, DaaS, AWS, Azure, VMware +

+
+
+

最近、vCloud AirがDaaSを出すというのを聞いて、にわかに自分の中でDaaSに興味が出てきた。
+DaaSとかVDIは、必ずActive Directoryの話になるので、気後れしていたのだけど、会社ではWindows使っていることもあって、少しは抵抗もなくなってきたので、良いタイミングだったので、調べてみた。
+とは言っても、まずは世間にどんなものがあるかをしらべてみただけ。

+ +

参考資料

+
+
+ + Continue reading + +
+
+
+
+
+

Ravelloが便利

+

+ Posted on Sat 09 May 2015 in blog + + • Tagged with + ravello, VMware +

+
+
+
+

VMware環境のテストをしたい

+

会社でVMware使っているのもあって、外でAPI叩いたりツールのテストしたいということがよくある。
+今までは自宅でESXiとvCenter立ててやっていたんですが、やっぱりリソース的にVM数を増やしたりできないので、とても困っている。
+あと、PackerとかでVMware用のイメージ作るときに使えるESXiも欲しかったので、どうにかできないかなー、という …

+
+ + Continue reading + +
+
+
+
+
+

vShere Beta Program の注意点

+

+ Posted on Sun 25 January 2015 in blog + + • Tagged with + VMware +

+
+
+

VMware のBetaプログラムの利用について、基本的なルールがあるので、忘れないようにまとめた。
+ここに書いてあることは、オレオレ要約なので、きちんと自分で確認してください。

+

ざっくり言うと、「ここで知ったことは他で話すなよ」ってことでした。

+ +

資料

+ +

利用方法

+

上記ページから"Join Now!"して、規約に同意すれば良い。
+規約は以下の2つあるので、それぞれ同意 …

+
+ + Continue reading + +
+
+
+
+
+

VCP5-DCV取得した

+

+ Posted on Fri 16 January 2015 in blog + + • Tagged with + VMware, VCP +

+
+
+

最近のブログはVMwareの話ばかりだったのですが、やっとVCPを取得してきました。
+VCP-DCVを取得している人はたくさんいるので、個人的に受験した所感を書いておきます。

+ +

VCPトレーニングと試験内容のギャップ

+

トレーニングを受講しても、おそらく言われると思いますが、
+VCP-DCVの試験はトレーニング内容と差が大きいと聞きます。(他のベンダー試験を受けたこと …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vmware2.html b/tag/vmware2.html new file mode 100644 index 00000000..031244ba --- /dev/null +++ b/tag/vmware2.html @@ -0,0 +1,522 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vmware + + + + +
+ + + + + +
+
+

vDSのポートバインドタイプ

+

+ Posted on Sat 10 January 2015 in blog + + • Tagged with + VMware, VCP, vDS +

+
+
+
+

資料

+

VMware KB: ESX/ESXi でのポート バインド タイプの選択

+

ポートバインドタイプとは

+

vNICをvDSに接続するとき、ポートグループのポートがどのようにVMに割り当てられるかを、ポートバインドタイプとして、設定できます。
+バインドのタイプは以下の3つから選択できました。(2つめの動的バインドは、ESXi5.0で廃止。)

+
    +
  1. 静的バインド (Static Binding)
  2. +
  3. 動的バインド (Dynamic Binding)
  4. +
  5. 短期バイン …
+
+ + Continue reading + +
+
+
+
+
+

vSphere 5.5環境でMSCSクラスタを組むときの制約

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, Microsoft, MSCS +

+
+
+
+

資料

+

MSCSのサポート状況

+ +

MSCSとは

+ +

MSCS

+

Microsoft Cluster Serviceのこと。
+MSFC(Microsoft Failover Cluster)と名称が変わっているけど、未だにMSCSと呼ばれる場合もある。

+

複数台について、フェイルオーバー型のクラスタを組める。
+1台だけをマスターにして、他は待機系として構成する。

+

VMware環境での利用

+

クラスタリング一般の注意

+

ク …

+
+ + Continue reading + +
+
+
+
+
+

VMware VDP, VDPA

+

+ Posted on Wed 07 January 2015 in blog + + • Tagged with + VMware, VCP, VDP +

+
+
+
+

VMware Data Protection

+

資料

+ +

概要

+

VMware Data Recoveryの後継みたいなものっぽい。

+

VDRから発展した点としては、以下があある。

+
    +
  1. FLR(File Level Restore) をサポート
  2. +
  3. サポート台数の増加
  4. +
+

ライセンス体系

+
    +
  • VMware Data Protection
  • +
  • VMware Data Protection Advanced
    +の2つあって、いくつか違いがあります。特に、容量について、VMware Data Protectionは2TBまで。
  • +
+

VDPとVDPAの違い

+
    +
  1. dedupストレージの上限拡大(2TBから8TBになる …
+
+ + Continue reading + +
+
+
+
+
+

ESXiをkickstartでインストールする

+

+ Posted on Tue 06 January 2015 in blog + + • Tagged with + VMware, ESXi +

+
+
+

ESXiをPXEブートして自動インストールする方法について、日本語での説明があまりなかったので、メモとして残しておく。

+ +

利用OS

+
    +
  • ESXi 5.5
  • +
  • Debian 7.7 (DHCPサーバー, HTTPサーバーを兼務させる)
  • +
+

DHCP, TFTP, HTTPサーバーの準備

+

必要なソフトウェアのインストール

+
apt-get install tftpd-hpa isc-dhcp-server xinetd apache2
+
+

DHCPサーバーの設定

+

BOOTPでインストールするため、あまり自由度がない。

+
+ +
+
+ + Continue reading + +
+
+
+
+
+

vCloud Airの価格感を調べる

+

+ Posted on Mon 05 January 2015 in blog + + • Tagged with + VMware, クラウド +

+
+
+
+

資料

+ +

vCloud Airとは

+

VMwareが提供している、ハイブリッドクラウドのサービス。

+

特徴として、オンプレでVMware環境を稼働させている場合に、vCloud Connectorを利用することで、
+vSphere Clientのプラグインと統合して操作ができることが挙げられる。

+

日本では、ソフトバンクと提携しているようだ

+

vCloud Air の価格感を調べる

+

大前提として、一般的なクラウドサービスと …

+
+ + Continue reading + +
+
+
+
+
+

VCPの学習中のメモ

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VCP, VMware +

+
+
+

項目分けするほどでもないが、知っておくとVCP受講時に役にたつことをメモしていきます。
+特に、あまり使われていない機能については、調べてないとわからないことが多いと思うので、参考になればと思います。

+ +

VMware Data Recovery

+

資料

+ +

概要

+

デプロイ

+

OVF形式で提供されているので、OVF deployします。

+

動作

+

VMware vStorage API for Data Protectionを使って、バックアップを …

+
+ + Continue reading + +
+
+
+
+
+

VMware環境でのNPIVについて

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP, NPIV, Storage +

+
+ +
+
+
+
+

VCP-DCVの概要 : VCP550

+

+ Posted on Tue 30 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

資料

+

VCP-Data Center Virtualization
+受験を計画されている方は、Exam Blueprints というPDFを一読されることをお勧めします。

+

VCP-DCVの概要

+

バージョン

+

VCP-DCVという資格は、VMwareの製品バージョンに合わせて区別されています。
+例えば、現在のvSphereのバージョンは、5.5が最新バージョンであるため、VCP5-DCV呼ばれています。

+

さらに、試験については注意が必要で、VCP5-DCVという1つの資格に対して、2つのマイナーバ …

+
+ + Continue reading + +
+
+
+
+
+

VMware 環境でのMACアドレス割当て

+

+ Posted on Wed 17 December 2014 in blog + + • Tagged with + VMware, VCP +

+
+
+
+

1. まとめ

+

vSphere環境上のMACアドレス割当の方式は、複数あります。自分のOUIを割当てたい!!、という場合には、

+
    +
  1. vCenter環境でプレフィックス指定
  2. +
  3. 固定割当て
  4. +
+

といった方法を使いましょう

+

2. MACアドレスの割当て方式

+
    +
  1. vCenterによる自動割当て
      +
    1. VMware OUI
    2. +
    3. プレフィックスベース
    4. +
    5. 範囲ベース
    6. +
    +
  2. +
  3. vCenterに接続されていないESXiによる自動割当て
  4. +
  5. 手動での割当て
  6. +
+

vCenterによる自動割当て

+

設定の …

+
+ + Continue reading + +
+
+
+
+
+

vSphere API事始め

+

+ Posted on Thu 14 August 2014 in blog + + • Tagged with + VMware +

+
+
+

リファレンス

+
    +
  • https://www.vmware.com/support/developer/vc-sdk/
  • +
  • https:// "vcenter_ip" /mob/
  • +
+

参考サイト

+
    +
  • http://thinkit.co.jp/story/2010/06/23/1617
  • +
+

Overview

+

Types

+

4つのタイプがある。

+ + + + + + + + + + + + + + + + + + + + + + + + + +
vSphere APIの型普通のプログラミングとの類推
managed object typeプリミティブ型、複合型
data object type抽象データ型
enumerated type定数
Fault type例外型
+

1. Managed object types

+

Managed object typeとは

+

(サーバーサイドのオブジェクトモデルの基本的なデータを担っている。data objectも同じく。)
+managed objectには、大きく2つの種類が …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vpls.html b/tag/vpls.html new file mode 100644 index 00000000..d9d4959b --- /dev/null +++ b/tag/vpls.html @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vpls + + + + +
+ + + + + +
+
+

VPLSについてのメモ

+

+ Posted on Mon 06 January 2014 in blog + + • Tagged with + vpls +

+
+
+
+

What is VPLS

+
    +
  • Virtual Private LAN
  • +
  • MACフレームを、ルーターを含むネットワークを超えて、やり取りするための技術の1つ
  • +
  • +
    MPLSはIPにラベルをつけるが、VPLSはMACにラベルをつけるというイメージ
    +
      +
    • ラベルを使う理由としては、元々、経路計算を高速にしたかったはずだけど、今はそんなに気にしなくて良いっぽい
    • +
    +
    +
    +
  • +
+
+
+

Why VPLS

+

MPLSが便利なのと、同じ。

+
    +
  • VPN
  • +
  • +
    TE(Trafic Engineering)
    +
      +
    • 明示的な経路選択
    • +
    • 回線使用率か …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vsphere.html b/tag/vsphere.html new file mode 100644 index 00000000..b1bed247 --- /dev/null +++ b/tag/vsphere.html @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vSphere + + + + +
+ + + + + +
+
+

vSphere 6.0 でのHA機能のエンハンスの要点

+

+ Posted on Tue 08 December 2015 in blog + + • Tagged with + VMware, vSphere +

+
+
+
+

まとめ

+
    +
  1. vSphere 6からは、ストレージパスが死んだ場合でもHAを設定できるようになった。
  2. +
  3. vCenterは watchdogs によりプロセス落下時には再起動される
  4. +
  5. vCenterの可用性をさらに高めるにはWindows版を利用し、MSCSクラスタを設定する必要がある
  6. +
+

資料

+
    +
  1. VMware vSphere 6 のドキュメント
    +
  2. +
  3. http://www.vmware.com/files/pdf/vsphere/VMW-WP-vSPHR-Whats-New-6-0-PLTFRM.pdf
  4. +
  5. vSphere 5.x および 6.x での永続的なデバイスの損失 (PDL) と全パス ダウン (APD) (2081089)
  6. +
+

vSphere 5.5 までの …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/vyos.html b/tag/vyos.html new file mode 100644 index 00000000..3fa8b283 --- /dev/null +++ b/tag/vyos.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag vyos + + + + +
+ + + + + +
+
+

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + + • Tagged with + vyos, YAMAHA, NIFTY +

+
+
+
+

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/webhdfs.html b/tag/webhdfs.html new file mode 100644 index 00000000..9e718d81 --- /dev/null +++ b/tag/webhdfs.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag WebHDFS + + + + +
+ + + + + +
+
+

WebHDFSで詰まったこと

+

+ Posted on Sun 08 June 2014 in blog + + • Tagged with + Hadoop, WebHDFS +

+
+
+

困っていたこと

+

HDFSでwebhdfsを使うとき、基本的にnamenodeにリクエストを投げればよいが、実データにアクセスするにはdatanodeにアクセスする。
+ただ、使うときにはあんまり気にしなくて良くて、リクエストを投げればリダイレクト先を指定してくれる、らしい。
+しかし、実際にやっているとうまくいかないケースがあった。

+
% LANG=C; curl -i "http://namenode:50070/webhdfs/v1/tmp/client.retry?op=open"
+HTTP/1.1 307 TEMPORARY_REDIRECT …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/windows.html b/tag/windows.html new file mode 100644 index 00000000..1d764a0f --- /dev/null +++ b/tag/windows.html @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag windows + + + + +
+ + + + + +
+
+

Anisble for Windows

+

+ Posted on Thu 16 June 2016 in blog + + • Tagged with + ansible, windows +

+
+
+
+

久しぶりに ansible で windows を操作するので、メモ。
+実行側は Debian Sid でやっているので、apt-get しているところについては、適宜置き換えて欲しい。
+ansibleは2.1.0を使っている。

+

やること

+

以下を anisble で実行する。

+
    +
  1. Windows Update
  2. +
  3. Windows Server 2012 R2 に AD をインストール
  4. +
  5. ADに適当なダミーエントリを突っ込む
  6. +
+

初期設定

+

ansible 実行サーバーの準備

+

winrm経由で実行することになるので、 pywinrm が必要。

+
# pip install ansible pywinrm
+
+

Inventory

+
[windows_server …
+
+ + Continue reading + +
+
+
+
+
+

Windowsの勉強を始めた

+

+ Posted on Mon 15 June 2015 in blog + + • Tagged with + Windows +

+
+
+

人生で初めて、Windowsの勉強を始めた。
+進捗は以下のgithub pagesから確認できる。
+とりあえず、章立てを書いて、内容を徐々に埋めているところ。

+ +

内容の誤りやコメントなどあれば、githubのissueで欲しい。

+
+
+
+
+
+

WindowsをAnsibleで設定する

+

+ Posted on Thu 28 May 2015 in blog + + • Tagged with + Windows, ansible +

+
+
+
+

資料

+

Windows Support — Ansible Documentation

+

マシンの準備

+

ansibleコマンドを実行するマシン

+

ansibleがすでに実行できる状況であれば、

+
pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm
+pip install kerberos # AD accountを使う場合
+
+

とすればOK。

+

Windowsマシン

+

要件

+
    +
  1. WinRM がインストール済み
  2. +
  3. PowerShell version > 3.0
  4. +
  5. 自動的に、Windows 7SP1, Windows Server2008 SP1以降になる
  6. +
  7. Windows Server 2012ははじめからPowershell 4.0がインストールされている
  8. +
+

セットアップ方法

+
    +
  1. Powershell 3.0にアップデートが必要な場合 …
+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/xmonad.html b/tag/xmonad.html new file mode 100644 index 00000000..9085422a --- /dev/null +++ b/tag/xmonad.html @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag xmonad + + + + +
+ + + + + +
+
+

Xmonadの設定

+

+ Posted on Sun 05 April 2015 in blog + + • Tagged with + debian, xmonad +

+
+
+
+

資料

+
    +
  1. http://xmonad.org/documentation.html
  2. +
  3. Archlinux Wiki - Xmonad
  4. +
  5. Xmonad/Config archive/John Goerzen's Configuration
  6. +
  7. Xmonadの設定 1/3 「基本」編 - ナレッジエース
  8. +
+

環境

+

Debian Sid & Xfce4

+

Install and Initial Configure

+

Package install

+
# basic packages
+sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev
+# for adding launcher
+sudo apt-get install dmenu
+# for status bar
+sudo apt-get install xmobar
+# tools
+sudo apt-get install suckless-tools scrot tilda trayer
+
+

Xsession

+
    +
  1. +

    add /usr/share/xsessions/custom.desktop

    +
    [Desktop Entry]
    +Name=Xsession
    +Exec=/etc/X11/Xsession
    +
    +
  2. +
  3. +

    ${HOME}/.xsession

    +
    xmodmap ~/.Xmodmap
    +exec xmonad
    +
    +
  4. +
+

Edit config

+
import XMonad
+
+main = do
+xmonad $ defaultConfig
+
+

Set xmonad as the default window manager

+
$ sudo update-alternatives --config x-window-manager
+
+

デフォルトのキーボードショートカットは、man xmonadで見ることができる。
+とりあえず、Alt + Shift …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/yamaha.html b/tag/yamaha.html new file mode 100644 index 00000000..608d18bc --- /dev/null +++ b/tag/yamaha.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag YAMAHA + + + + +
+ + + + + +
+
+

YAMAHAのネットボランチDNSを使って、ニフティクラウドとVPN接続する

+

+ Posted on Tue 03 May 2016 in blog + + • Tagged with + vyos, YAMAHA, NIFTY +

+
+
+
+

やりたいこと

+

いろいろあって、自宅のグローバルIPv4アドレスが変更される機会があった。
+ニフティクラウド上のルーターとVPN接続しているため、グローバルIPが変更されると、
+いちいち変更されたタイミングでVPN設定を変更する必要があり、非常に面倒くさい。
+そういうわけで、DDNSを使って設定することで、グローバルIPが変更された場合でも設定変更 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/yaml.html b/tag/yaml.html new file mode 100644 index 00000000..1fee3e59 --- /dev/null +++ b/tag/yaml.html @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag yaml + + + + +
+ + + + + +
+
+

Python でコメント付きYAMLを扱う時には ruamel.yaml が便利だった

+

+ Posted on Tue 12 February 2019 in blog + + • Tagged with + python, yaml +

+
+
+
+

資料

+ +

背景

+

とある yamlで書かれたconfigファイル群(数百ファイル)を一括で変更したいことがあった。
+sedで変更するには少し難しかったので、パースしてから条件判定して、書き換えたい。

+
    +
  • コメントは消したくない
  • +
  • ブロックスタイルのままにしたい
  • +
  • diff を最小限にしたい (細かい中身を知らないので、チェックするのが面倒)
  • +
+

ruamel.yaml

+

python で yaml を扱うときは …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/you-bi.html b/tag/you-bi.html new file mode 100644 index 00000000..665f02c6 --- /dev/null +++ b/tag/you-bi.html @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 遊び + + + + +
+ + + + + +
+
+

Easter Egg Collections

+

+ Posted on Sat 07 February 2015 in blog + + • Tagged with + 遊び +

+
+
+

イースターエッグは、見つかるとよく話題に上がっているけど、
+実際にどんなものがあるのか、よく知らないなー、と思ったので集めようと思う。
+ただ、調べてみると、昔あったものがなくなってたりして、このリストも最新状態に保つ必要があるので、なくなってたら教えてほしいです。

+

とりあえずは、いろいろ見つけるたびに徐々に更新していきたいと思い …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/yun-ying.html b/tag/yun-ying.html new file mode 100644 index 00000000..43824650 --- /dev/null +++ b/tag/yun-ying.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag 運営 + + + + +
+ + + + + +
+
+

CROSS2015の運営をしたので、やったこととわかったことを書いておく

+

+ Posted on Fri 30 January 2015 in blog + + • Tagged with + CROSS, 勉強会, 運営 +

+
+
+
+

わかったことざっくり

+
    +
  • 大規模イベントは、全体を把握している人はいない、という気持ちを持つことが大事。(実際いない)
  • +
  • 直前に言われたときほど、利害がはっきりしているので、お互いにメリットがありそうな道を出しやすいので、出す
  • +
  • 実行委員長(山口さんという方)すげー。よくわからんけど、強力してくれる人を探してくる。
  • +
+

経緯

+

2015年の1/29に大さん橋 …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tag/zsh.html b/tag/zsh.html new file mode 100644 index 00000000..b1301c26 --- /dev/null +++ b/tag/zsh.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tag zsh + + + + +
+ + + + + +
+
+

Debian でログインシェルをzshにしている人が snappy を使う場合の注意

+

+ Posted on Wed 11 April 2018 in blog + + • Tagged with + debian, snappy, zsh +

+
+
+
+

Snappy について

+ +

Canonical が主導しているパッケージシステムで、Universal Linux Package と銘打つように、ポータブルなパッケージングができそうな感じ。
+ポータビリティを上げるために、dockerみたいな感じで、依存ライブラリも全部パッケージに含めてしまうスタイルなので、多少debパッケージよりは大きくなる。
+その分、sidを使っているとよく起きる、共通ライブラリの依存バ …

+
+ + Continue reading + +
+
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/tags.html b/tags.html new file mode 100644 index 00000000..decae28e --- /dev/null +++ b/tags.html @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ひつまぶし食べたい – Tags + + + + +
+ + + +
+
+

Tags

+
+
+ +
+
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/theme/dark-theme/dark-theme.js b/theme/dark-theme/dark-theme.js new file mode 100644 index 00000000..0b0162ec --- /dev/null +++ b/theme/dark-theme/dark-theme.js @@ -0,0 +1,58 @@ +function ThemeManager(options) { + var defaultTheme = options.defaultTheme; + var enableAutoDetectTheme = options.enableAutoDetectTheme.toLowerCase() === 'true'; + + var darkThemeMatch = window.matchMedia( + defaultTheme === 'light' ? + '(prefers-color-scheme: dark)' : + '(prefers-color-scheme: dark), (prefers-color-scheme: no-preference)' + ); + + function setEnabledAndDisableMediaQuery(elementId, enabled) { + var element = document.getElementById(elementId); + element.disabled = !enabled; + element.media = ''; + } + + function detectThemeAndSwitchStyle() { + var theme = localStorage.getItem('themeOverride'); + if (theme !== 'light' && theme !== 'dark') { + if (theme === 'browser' || enableAutoDetectTheme) { + theme = darkThemeMatch.matches ? 'dark' : 'light'; + } else { + theme = defaultTheme; + } + } + + // (Dis|En)able the styles according to the user's desired theme. Get rid + // of the media queries, since we are handling it in JS. + setEnabledAndDisableMediaQuery('dark-theme-style', theme === 'dark'); + setEnabledAndDisableMediaQuery('pygments-dark-theme', theme === 'dark'); + setEnabledAndDisableMediaQuery('pygments-light-theme', theme === 'light'); + + if (theme === 'dark') { + document.body.classList.add('dark-theme'); + document.body.classList.remove('light-theme'); + } else { + document.body.classList.add('light-theme'); + document.body.classList.remove('dark-theme'); + } + } + + this.switch = function(themeOverride) { + localStorage.setItem('themeOverride', themeOverride); + detectThemeAndSwitchStyle(); + }; + + // If there's an override, then apply it, otherwise, don't incur the + // overhead of determining whether or not to switch themes. + var themeOverride = localStorage.getItem('themeOverride'); + if (themeOverride === 'light' || themeOverride === 'dark') { + detectThemeAndSwitchStyle(); + } + + // If theme auto-detection is enabled, then add a listenr on the matchMedia. + darkThemeMatch.addListener(detectThemeAndSwitchStyle); +} + +window.theme = new ThemeManager(document.getElementById('dark-theme-script').dataset); diff --git a/theme/dark-theme/dark-theme.min.js b/theme/dark-theme/dark-theme.min.js new file mode 100644 index 00000000..7433dd58 --- /dev/null +++ b/theme/dark-theme/dark-theme.min.js @@ -0,0 +1 @@ +function ThemeManager(e){var t=e.defaultTheme,r="true"===e.enableAutoDetectTheme.toLowerCase(),a=window.matchMedia("light"===t?"(prefers-color-scheme: dark)":"(prefers-color-scheme: dark), (prefers-color-scheme: no-preference)");function d(e,t){var r=document.getElementById(e);r.disabled=!t,r.media=""}function m(){var e=localStorage.getItem("themeOverride");"light"!==e&&"dark"!==e&&(e="browser"===e||r?a.matches?"dark":"light":t),d("dark-theme-style","dark"===e),d("pygments-dark-theme","dark"===e),d("pygments-light-theme","light"===e),"dark"===e?(document.body.classList.add("dark-theme"),document.body.classList.remove("light-theme")):(document.body.classList.add("light-theme"),document.body.classList.remove("dark-theme"))}this.switch=function(e){localStorage.setItem("themeOverride",e),m()};var o=localStorage.getItem("themeOverride");"light"!==o&&"dark"!==o||m(),a.addListener(m)}window.theme=new ThemeManager(document.getElementById("dark-theme-script").dataset); \ No newline at end of file diff --git a/theme/font-awesome/css/brands.css b/theme/font-awesome/css/brands.css new file mode 100644 index 00000000..ed4b7398 --- /dev/null +++ b/theme/font-awesome/css/brands.css @@ -0,0 +1,15 @@ +/*! + * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face { + font-family: 'Font Awesome 5 Brands'; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("../webfonts/fa-brands-400.eot"); + src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } + +.fab { + font-family: 'Font Awesome 5 Brands'; + font-weight: 400; } diff --git a/theme/font-awesome/css/fontawesome.css b/theme/font-awesome/css/fontawesome.css new file mode 100644 index 00000000..c73d7c04 --- /dev/null +++ b/theme/font-awesome/css/fontawesome.css @@ -0,0 +1,4522 @@ +/*! + * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa, +.fas, +.far, +.fal, +.fad, +.fab { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; } + +.fa-lg { + font-size: 1.33333em; + line-height: 0.75em; + vertical-align: -.0667em; } + +.fa-xs { + font-size: .75em; } + +.fa-sm { + font-size: .875em; } + +.fa-1x { + font-size: 1em; } + +.fa-2x { + font-size: 2em; } + +.fa-3x { + font-size: 3em; } + +.fa-4x { + font-size: 4em; } + +.fa-5x { + font-size: 5em; } + +.fa-6x { + font-size: 6em; } + +.fa-7x { + font-size: 7em; } + +.fa-8x { + font-size: 8em; } + +.fa-9x { + font-size: 9em; } + +.fa-10x { + font-size: 10em; } + +.fa-fw { + text-align: center; + width: 1.25em; } + +.fa-ul { + list-style-type: none; + margin-left: 2.5em; + padding-left: 0; } + .fa-ul > li { + position: relative; } + +.fa-li { + left: -2em; + position: absolute; + text-align: center; + width: 2em; + line-height: inherit; } + +.fa-border { + border: solid 0.08em #eee; + border-radius: .1em; + padding: .2em .25em .15em; } + +.fa-pull-left { + float: left; } + +.fa-pull-right { + float: right; } + +.fa.fa-pull-left, +.fas.fa-pull-left, +.far.fa-pull-left, +.fal.fa-pull-left, +.fab.fa-pull-left { + margin-right: .3em; } + +.fa.fa-pull-right, +.fas.fa-pull-right, +.far.fa-pull-right, +.fal.fa-pull-right, +.fab.fa-pull-right { + margin-left: .3em; } + +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; } + +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); } + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); } + +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); } + +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + transform: rotate(270deg); } + +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); } + +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + transform: scale(1, -1); } + +.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(-1, -1); + transform: scale(-1, -1); } + +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical, +:root .fa-flip-both { + -webkit-filter: none; + filter: none; } + +.fa-stack { + display: inline-block; + height: 2em; + line-height: 2em; + position: relative; + vertical-align: middle; + width: 2.5em; } + +.fa-stack-1x, +.fa-stack-2x { + left: 0; + position: absolute; + text-align: center; + width: 100%; } + +.fa-stack-1x { + line-height: inherit; } + +.fa-stack-2x { + font-size: 2em; } + +.fa-inverse { + color: #fff; } + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen +readers do not read off random characters that represent icons */ +.fa-500px:before { + content: "\f26e"; } + +.fa-accessible-icon:before { + content: "\f368"; } + +.fa-accusoft:before { + content: "\f369"; } + +.fa-acquisitions-incorporated:before { + content: "\f6af"; } + +.fa-ad:before { + content: "\f641"; } + +.fa-address-book:before { + content: "\f2b9"; } + +.fa-address-card:before { + content: "\f2bb"; } + +.fa-adjust:before { + content: "\f042"; } + +.fa-adn:before { + content: "\f170"; } + +.fa-adobe:before { + content: "\f778"; } + +.fa-adversal:before { + content: "\f36a"; } + +.fa-affiliatetheme:before { + content: "\f36b"; } + +.fa-air-freshener:before { + content: "\f5d0"; } + +.fa-airbnb:before { + content: "\f834"; } + +.fa-algolia:before { + content: "\f36c"; } + +.fa-align-center:before { + content: "\f037"; } + +.fa-align-justify:before { + content: "\f039"; } + +.fa-align-left:before { + content: "\f036"; } + +.fa-align-right:before { + content: "\f038"; } + +.fa-alipay:before { + content: "\f642"; } + +.fa-allergies:before { + content: "\f461"; } + +.fa-amazon:before { + content: "\f270"; } + +.fa-amazon-pay:before { + content: "\f42c"; } + +.fa-ambulance:before { + content: "\f0f9"; } + +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; } + +.fa-amilia:before { + content: "\f36d"; } + +.fa-anchor:before { + content: "\f13d"; } + +.fa-android:before { + content: "\f17b"; } + +.fa-angellist:before { + content: "\f209"; } + +.fa-angle-double-down:before { + content: "\f103"; } + +.fa-angle-double-left:before { + content: "\f100"; } + +.fa-angle-double-right:before { + content: "\f101"; } + +.fa-angle-double-up:before { + content: "\f102"; } + +.fa-angle-down:before { + content: "\f107"; } + +.fa-angle-left:before { + content: "\f104"; } + +.fa-angle-right:before { + content: "\f105"; } + +.fa-angle-up:before { + content: "\f106"; } + +.fa-angry:before { + content: "\f556"; } + +.fa-angrycreative:before { + content: "\f36e"; } + +.fa-angular:before { + content: "\f420"; } + +.fa-ankh:before { + content: "\f644"; } + +.fa-app-store:before { + content: "\f36f"; } + +.fa-app-store-ios:before { + content: "\f370"; } + +.fa-apper:before { + content: "\f371"; } + +.fa-apple:before { + content: "\f179"; } + +.fa-apple-alt:before { + content: "\f5d1"; } + +.fa-apple-pay:before { + content: "\f415"; } + +.fa-archive:before { + content: "\f187"; } + +.fa-archway:before { + content: "\f557"; } + +.fa-arrow-alt-circle-down:before { + content: "\f358"; } + +.fa-arrow-alt-circle-left:before { + content: "\f359"; } + +.fa-arrow-alt-circle-right:before { + content: "\f35a"; } + +.fa-arrow-alt-circle-up:before { + content: "\f35b"; } + +.fa-arrow-circle-down:before { + content: "\f0ab"; } + +.fa-arrow-circle-left:before { + content: "\f0a8"; } + +.fa-arrow-circle-right:before { + content: "\f0a9"; } + +.fa-arrow-circle-up:before { + content: "\f0aa"; } + +.fa-arrow-down:before { + content: "\f063"; } + +.fa-arrow-left:before { + content: "\f060"; } + +.fa-arrow-right:before { + content: "\f061"; } + +.fa-arrow-up:before { + content: "\f062"; } + +.fa-arrows-alt:before { + content: "\f0b2"; } + +.fa-arrows-alt-h:before { + content: "\f337"; } + +.fa-arrows-alt-v:before { + content: "\f338"; } + +.fa-artstation:before { + content: "\f77a"; } + +.fa-assistive-listening-systems:before { + content: "\f2a2"; } + +.fa-asterisk:before { + content: "\f069"; } + +.fa-asymmetrik:before { + content: "\f372"; } + +.fa-at:before { + content: "\f1fa"; } + +.fa-atlas:before { + content: "\f558"; } + +.fa-atlassian:before { + content: "\f77b"; } + +.fa-atom:before { + content: "\f5d2"; } + +.fa-audible:before { + content: "\f373"; } + +.fa-audio-description:before { + content: "\f29e"; } + +.fa-autoprefixer:before { + content: "\f41c"; } + +.fa-avianex:before { + content: "\f374"; } + +.fa-aviato:before { + content: "\f421"; } + +.fa-award:before { + content: "\f559"; } + +.fa-aws:before { + content: "\f375"; } + +.fa-baby:before { + content: "\f77c"; } + +.fa-baby-carriage:before { + content: "\f77d"; } + +.fa-backspace:before { + content: "\f55a"; } + +.fa-backward:before { + content: "\f04a"; } + +.fa-bacon:before { + content: "\f7e5"; } + +.fa-bahai:before { + content: "\f666"; } + +.fa-balance-scale:before { + content: "\f24e"; } + +.fa-balance-scale-left:before { + content: "\f515"; } + +.fa-balance-scale-right:before { + content: "\f516"; } + +.fa-ban:before { + content: "\f05e"; } + +.fa-band-aid:before { + content: "\f462"; } + +.fa-bandcamp:before { + content: "\f2d5"; } + +.fa-barcode:before { + content: "\f02a"; } + +.fa-bars:before { + content: "\f0c9"; } + +.fa-baseball-ball:before { + content: "\f433"; } + +.fa-basketball-ball:before { + content: "\f434"; } + +.fa-bath:before { + content: "\f2cd"; } + +.fa-battery-empty:before { + content: "\f244"; } + +.fa-battery-full:before { + content: "\f240"; } + +.fa-battery-half:before { + content: "\f242"; } + +.fa-battery-quarter:before { + content: "\f243"; } + +.fa-battery-three-quarters:before { + content: "\f241"; } + +.fa-battle-net:before { + content: "\f835"; } + +.fa-bed:before { + content: "\f236"; } + +.fa-beer:before { + content: "\f0fc"; } + +.fa-behance:before { + content: "\f1b4"; } + +.fa-behance-square:before { + content: "\f1b5"; } + +.fa-bell:before { + content: "\f0f3"; } + +.fa-bell-slash:before { + content: "\f1f6"; } + +.fa-bezier-curve:before { + content: "\f55b"; } + +.fa-bible:before { + content: "\f647"; } + +.fa-bicycle:before { + content: "\f206"; } + +.fa-biking:before { + content: "\f84a"; } + +.fa-bimobject:before { + content: "\f378"; } + +.fa-binoculars:before { + content: "\f1e5"; } + +.fa-biohazard:before { + content: "\f780"; } + +.fa-birthday-cake:before { + content: "\f1fd"; } + +.fa-bitbucket:before { + content: "\f171"; } + +.fa-bitcoin:before { + content: "\f379"; } + +.fa-bity:before { + content: "\f37a"; } + +.fa-black-tie:before { + content: "\f27e"; } + +.fa-blackberry:before { + content: "\f37b"; } + +.fa-blender:before { + content: "\f517"; } + +.fa-blender-phone:before { + content: "\f6b6"; } + +.fa-blind:before { + content: "\f29d"; } + +.fa-blog:before { + content: "\f781"; } + +.fa-blogger:before { + content: "\f37c"; } + +.fa-blogger-b:before { + content: "\f37d"; } + +.fa-bluetooth:before { + content: "\f293"; } + +.fa-bluetooth-b:before { + content: "\f294"; } + +.fa-bold:before { + content: "\f032"; } + +.fa-bolt:before { + content: "\f0e7"; } + +.fa-bomb:before { + content: "\f1e2"; } + +.fa-bone:before { + content: "\f5d7"; } + +.fa-bong:before { + content: "\f55c"; } + +.fa-book:before { + content: "\f02d"; } + +.fa-book-dead:before { + content: "\f6b7"; } + +.fa-book-medical:before { + content: "\f7e6"; } + +.fa-book-open:before { + content: "\f518"; } + +.fa-book-reader:before { + content: "\f5da"; } + +.fa-bookmark:before { + content: "\f02e"; } + +.fa-bootstrap:before { + content: "\f836"; } + +.fa-border-all:before { + content: "\f84c"; } + +.fa-border-none:before { + content: "\f850"; } + +.fa-border-style:before { + content: "\f853"; } + +.fa-bowling-ball:before { + content: "\f436"; } + +.fa-box:before { + content: "\f466"; } + +.fa-box-open:before { + content: "\f49e"; } + +.fa-box-tissue:before { + content: "\f95b"; } + +.fa-boxes:before { + content: "\f468"; } + +.fa-braille:before { + content: "\f2a1"; } + +.fa-brain:before { + content: "\f5dc"; } + +.fa-bread-slice:before { + content: "\f7ec"; } + +.fa-briefcase:before { + content: "\f0b1"; } + +.fa-briefcase-medical:before { + content: "\f469"; } + +.fa-broadcast-tower:before { + content: "\f519"; } + +.fa-broom:before { + content: "\f51a"; } + +.fa-brush:before { + content: "\f55d"; } + +.fa-btc:before { + content: "\f15a"; } + +.fa-buffer:before { + content: "\f837"; } + +.fa-bug:before { + content: "\f188"; } + +.fa-building:before { + content: "\f1ad"; } + +.fa-bullhorn:before { + content: "\f0a1"; } + +.fa-bullseye:before { + content: "\f140"; } + +.fa-burn:before { + content: "\f46a"; } + +.fa-buromobelexperte:before { + content: "\f37f"; } + +.fa-bus:before { + content: "\f207"; } + +.fa-bus-alt:before { + content: "\f55e"; } + +.fa-business-time:before { + content: "\f64a"; } + +.fa-buy-n-large:before { + content: "\f8a6"; } + +.fa-buysellads:before { + content: "\f20d"; } + +.fa-calculator:before { + content: "\f1ec"; } + +.fa-calendar:before { + content: "\f133"; } + +.fa-calendar-alt:before { + content: "\f073"; } + +.fa-calendar-check:before { + content: "\f274"; } + +.fa-calendar-day:before { + content: "\f783"; } + +.fa-calendar-minus:before { + content: "\f272"; } + +.fa-calendar-plus:before { + content: "\f271"; } + +.fa-calendar-times:before { + content: "\f273"; } + +.fa-calendar-week:before { + content: "\f784"; } + +.fa-camera:before { + content: "\f030"; } + +.fa-camera-retro:before { + content: "\f083"; } + +.fa-campground:before { + content: "\f6bb"; } + +.fa-canadian-maple-leaf:before { + content: "\f785"; } + +.fa-candy-cane:before { + content: "\f786"; } + +.fa-cannabis:before { + content: "\f55f"; } + +.fa-capsules:before { + content: "\f46b"; } + +.fa-car:before { + content: "\f1b9"; } + +.fa-car-alt:before { + content: "\f5de"; } + +.fa-car-battery:before { + content: "\f5df"; } + +.fa-car-crash:before { + content: "\f5e1"; } + +.fa-car-side:before { + content: "\f5e4"; } + +.fa-caravan:before { + content: "\f8ff"; } + +.fa-caret-down:before { + content: "\f0d7"; } + +.fa-caret-left:before { + content: "\f0d9"; } + +.fa-caret-right:before { + content: "\f0da"; } + +.fa-caret-square-down:before { + content: "\f150"; } + +.fa-caret-square-left:before { + content: "\f191"; } + +.fa-caret-square-right:before { + content: "\f152"; } + +.fa-caret-square-up:before { + content: "\f151"; } + +.fa-caret-up:before { + content: "\f0d8"; } + +.fa-carrot:before { + content: "\f787"; } + +.fa-cart-arrow-down:before { + content: "\f218"; } + +.fa-cart-plus:before { + content: "\f217"; } + +.fa-cash-register:before { + content: "\f788"; } + +.fa-cat:before { + content: "\f6be"; } + +.fa-cc-amazon-pay:before { + content: "\f42d"; } + +.fa-cc-amex:before { + content: "\f1f3"; } + +.fa-cc-apple-pay:before { + content: "\f416"; } + +.fa-cc-diners-club:before { + content: "\f24c"; } + +.fa-cc-discover:before { + content: "\f1f2"; } + +.fa-cc-jcb:before { + content: "\f24b"; } + +.fa-cc-mastercard:before { + content: "\f1f1"; } + +.fa-cc-paypal:before { + content: "\f1f4"; } + +.fa-cc-stripe:before { + content: "\f1f5"; } + +.fa-cc-visa:before { + content: "\f1f0"; } + +.fa-centercode:before { + content: "\f380"; } + +.fa-centos:before { + content: "\f789"; } + +.fa-certificate:before { + content: "\f0a3"; } + +.fa-chair:before { + content: "\f6c0"; } + +.fa-chalkboard:before { + content: "\f51b"; } + +.fa-chalkboard-teacher:before { + content: "\f51c"; } + +.fa-charging-station:before { + content: "\f5e7"; } + +.fa-chart-area:before { + content: "\f1fe"; } + +.fa-chart-bar:before { + content: "\f080"; } + +.fa-chart-line:before { + content: "\f201"; } + +.fa-chart-pie:before { + content: "\f200"; } + +.fa-check:before { + content: "\f00c"; } + +.fa-check-circle:before { + content: "\f058"; } + +.fa-check-double:before { + content: "\f560"; } + +.fa-check-square:before { + content: "\f14a"; } + +.fa-cheese:before { + content: "\f7ef"; } + +.fa-chess:before { + content: "\f439"; } + +.fa-chess-bishop:before { + content: "\f43a"; } + +.fa-chess-board:before { + content: "\f43c"; } + +.fa-chess-king:before { + content: "\f43f"; } + +.fa-chess-knight:before { + content: "\f441"; } + +.fa-chess-pawn:before { + content: "\f443"; } + +.fa-chess-queen:before { + content: "\f445"; } + +.fa-chess-rook:before { + content: "\f447"; } + +.fa-chevron-circle-down:before { + content: "\f13a"; } + +.fa-chevron-circle-left:before { + content: "\f137"; } + +.fa-chevron-circle-right:before { + content: "\f138"; } + +.fa-chevron-circle-up:before { + content: "\f139"; } + +.fa-chevron-down:before { + content: "\f078"; } + +.fa-chevron-left:before { + content: "\f053"; } + +.fa-chevron-right:before { + content: "\f054"; } + +.fa-chevron-up:before { + content: "\f077"; } + +.fa-child:before { + content: "\f1ae"; } + +.fa-chrome:before { + content: "\f268"; } + +.fa-chromecast:before { + content: "\f838"; } + +.fa-church:before { + content: "\f51d"; } + +.fa-circle:before { + content: "\f111"; } + +.fa-circle-notch:before { + content: "\f1ce"; } + +.fa-city:before { + content: "\f64f"; } + +.fa-clinic-medical:before { + content: "\f7f2"; } + +.fa-clipboard:before { + content: "\f328"; } + +.fa-clipboard-check:before { + content: "\f46c"; } + +.fa-clipboard-list:before { + content: "\f46d"; } + +.fa-clock:before { + content: "\f017"; } + +.fa-clone:before { + content: "\f24d"; } + +.fa-closed-captioning:before { + content: "\f20a"; } + +.fa-cloud:before { + content: "\f0c2"; } + +.fa-cloud-download-alt:before { + content: "\f381"; } + +.fa-cloud-meatball:before { + content: "\f73b"; } + +.fa-cloud-moon:before { + content: "\f6c3"; } + +.fa-cloud-moon-rain:before { + content: "\f73c"; } + +.fa-cloud-rain:before { + content: "\f73d"; } + +.fa-cloud-showers-heavy:before { + content: "\f740"; } + +.fa-cloud-sun:before { + content: "\f6c4"; } + +.fa-cloud-sun-rain:before { + content: "\f743"; } + +.fa-cloud-upload-alt:before { + content: "\f382"; } + +.fa-cloudscale:before { + content: "\f383"; } + +.fa-cloudsmith:before { + content: "\f384"; } + +.fa-cloudversify:before { + content: "\f385"; } + +.fa-cocktail:before { + content: "\f561"; } + +.fa-code:before { + content: "\f121"; } + +.fa-code-branch:before { + content: "\f126"; } + +.fa-codepen:before { + content: "\f1cb"; } + +.fa-codiepie:before { + content: "\f284"; } + +.fa-coffee:before { + content: "\f0f4"; } + +.fa-cog:before { + content: "\f013"; } + +.fa-cogs:before { + content: "\f085"; } + +.fa-coins:before { + content: "\f51e"; } + +.fa-columns:before { + content: "\f0db"; } + +.fa-comment:before { + content: "\f075"; } + +.fa-comment-alt:before { + content: "\f27a"; } + +.fa-comment-dollar:before { + content: "\f651"; } + +.fa-comment-dots:before { + content: "\f4ad"; } + +.fa-comment-medical:before { + content: "\f7f5"; } + +.fa-comment-slash:before { + content: "\f4b3"; } + +.fa-comments:before { + content: "\f086"; } + +.fa-comments-dollar:before { + content: "\f653"; } + +.fa-compact-disc:before { + content: "\f51f"; } + +.fa-compass:before { + content: "\f14e"; } + +.fa-compress:before { + content: "\f066"; } + +.fa-compress-alt:before { + content: "\f422"; } + +.fa-compress-arrows-alt:before { + content: "\f78c"; } + +.fa-concierge-bell:before { + content: "\f562"; } + +.fa-confluence:before { + content: "\f78d"; } + +.fa-connectdevelop:before { + content: "\f20e"; } + +.fa-contao:before { + content: "\f26d"; } + +.fa-cookie:before { + content: "\f563"; } + +.fa-cookie-bite:before { + content: "\f564"; } + +.fa-copy:before { + content: "\f0c5"; } + +.fa-copyright:before { + content: "\f1f9"; } + +.fa-cotton-bureau:before { + content: "\f89e"; } + +.fa-couch:before { + content: "\f4b8"; } + +.fa-cpanel:before { + content: "\f388"; } + +.fa-creative-commons:before { + content: "\f25e"; } + +.fa-creative-commons-by:before { + content: "\f4e7"; } + +.fa-creative-commons-nc:before { + content: "\f4e8"; } + +.fa-creative-commons-nc-eu:before { + content: "\f4e9"; } + +.fa-creative-commons-nc-jp:before { + content: "\f4ea"; } + +.fa-creative-commons-nd:before { + content: "\f4eb"; } + +.fa-creative-commons-pd:before { + content: "\f4ec"; } + +.fa-creative-commons-pd-alt:before { + content: "\f4ed"; } + +.fa-creative-commons-remix:before { + content: "\f4ee"; } + +.fa-creative-commons-sa:before { + content: "\f4ef"; } + +.fa-creative-commons-sampling:before { + content: "\f4f0"; } + +.fa-creative-commons-sampling-plus:before { + content: "\f4f1"; } + +.fa-creative-commons-share:before { + content: "\f4f2"; } + +.fa-creative-commons-zero:before { + content: "\f4f3"; } + +.fa-credit-card:before { + content: "\f09d"; } + +.fa-critical-role:before { + content: "\f6c9"; } + +.fa-crop:before { + content: "\f125"; } + +.fa-crop-alt:before { + content: "\f565"; } + +.fa-cross:before { + content: "\f654"; } + +.fa-crosshairs:before { + content: "\f05b"; } + +.fa-crow:before { + content: "\f520"; } + +.fa-crown:before { + content: "\f521"; } + +.fa-crutch:before { + content: "\f7f7"; } + +.fa-css3:before { + content: "\f13c"; } + +.fa-css3-alt:before { + content: "\f38b"; } + +.fa-cube:before { + content: "\f1b2"; } + +.fa-cubes:before { + content: "\f1b3"; } + +.fa-cut:before { + content: "\f0c4"; } + +.fa-cuttlefish:before { + content: "\f38c"; } + +.fa-d-and-d:before { + content: "\f38d"; } + +.fa-d-and-d-beyond:before { + content: "\f6ca"; } + +.fa-dailymotion:before { + content: "\f952"; } + +.fa-dashcube:before { + content: "\f210"; } + +.fa-database:before { + content: "\f1c0"; } + +.fa-deaf:before { + content: "\f2a4"; } + +.fa-delicious:before { + content: "\f1a5"; } + +.fa-democrat:before { + content: "\f747"; } + +.fa-deploydog:before { + content: "\f38e"; } + +.fa-deskpro:before { + content: "\f38f"; } + +.fa-desktop:before { + content: "\f108"; } + +.fa-dev:before { + content: "\f6cc"; } + +.fa-deviantart:before { + content: "\f1bd"; } + +.fa-dharmachakra:before { + content: "\f655"; } + +.fa-dhl:before { + content: "\f790"; } + +.fa-diagnoses:before { + content: "\f470"; } + +.fa-diaspora:before { + content: "\f791"; } + +.fa-dice:before { + content: "\f522"; } + +.fa-dice-d20:before { + content: "\f6cf"; } + +.fa-dice-d6:before { + content: "\f6d1"; } + +.fa-dice-five:before { + content: "\f523"; } + +.fa-dice-four:before { + content: "\f524"; } + +.fa-dice-one:before { + content: "\f525"; } + +.fa-dice-six:before { + content: "\f526"; } + +.fa-dice-three:before { + content: "\f527"; } + +.fa-dice-two:before { + content: "\f528"; } + +.fa-digg:before { + content: "\f1a6"; } + +.fa-digital-ocean:before { + content: "\f391"; } + +.fa-digital-tachograph:before { + content: "\f566"; } + +.fa-directions:before { + content: "\f5eb"; } + +.fa-discord:before { + content: "\f392"; } + +.fa-discourse:before { + content: "\f393"; } + +.fa-disease:before { + content: "\f7fa"; } + +.fa-divide:before { + content: "\f529"; } + +.fa-dizzy:before { + content: "\f567"; } + +.fa-dna:before { + content: "\f471"; } + +.fa-dochub:before { + content: "\f394"; } + +.fa-docker:before { + content: "\f395"; } + +.fa-dog:before { + content: "\f6d3"; } + +.fa-dollar-sign:before { + content: "\f155"; } + +.fa-dolly:before { + content: "\f472"; } + +.fa-dolly-flatbed:before { + content: "\f474"; } + +.fa-donate:before { + content: "\f4b9"; } + +.fa-door-closed:before { + content: "\f52a"; } + +.fa-door-open:before { + content: "\f52b"; } + +.fa-dot-circle:before { + content: "\f192"; } + +.fa-dove:before { + content: "\f4ba"; } + +.fa-download:before { + content: "\f019"; } + +.fa-draft2digital:before { + content: "\f396"; } + +.fa-drafting-compass:before { + content: "\f568"; } + +.fa-dragon:before { + content: "\f6d5"; } + +.fa-draw-polygon:before { + content: "\f5ee"; } + +.fa-dribbble:before { + content: "\f17d"; } + +.fa-dribbble-square:before { + content: "\f397"; } + +.fa-dropbox:before { + content: "\f16b"; } + +.fa-drum:before { + content: "\f569"; } + +.fa-drum-steelpan:before { + content: "\f56a"; } + +.fa-drumstick-bite:before { + content: "\f6d7"; } + +.fa-drupal:before { + content: "\f1a9"; } + +.fa-dumbbell:before { + content: "\f44b"; } + +.fa-dumpster:before { + content: "\f793"; } + +.fa-dumpster-fire:before { + content: "\f794"; } + +.fa-dungeon:before { + content: "\f6d9"; } + +.fa-dyalog:before { + content: "\f399"; } + +.fa-earlybirds:before { + content: "\f39a"; } + +.fa-ebay:before { + content: "\f4f4"; } + +.fa-edge:before { + content: "\f282"; } + +.fa-edit:before { + content: "\f044"; } + +.fa-egg:before { + content: "\f7fb"; } + +.fa-eject:before { + content: "\f052"; } + +.fa-elementor:before { + content: "\f430"; } + +.fa-ellipsis-h:before { + content: "\f141"; } + +.fa-ellipsis-v:before { + content: "\f142"; } + +.fa-ello:before { + content: "\f5f1"; } + +.fa-ember:before { + content: "\f423"; } + +.fa-empire:before { + content: "\f1d1"; } + +.fa-envelope:before { + content: "\f0e0"; } + +.fa-envelope-open:before { + content: "\f2b6"; } + +.fa-envelope-open-text:before { + content: "\f658"; } + +.fa-envelope-square:before { + content: "\f199"; } + +.fa-envira:before { + content: "\f299"; } + +.fa-equals:before { + content: "\f52c"; } + +.fa-eraser:before { + content: "\f12d"; } + +.fa-erlang:before { + content: "\f39d"; } + +.fa-ethereum:before { + content: "\f42e"; } + +.fa-ethernet:before { + content: "\f796"; } + +.fa-etsy:before { + content: "\f2d7"; } + +.fa-euro-sign:before { + content: "\f153"; } + +.fa-evernote:before { + content: "\f839"; } + +.fa-exchange-alt:before { + content: "\f362"; } + +.fa-exclamation:before { + content: "\f12a"; } + +.fa-exclamation-circle:before { + content: "\f06a"; } + +.fa-exclamation-triangle:before { + content: "\f071"; } + +.fa-expand:before { + content: "\f065"; } + +.fa-expand-alt:before { + content: "\f424"; } + +.fa-expand-arrows-alt:before { + content: "\f31e"; } + +.fa-expeditedssl:before { + content: "\f23e"; } + +.fa-external-link-alt:before { + content: "\f35d"; } + +.fa-external-link-square-alt:before { + content: "\f360"; } + +.fa-eye:before { + content: "\f06e"; } + +.fa-eye-dropper:before { + content: "\f1fb"; } + +.fa-eye-slash:before { + content: "\f070"; } + +.fa-facebook:before { + content: "\f09a"; } + +.fa-facebook-f:before { + content: "\f39e"; } + +.fa-facebook-messenger:before { + content: "\f39f"; } + +.fa-facebook-square:before { + content: "\f082"; } + +.fa-fan:before { + content: "\f863"; } + +.fa-fantasy-flight-games:before { + content: "\f6dc"; } + +.fa-fast-backward:before { + content: "\f049"; } + +.fa-fast-forward:before { + content: "\f050"; } + +.fa-faucet:before { + content: "\f905"; } + +.fa-fax:before { + content: "\f1ac"; } + +.fa-feather:before { + content: "\f52d"; } + +.fa-feather-alt:before { + content: "\f56b"; } + +.fa-fedex:before { + content: "\f797"; } + +.fa-fedora:before { + content: "\f798"; } + +.fa-female:before { + content: "\f182"; } + +.fa-fighter-jet:before { + content: "\f0fb"; } + +.fa-figma:before { + content: "\f799"; } + +.fa-file:before { + content: "\f15b"; } + +.fa-file-alt:before { + content: "\f15c"; } + +.fa-file-archive:before { + content: "\f1c6"; } + +.fa-file-audio:before { + content: "\f1c7"; } + +.fa-file-code:before { + content: "\f1c9"; } + +.fa-file-contract:before { + content: "\f56c"; } + +.fa-file-csv:before { + content: "\f6dd"; } + +.fa-file-download:before { + content: "\f56d"; } + +.fa-file-excel:before { + content: "\f1c3"; } + +.fa-file-export:before { + content: "\f56e"; } + +.fa-file-image:before { + content: "\f1c5"; } + +.fa-file-import:before { + content: "\f56f"; } + +.fa-file-invoice:before { + content: "\f570"; } + +.fa-file-invoice-dollar:before { + content: "\f571"; } + +.fa-file-medical:before { + content: "\f477"; } + +.fa-file-medical-alt:before { + content: "\f478"; } + +.fa-file-pdf:before { + content: "\f1c1"; } + +.fa-file-powerpoint:before { + content: "\f1c4"; } + +.fa-file-prescription:before { + content: "\f572"; } + +.fa-file-signature:before { + content: "\f573"; } + +.fa-file-upload:before { + content: "\f574"; } + +.fa-file-video:before { + content: "\f1c8"; } + +.fa-file-word:before { + content: "\f1c2"; } + +.fa-fill:before { + content: "\f575"; } + +.fa-fill-drip:before { + content: "\f576"; } + +.fa-film:before { + content: "\f008"; } + +.fa-filter:before { + content: "\f0b0"; } + +.fa-fingerprint:before { + content: "\f577"; } + +.fa-fire:before { + content: "\f06d"; } + +.fa-fire-alt:before { + content: "\f7e4"; } + +.fa-fire-extinguisher:before { + content: "\f134"; } + +.fa-firefox:before { + content: "\f269"; } + +.fa-firefox-browser:before { + content: "\f907"; } + +.fa-first-aid:before { + content: "\f479"; } + +.fa-first-order:before { + content: "\f2b0"; } + +.fa-first-order-alt:before { + content: "\f50a"; } + +.fa-firstdraft:before { + content: "\f3a1"; } + +.fa-fish:before { + content: "\f578"; } + +.fa-fist-raised:before { + content: "\f6de"; } + +.fa-flag:before { + content: "\f024"; } + +.fa-flag-checkered:before { + content: "\f11e"; } + +.fa-flag-usa:before { + content: "\f74d"; } + +.fa-flask:before { + content: "\f0c3"; } + +.fa-flickr:before { + content: "\f16e"; } + +.fa-flipboard:before { + content: "\f44d"; } + +.fa-flushed:before { + content: "\f579"; } + +.fa-fly:before { + content: "\f417"; } + +.fa-folder:before { + content: "\f07b"; } + +.fa-folder-minus:before { + content: "\f65d"; } + +.fa-folder-open:before { + content: "\f07c"; } + +.fa-folder-plus:before { + content: "\f65e"; } + +.fa-font:before { + content: "\f031"; } + +.fa-font-awesome:before { + content: "\f2b4"; } + +.fa-font-awesome-alt:before { + content: "\f35c"; } + +.fa-font-awesome-flag:before { + content: "\f425"; } + +.fa-font-awesome-logo-full:before { + content: "\f4e6"; } + +.fa-fonticons:before { + content: "\f280"; } + +.fa-fonticons-fi:before { + content: "\f3a2"; } + +.fa-football-ball:before { + content: "\f44e"; } + +.fa-fort-awesome:before { + content: "\f286"; } + +.fa-fort-awesome-alt:before { + content: "\f3a3"; } + +.fa-forumbee:before { + content: "\f211"; } + +.fa-forward:before { + content: "\f04e"; } + +.fa-foursquare:before { + content: "\f180"; } + +.fa-free-code-camp:before { + content: "\f2c5"; } + +.fa-freebsd:before { + content: "\f3a4"; } + +.fa-frog:before { + content: "\f52e"; } + +.fa-frown:before { + content: "\f119"; } + +.fa-frown-open:before { + content: "\f57a"; } + +.fa-fulcrum:before { + content: "\f50b"; } + +.fa-funnel-dollar:before { + content: "\f662"; } + +.fa-futbol:before { + content: "\f1e3"; } + +.fa-galactic-republic:before { + content: "\f50c"; } + +.fa-galactic-senate:before { + content: "\f50d"; } + +.fa-gamepad:before { + content: "\f11b"; } + +.fa-gas-pump:before { + content: "\f52f"; } + +.fa-gavel:before { + content: "\f0e3"; } + +.fa-gem:before { + content: "\f3a5"; } + +.fa-genderless:before { + content: "\f22d"; } + +.fa-get-pocket:before { + content: "\f265"; } + +.fa-gg:before { + content: "\f260"; } + +.fa-gg-circle:before { + content: "\f261"; } + +.fa-ghost:before { + content: "\f6e2"; } + +.fa-gift:before { + content: "\f06b"; } + +.fa-gifts:before { + content: "\f79c"; } + +.fa-git:before { + content: "\f1d3"; } + +.fa-git-alt:before { + content: "\f841"; } + +.fa-git-square:before { + content: "\f1d2"; } + +.fa-github:before { + content: "\f09b"; } + +.fa-github-alt:before { + content: "\f113"; } + +.fa-github-square:before { + content: "\f092"; } + +.fa-gitkraken:before { + content: "\f3a6"; } + +.fa-gitlab:before { + content: "\f296"; } + +.fa-gitter:before { + content: "\f426"; } + +.fa-glass-cheers:before { + content: "\f79f"; } + +.fa-glass-martini:before { + content: "\f000"; } + +.fa-glass-martini-alt:before { + content: "\f57b"; } + +.fa-glass-whiskey:before { + content: "\f7a0"; } + +.fa-glasses:before { + content: "\f530"; } + +.fa-glide:before { + content: "\f2a5"; } + +.fa-glide-g:before { + content: "\f2a6"; } + +.fa-globe:before { + content: "\f0ac"; } + +.fa-globe-africa:before { + content: "\f57c"; } + +.fa-globe-americas:before { + content: "\f57d"; } + +.fa-globe-asia:before { + content: "\f57e"; } + +.fa-globe-europe:before { + content: "\f7a2"; } + +.fa-gofore:before { + content: "\f3a7"; } + +.fa-golf-ball:before { + content: "\f450"; } + +.fa-goodreads:before { + content: "\f3a8"; } + +.fa-goodreads-g:before { + content: "\f3a9"; } + +.fa-google:before { + content: "\f1a0"; } + +.fa-google-drive:before { + content: "\f3aa"; } + +.fa-google-play:before { + content: "\f3ab"; } + +.fa-google-plus:before { + content: "\f2b3"; } + +.fa-google-plus-g:before { + content: "\f0d5"; } + +.fa-google-plus-square:before { + content: "\f0d4"; } + +.fa-google-wallet:before { + content: "\f1ee"; } + +.fa-gopuram:before { + content: "\f664"; } + +.fa-graduation-cap:before { + content: "\f19d"; } + +.fa-gratipay:before { + content: "\f184"; } + +.fa-grav:before { + content: "\f2d6"; } + +.fa-greater-than:before { + content: "\f531"; } + +.fa-greater-than-equal:before { + content: "\f532"; } + +.fa-grimace:before { + content: "\f57f"; } + +.fa-grin:before { + content: "\f580"; } + +.fa-grin-alt:before { + content: "\f581"; } + +.fa-grin-beam:before { + content: "\f582"; } + +.fa-grin-beam-sweat:before { + content: "\f583"; } + +.fa-grin-hearts:before { + content: "\f584"; } + +.fa-grin-squint:before { + content: "\f585"; } + +.fa-grin-squint-tears:before { + content: "\f586"; } + +.fa-grin-stars:before { + content: "\f587"; } + +.fa-grin-tears:before { + content: "\f588"; } + +.fa-grin-tongue:before { + content: "\f589"; } + +.fa-grin-tongue-squint:before { + content: "\f58a"; } + +.fa-grin-tongue-wink:before { + content: "\f58b"; } + +.fa-grin-wink:before { + content: "\f58c"; } + +.fa-grip-horizontal:before { + content: "\f58d"; } + +.fa-grip-lines:before { + content: "\f7a4"; } + +.fa-grip-lines-vertical:before { + content: "\f7a5"; } + +.fa-grip-vertical:before { + content: "\f58e"; } + +.fa-gripfire:before { + content: "\f3ac"; } + +.fa-grunt:before { + content: "\f3ad"; } + +.fa-guitar:before { + content: "\f7a6"; } + +.fa-gulp:before { + content: "\f3ae"; } + +.fa-h-square:before { + content: "\f0fd"; } + +.fa-hacker-news:before { + content: "\f1d4"; } + +.fa-hacker-news-square:before { + content: "\f3af"; } + +.fa-hackerrank:before { + content: "\f5f7"; } + +.fa-hamburger:before { + content: "\f805"; } + +.fa-hammer:before { + content: "\f6e3"; } + +.fa-hamsa:before { + content: "\f665"; } + +.fa-hand-holding:before { + content: "\f4bd"; } + +.fa-hand-holding-heart:before { + content: "\f4be"; } + +.fa-hand-holding-medical:before { + content: "\f95c"; } + +.fa-hand-holding-usd:before { + content: "\f4c0"; } + +.fa-hand-holding-water:before { + content: "\f4c1"; } + +.fa-hand-lizard:before { + content: "\f258"; } + +.fa-hand-middle-finger:before { + content: "\f806"; } + +.fa-hand-paper:before { + content: "\f256"; } + +.fa-hand-peace:before { + content: "\f25b"; } + +.fa-hand-point-down:before { + content: "\f0a7"; } + +.fa-hand-point-left:before { + content: "\f0a5"; } + +.fa-hand-point-right:before { + content: "\f0a4"; } + +.fa-hand-point-up:before { + content: "\f0a6"; } + +.fa-hand-pointer:before { + content: "\f25a"; } + +.fa-hand-rock:before { + content: "\f255"; } + +.fa-hand-scissors:before { + content: "\f257"; } + +.fa-hand-sparkles:before { + content: "\f95d"; } + +.fa-hand-spock:before { + content: "\f259"; } + +.fa-hands:before { + content: "\f4c2"; } + +.fa-hands-helping:before { + content: "\f4c4"; } + +.fa-hands-wash:before { + content: "\f95e"; } + +.fa-handshake:before { + content: "\f2b5"; } + +.fa-handshake-alt-slash:before { + content: "\f95f"; } + +.fa-handshake-slash:before { + content: "\f960"; } + +.fa-hanukiah:before { + content: "\f6e6"; } + +.fa-hard-hat:before { + content: "\f807"; } + +.fa-hashtag:before { + content: "\f292"; } + +.fa-hat-cowboy:before { + content: "\f8c0"; } + +.fa-hat-cowboy-side:before { + content: "\f8c1"; } + +.fa-hat-wizard:before { + content: "\f6e8"; } + +.fa-hdd:before { + content: "\f0a0"; } + +.fa-head-side-cough:before { + content: "\f961"; } + +.fa-head-side-cough-slash:before { + content: "\f962"; } + +.fa-head-side-mask:before { + content: "\f963"; } + +.fa-head-side-virus:before { + content: "\f964"; } + +.fa-heading:before { + content: "\f1dc"; } + +.fa-headphones:before { + content: "\f025"; } + +.fa-headphones-alt:before { + content: "\f58f"; } + +.fa-headset:before { + content: "\f590"; } + +.fa-heart:before { + content: "\f004"; } + +.fa-heart-broken:before { + content: "\f7a9"; } + +.fa-heartbeat:before { + content: "\f21e"; } + +.fa-helicopter:before { + content: "\f533"; } + +.fa-highlighter:before { + content: "\f591"; } + +.fa-hiking:before { + content: "\f6ec"; } + +.fa-hippo:before { + content: "\f6ed"; } + +.fa-hips:before { + content: "\f452"; } + +.fa-hire-a-helper:before { + content: "\f3b0"; } + +.fa-history:before { + content: "\f1da"; } + +.fa-hockey-puck:before { + content: "\f453"; } + +.fa-holly-berry:before { + content: "\f7aa"; } + +.fa-home:before { + content: "\f015"; } + +.fa-hooli:before { + content: "\f427"; } + +.fa-hornbill:before { + content: "\f592"; } + +.fa-horse:before { + content: "\f6f0"; } + +.fa-horse-head:before { + content: "\f7ab"; } + +.fa-hospital:before { + content: "\f0f8"; } + +.fa-hospital-alt:before { + content: "\f47d"; } + +.fa-hospital-symbol:before { + content: "\f47e"; } + +.fa-hospital-user:before { + content: "\f80d"; } + +.fa-hot-tub:before { + content: "\f593"; } + +.fa-hotdog:before { + content: "\f80f"; } + +.fa-hotel:before { + content: "\f594"; } + +.fa-hotjar:before { + content: "\f3b1"; } + +.fa-hourglass:before { + content: "\f254"; } + +.fa-hourglass-end:before { + content: "\f253"; } + +.fa-hourglass-half:before { + content: "\f252"; } + +.fa-hourglass-start:before { + content: "\f251"; } + +.fa-house-damage:before { + content: "\f6f1"; } + +.fa-house-user:before { + content: "\f965"; } + +.fa-houzz:before { + content: "\f27c"; } + +.fa-hryvnia:before { + content: "\f6f2"; } + +.fa-html5:before { + content: "\f13b"; } + +.fa-hubspot:before { + content: "\f3b2"; } + +.fa-i-cursor:before { + content: "\f246"; } + +.fa-ice-cream:before { + content: "\f810"; } + +.fa-icicles:before { + content: "\f7ad"; } + +.fa-icons:before { + content: "\f86d"; } + +.fa-id-badge:before { + content: "\f2c1"; } + +.fa-id-card:before { + content: "\f2c2"; } + +.fa-id-card-alt:before { + content: "\f47f"; } + +.fa-ideal:before { + content: "\f913"; } + +.fa-igloo:before { + content: "\f7ae"; } + +.fa-image:before { + content: "\f03e"; } + +.fa-images:before { + content: "\f302"; } + +.fa-imdb:before { + content: "\f2d8"; } + +.fa-inbox:before { + content: "\f01c"; } + +.fa-indent:before { + content: "\f03c"; } + +.fa-industry:before { + content: "\f275"; } + +.fa-infinity:before { + content: "\f534"; } + +.fa-info:before { + content: "\f129"; } + +.fa-info-circle:before { + content: "\f05a"; } + +.fa-instagram:before { + content: "\f16d"; } + +.fa-instagram-square:before { + content: "\f955"; } + +.fa-intercom:before { + content: "\f7af"; } + +.fa-internet-explorer:before { + content: "\f26b"; } + +.fa-invision:before { + content: "\f7b0"; } + +.fa-ioxhost:before { + content: "\f208"; } + +.fa-italic:before { + content: "\f033"; } + +.fa-itch-io:before { + content: "\f83a"; } + +.fa-itunes:before { + content: "\f3b4"; } + +.fa-itunes-note:before { + content: "\f3b5"; } + +.fa-java:before { + content: "\f4e4"; } + +.fa-jedi:before { + content: "\f669"; } + +.fa-jedi-order:before { + content: "\f50e"; } + +.fa-jenkins:before { + content: "\f3b6"; } + +.fa-jira:before { + content: "\f7b1"; } + +.fa-joget:before { + content: "\f3b7"; } + +.fa-joint:before { + content: "\f595"; } + +.fa-joomla:before { + content: "\f1aa"; } + +.fa-journal-whills:before { + content: "\f66a"; } + +.fa-js:before { + content: "\f3b8"; } + +.fa-js-square:before { + content: "\f3b9"; } + +.fa-jsfiddle:before { + content: "\f1cc"; } + +.fa-kaaba:before { + content: "\f66b"; } + +.fa-kaggle:before { + content: "\f5fa"; } + +.fa-key:before { + content: "\f084"; } + +.fa-keybase:before { + content: "\f4f5"; } + +.fa-keyboard:before { + content: "\f11c"; } + +.fa-keycdn:before { + content: "\f3ba"; } + +.fa-khanda:before { + content: "\f66d"; } + +.fa-kickstarter:before { + content: "\f3bb"; } + +.fa-kickstarter-k:before { + content: "\f3bc"; } + +.fa-kiss:before { + content: "\f596"; } + +.fa-kiss-beam:before { + content: "\f597"; } + +.fa-kiss-wink-heart:before { + content: "\f598"; } + +.fa-kiwi-bird:before { + content: "\f535"; } + +.fa-korvue:before { + content: "\f42f"; } + +.fa-landmark:before { + content: "\f66f"; } + +.fa-language:before { + content: "\f1ab"; } + +.fa-laptop:before { + content: "\f109"; } + +.fa-laptop-code:before { + content: "\f5fc"; } + +.fa-laptop-house:before { + content: "\f966"; } + +.fa-laptop-medical:before { + content: "\f812"; } + +.fa-laravel:before { + content: "\f3bd"; } + +.fa-lastfm:before { + content: "\f202"; } + +.fa-lastfm-square:before { + content: "\f203"; } + +.fa-laugh:before { + content: "\f599"; } + +.fa-laugh-beam:before { + content: "\f59a"; } + +.fa-laugh-squint:before { + content: "\f59b"; } + +.fa-laugh-wink:before { + content: "\f59c"; } + +.fa-layer-group:before { + content: "\f5fd"; } + +.fa-leaf:before { + content: "\f06c"; } + +.fa-leanpub:before { + content: "\f212"; } + +.fa-lemon:before { + content: "\f094"; } + +.fa-less:before { + content: "\f41d"; } + +.fa-less-than:before { + content: "\f536"; } + +.fa-less-than-equal:before { + content: "\f537"; } + +.fa-level-down-alt:before { + content: "\f3be"; } + +.fa-level-up-alt:before { + content: "\f3bf"; } + +.fa-life-ring:before { + content: "\f1cd"; } + +.fa-lightbulb:before { + content: "\f0eb"; } + +.fa-line:before { + content: "\f3c0"; } + +.fa-link:before { + content: "\f0c1"; } + +.fa-linkedin:before { + content: "\f08c"; } + +.fa-linkedin-in:before { + content: "\f0e1"; } + +.fa-linode:before { + content: "\f2b8"; } + +.fa-linux:before { + content: "\f17c"; } + +.fa-lira-sign:before { + content: "\f195"; } + +.fa-list:before { + content: "\f03a"; } + +.fa-list-alt:before { + content: "\f022"; } + +.fa-list-ol:before { + content: "\f0cb"; } + +.fa-list-ul:before { + content: "\f0ca"; } + +.fa-location-arrow:before { + content: "\f124"; } + +.fa-lock:before { + content: "\f023"; } + +.fa-lock-open:before { + content: "\f3c1"; } + +.fa-long-arrow-alt-down:before { + content: "\f309"; } + +.fa-long-arrow-alt-left:before { + content: "\f30a"; } + +.fa-long-arrow-alt-right:before { + content: "\f30b"; } + +.fa-long-arrow-alt-up:before { + content: "\f30c"; } + +.fa-low-vision:before { + content: "\f2a8"; } + +.fa-luggage-cart:before { + content: "\f59d"; } + +.fa-lungs:before { + content: "\f604"; } + +.fa-lungs-virus:before { + content: "\f967"; } + +.fa-lyft:before { + content: "\f3c3"; } + +.fa-magento:before { + content: "\f3c4"; } + +.fa-magic:before { + content: "\f0d0"; } + +.fa-magnet:before { + content: "\f076"; } + +.fa-mail-bulk:before { + content: "\f674"; } + +.fa-mailchimp:before { + content: "\f59e"; } + +.fa-male:before { + content: "\f183"; } + +.fa-mandalorian:before { + content: "\f50f"; } + +.fa-map:before { + content: "\f279"; } + +.fa-map-marked:before { + content: "\f59f"; } + +.fa-map-marked-alt:before { + content: "\f5a0"; } + +.fa-map-marker:before { + content: "\f041"; } + +.fa-map-marker-alt:before { + content: "\f3c5"; } + +.fa-map-pin:before { + content: "\f276"; } + +.fa-map-signs:before { + content: "\f277"; } + +.fa-markdown:before { + content: "\f60f"; } + +.fa-marker:before { + content: "\f5a1"; } + +.fa-mars:before { + content: "\f222"; } + +.fa-mars-double:before { + content: "\f227"; } + +.fa-mars-stroke:before { + content: "\f229"; } + +.fa-mars-stroke-h:before { + content: "\f22b"; } + +.fa-mars-stroke-v:before { + content: "\f22a"; } + +.fa-mask:before { + content: "\f6fa"; } + +.fa-mastodon:before { + content: "\f4f6"; } + +.fa-maxcdn:before { + content: "\f136"; } + +.fa-mdb:before { + content: "\f8ca"; } + +.fa-medal:before { + content: "\f5a2"; } + +.fa-medapps:before { + content: "\f3c6"; } + +.fa-medium:before { + content: "\f23a"; } + +.fa-medium-m:before { + content: "\f3c7"; } + +.fa-medkit:before { + content: "\f0fa"; } + +.fa-medrt:before { + content: "\f3c8"; } + +.fa-meetup:before { + content: "\f2e0"; } + +.fa-megaport:before { + content: "\f5a3"; } + +.fa-meh:before { + content: "\f11a"; } + +.fa-meh-blank:before { + content: "\f5a4"; } + +.fa-meh-rolling-eyes:before { + content: "\f5a5"; } + +.fa-memory:before { + content: "\f538"; } + +.fa-mendeley:before { + content: "\f7b3"; } + +.fa-menorah:before { + content: "\f676"; } + +.fa-mercury:before { + content: "\f223"; } + +.fa-meteor:before { + content: "\f753"; } + +.fa-microblog:before { + content: "\f91a"; } + +.fa-microchip:before { + content: "\f2db"; } + +.fa-microphone:before { + content: "\f130"; } + +.fa-microphone-alt:before { + content: "\f3c9"; } + +.fa-microphone-alt-slash:before { + content: "\f539"; } + +.fa-microphone-slash:before { + content: "\f131"; } + +.fa-microscope:before { + content: "\f610"; } + +.fa-microsoft:before { + content: "\f3ca"; } + +.fa-minus:before { + content: "\f068"; } + +.fa-minus-circle:before { + content: "\f056"; } + +.fa-minus-square:before { + content: "\f146"; } + +.fa-mitten:before { + content: "\f7b5"; } + +.fa-mix:before { + content: "\f3cb"; } + +.fa-mixcloud:before { + content: "\f289"; } + +.fa-mixer:before { + content: "\f956"; } + +.fa-mizuni:before { + content: "\f3cc"; } + +.fa-mobile:before { + content: "\f10b"; } + +.fa-mobile-alt:before { + content: "\f3cd"; } + +.fa-modx:before { + content: "\f285"; } + +.fa-monero:before { + content: "\f3d0"; } + +.fa-money-bill:before { + content: "\f0d6"; } + +.fa-money-bill-alt:before { + content: "\f3d1"; } + +.fa-money-bill-wave:before { + content: "\f53a"; } + +.fa-money-bill-wave-alt:before { + content: "\f53b"; } + +.fa-money-check:before { + content: "\f53c"; } + +.fa-money-check-alt:before { + content: "\f53d"; } + +.fa-monument:before { + content: "\f5a6"; } + +.fa-moon:before { + content: "\f186"; } + +.fa-mortar-pestle:before { + content: "\f5a7"; } + +.fa-mosque:before { + content: "\f678"; } + +.fa-motorcycle:before { + content: "\f21c"; } + +.fa-mountain:before { + content: "\f6fc"; } + +.fa-mouse:before { + content: "\f8cc"; } + +.fa-mouse-pointer:before { + content: "\f245"; } + +.fa-mug-hot:before { + content: "\f7b6"; } + +.fa-music:before { + content: "\f001"; } + +.fa-napster:before { + content: "\f3d2"; } + +.fa-neos:before { + content: "\f612"; } + +.fa-network-wired:before { + content: "\f6ff"; } + +.fa-neuter:before { + content: "\f22c"; } + +.fa-newspaper:before { + content: "\f1ea"; } + +.fa-nimblr:before { + content: "\f5a8"; } + +.fa-node:before { + content: "\f419"; } + +.fa-node-js:before { + content: "\f3d3"; } + +.fa-not-equal:before { + content: "\f53e"; } + +.fa-notes-medical:before { + content: "\f481"; } + +.fa-npm:before { + content: "\f3d4"; } + +.fa-ns8:before { + content: "\f3d5"; } + +.fa-nutritionix:before { + content: "\f3d6"; } + +.fa-object-group:before { + content: "\f247"; } + +.fa-object-ungroup:before { + content: "\f248"; } + +.fa-odnoklassniki:before { + content: "\f263"; } + +.fa-odnoklassniki-square:before { + content: "\f264"; } + +.fa-oil-can:before { + content: "\f613"; } + +.fa-old-republic:before { + content: "\f510"; } + +.fa-om:before { + content: "\f679"; } + +.fa-opencart:before { + content: "\f23d"; } + +.fa-openid:before { + content: "\f19b"; } + +.fa-opera:before { + content: "\f26a"; } + +.fa-optin-monster:before { + content: "\f23c"; } + +.fa-orcid:before { + content: "\f8d2"; } + +.fa-osi:before { + content: "\f41a"; } + +.fa-otter:before { + content: "\f700"; } + +.fa-outdent:before { + content: "\f03b"; } + +.fa-page4:before { + content: "\f3d7"; } + +.fa-pagelines:before { + content: "\f18c"; } + +.fa-pager:before { + content: "\f815"; } + +.fa-paint-brush:before { + content: "\f1fc"; } + +.fa-paint-roller:before { + content: "\f5aa"; } + +.fa-palette:before { + content: "\f53f"; } + +.fa-palfed:before { + content: "\f3d8"; } + +.fa-pallet:before { + content: "\f482"; } + +.fa-paper-plane:before { + content: "\f1d8"; } + +.fa-paperclip:before { + content: "\f0c6"; } + +.fa-parachute-box:before { + content: "\f4cd"; } + +.fa-paragraph:before { + content: "\f1dd"; } + +.fa-parking:before { + content: "\f540"; } + +.fa-passport:before { + content: "\f5ab"; } + +.fa-pastafarianism:before { + content: "\f67b"; } + +.fa-paste:before { + content: "\f0ea"; } + +.fa-patreon:before { + content: "\f3d9"; } + +.fa-pause:before { + content: "\f04c"; } + +.fa-pause-circle:before { + content: "\f28b"; } + +.fa-paw:before { + content: "\f1b0"; } + +.fa-paypal:before { + content: "\f1ed"; } + +.fa-peace:before { + content: "\f67c"; } + +.fa-pen:before { + content: "\f304"; } + +.fa-pen-alt:before { + content: "\f305"; } + +.fa-pen-fancy:before { + content: "\f5ac"; } + +.fa-pen-nib:before { + content: "\f5ad"; } + +.fa-pen-square:before { + content: "\f14b"; } + +.fa-pencil-alt:before { + content: "\f303"; } + +.fa-pencil-ruler:before { + content: "\f5ae"; } + +.fa-penny-arcade:before { + content: "\f704"; } + +.fa-people-arrows:before { + content: "\f968"; } + +.fa-people-carry:before { + content: "\f4ce"; } + +.fa-pepper-hot:before { + content: "\f816"; } + +.fa-percent:before { + content: "\f295"; } + +.fa-percentage:before { + content: "\f541"; } + +.fa-periscope:before { + content: "\f3da"; } + +.fa-person-booth:before { + content: "\f756"; } + +.fa-phabricator:before { + content: "\f3db"; } + +.fa-phoenix-framework:before { + content: "\f3dc"; } + +.fa-phoenix-squadron:before { + content: "\f511"; } + +.fa-phone:before { + content: "\f095"; } + +.fa-phone-alt:before { + content: "\f879"; } + +.fa-phone-slash:before { + content: "\f3dd"; } + +.fa-phone-square:before { + content: "\f098"; } + +.fa-phone-square-alt:before { + content: "\f87b"; } + +.fa-phone-volume:before { + content: "\f2a0"; } + +.fa-photo-video:before { + content: "\f87c"; } + +.fa-php:before { + content: "\f457"; } + +.fa-pied-piper:before { + content: "\f2ae"; } + +.fa-pied-piper-alt:before { + content: "\f1a8"; } + +.fa-pied-piper-hat:before { + content: "\f4e5"; } + +.fa-pied-piper-pp:before { + content: "\f1a7"; } + +.fa-pied-piper-square:before { + content: "\f91e"; } + +.fa-piggy-bank:before { + content: "\f4d3"; } + +.fa-pills:before { + content: "\f484"; } + +.fa-pinterest:before { + content: "\f0d2"; } + +.fa-pinterest-p:before { + content: "\f231"; } + +.fa-pinterest-square:before { + content: "\f0d3"; } + +.fa-pizza-slice:before { + content: "\f818"; } + +.fa-place-of-worship:before { + content: "\f67f"; } + +.fa-plane:before { + content: "\f072"; } + +.fa-plane-arrival:before { + content: "\f5af"; } + +.fa-plane-departure:before { + content: "\f5b0"; } + +.fa-plane-slash:before { + content: "\f969"; } + +.fa-play:before { + content: "\f04b"; } + +.fa-play-circle:before { + content: "\f144"; } + +.fa-playstation:before { + content: "\f3df"; } + +.fa-plug:before { + content: "\f1e6"; } + +.fa-plus:before { + content: "\f067"; } + +.fa-plus-circle:before { + content: "\f055"; } + +.fa-plus-square:before { + content: "\f0fe"; } + +.fa-podcast:before { + content: "\f2ce"; } + +.fa-poll:before { + content: "\f681"; } + +.fa-poll-h:before { + content: "\f682"; } + +.fa-poo:before { + content: "\f2fe"; } + +.fa-poo-storm:before { + content: "\f75a"; } + +.fa-poop:before { + content: "\f619"; } + +.fa-portrait:before { + content: "\f3e0"; } + +.fa-pound-sign:before { + content: "\f154"; } + +.fa-power-off:before { + content: "\f011"; } + +.fa-pray:before { + content: "\f683"; } + +.fa-praying-hands:before { + content: "\f684"; } + +.fa-prescription:before { + content: "\f5b1"; } + +.fa-prescription-bottle:before { + content: "\f485"; } + +.fa-prescription-bottle-alt:before { + content: "\f486"; } + +.fa-print:before { + content: "\f02f"; } + +.fa-procedures:before { + content: "\f487"; } + +.fa-product-hunt:before { + content: "\f288"; } + +.fa-project-diagram:before { + content: "\f542"; } + +.fa-pump-medical:before { + content: "\f96a"; } + +.fa-pump-soap:before { + content: "\f96b"; } + +.fa-pushed:before { + content: "\f3e1"; } + +.fa-puzzle-piece:before { + content: "\f12e"; } + +.fa-python:before { + content: "\f3e2"; } + +.fa-qq:before { + content: "\f1d6"; } + +.fa-qrcode:before { + content: "\f029"; } + +.fa-question:before { + content: "\f128"; } + +.fa-question-circle:before { + content: "\f059"; } + +.fa-quidditch:before { + content: "\f458"; } + +.fa-quinscape:before { + content: "\f459"; } + +.fa-quora:before { + content: "\f2c4"; } + +.fa-quote-left:before { + content: "\f10d"; } + +.fa-quote-right:before { + content: "\f10e"; } + +.fa-quran:before { + content: "\f687"; } + +.fa-r-project:before { + content: "\f4f7"; } + +.fa-radiation:before { + content: "\f7b9"; } + +.fa-radiation-alt:before { + content: "\f7ba"; } + +.fa-rainbow:before { + content: "\f75b"; } + +.fa-random:before { + content: "\f074"; } + +.fa-raspberry-pi:before { + content: "\f7bb"; } + +.fa-ravelry:before { + content: "\f2d9"; } + +.fa-react:before { + content: "\f41b"; } + +.fa-reacteurope:before { + content: "\f75d"; } + +.fa-readme:before { + content: "\f4d5"; } + +.fa-rebel:before { + content: "\f1d0"; } + +.fa-receipt:before { + content: "\f543"; } + +.fa-record-vinyl:before { + content: "\f8d9"; } + +.fa-recycle:before { + content: "\f1b8"; } + +.fa-red-river:before { + content: "\f3e3"; } + +.fa-reddit:before { + content: "\f1a1"; } + +.fa-reddit-alien:before { + content: "\f281"; } + +.fa-reddit-square:before { + content: "\f1a2"; } + +.fa-redhat:before { + content: "\f7bc"; } + +.fa-redo:before { + content: "\f01e"; } + +.fa-redo-alt:before { + content: "\f2f9"; } + +.fa-registered:before { + content: "\f25d"; } + +.fa-remove-format:before { + content: "\f87d"; } + +.fa-renren:before { + content: "\f18b"; } + +.fa-reply:before { + content: "\f3e5"; } + +.fa-reply-all:before { + content: "\f122"; } + +.fa-replyd:before { + content: "\f3e6"; } + +.fa-republican:before { + content: "\f75e"; } + +.fa-researchgate:before { + content: "\f4f8"; } + +.fa-resolving:before { + content: "\f3e7"; } + +.fa-restroom:before { + content: "\f7bd"; } + +.fa-retweet:before { + content: "\f079"; } + +.fa-rev:before { + content: "\f5b2"; } + +.fa-ribbon:before { + content: "\f4d6"; } + +.fa-ring:before { + content: "\f70b"; } + +.fa-road:before { + content: "\f018"; } + +.fa-robot:before { + content: "\f544"; } + +.fa-rocket:before { + content: "\f135"; } + +.fa-rocketchat:before { + content: "\f3e8"; } + +.fa-rockrms:before { + content: "\f3e9"; } + +.fa-route:before { + content: "\f4d7"; } + +.fa-rss:before { + content: "\f09e"; } + +.fa-rss-square:before { + content: "\f143"; } + +.fa-ruble-sign:before { + content: "\f158"; } + +.fa-ruler:before { + content: "\f545"; } + +.fa-ruler-combined:before { + content: "\f546"; } + +.fa-ruler-horizontal:before { + content: "\f547"; } + +.fa-ruler-vertical:before { + content: "\f548"; } + +.fa-running:before { + content: "\f70c"; } + +.fa-rupee-sign:before { + content: "\f156"; } + +.fa-sad-cry:before { + content: "\f5b3"; } + +.fa-sad-tear:before { + content: "\f5b4"; } + +.fa-safari:before { + content: "\f267"; } + +.fa-salesforce:before { + content: "\f83b"; } + +.fa-sass:before { + content: "\f41e"; } + +.fa-satellite:before { + content: "\f7bf"; } + +.fa-satellite-dish:before { + content: "\f7c0"; } + +.fa-save:before { + content: "\f0c7"; } + +.fa-schlix:before { + content: "\f3ea"; } + +.fa-school:before { + content: "\f549"; } + +.fa-screwdriver:before { + content: "\f54a"; } + +.fa-scribd:before { + content: "\f28a"; } + +.fa-scroll:before { + content: "\f70e"; } + +.fa-sd-card:before { + content: "\f7c2"; } + +.fa-search:before { + content: "\f002"; } + +.fa-search-dollar:before { + content: "\f688"; } + +.fa-search-location:before { + content: "\f689"; } + +.fa-search-minus:before { + content: "\f010"; } + +.fa-search-plus:before { + content: "\f00e"; } + +.fa-searchengin:before { + content: "\f3eb"; } + +.fa-seedling:before { + content: "\f4d8"; } + +.fa-sellcast:before { + content: "\f2da"; } + +.fa-sellsy:before { + content: "\f213"; } + +.fa-server:before { + content: "\f233"; } + +.fa-servicestack:before { + content: "\f3ec"; } + +.fa-shapes:before { + content: "\f61f"; } + +.fa-share:before { + content: "\f064"; } + +.fa-share-alt:before { + content: "\f1e0"; } + +.fa-share-alt-square:before { + content: "\f1e1"; } + +.fa-share-square:before { + content: "\f14d"; } + +.fa-shekel-sign:before { + content: "\f20b"; } + +.fa-shield-alt:before { + content: "\f3ed"; } + +.fa-shield-virus:before { + content: "\f96c"; } + +.fa-ship:before { + content: "\f21a"; } + +.fa-shipping-fast:before { + content: "\f48b"; } + +.fa-shirtsinbulk:before { + content: "\f214"; } + +.fa-shoe-prints:before { + content: "\f54b"; } + +.fa-shopify:before { + content: "\f957"; } + +.fa-shopping-bag:before { + content: "\f290"; } + +.fa-shopping-basket:before { + content: "\f291"; } + +.fa-shopping-cart:before { + content: "\f07a"; } + +.fa-shopware:before { + content: "\f5b5"; } + +.fa-shower:before { + content: "\f2cc"; } + +.fa-shuttle-van:before { + content: "\f5b6"; } + +.fa-sign:before { + content: "\f4d9"; } + +.fa-sign-in-alt:before { + content: "\f2f6"; } + +.fa-sign-language:before { + content: "\f2a7"; } + +.fa-sign-out-alt:before { + content: "\f2f5"; } + +.fa-signal:before { + content: "\f012"; } + +.fa-signature:before { + content: "\f5b7"; } + +.fa-sim-card:before { + content: "\f7c4"; } + +.fa-simplybuilt:before { + content: "\f215"; } + +.fa-sistrix:before { + content: "\f3ee"; } + +.fa-sitemap:before { + content: "\f0e8"; } + +.fa-sith:before { + content: "\f512"; } + +.fa-skating:before { + content: "\f7c5"; } + +.fa-sketch:before { + content: "\f7c6"; } + +.fa-skiing:before { + content: "\f7c9"; } + +.fa-skiing-nordic:before { + content: "\f7ca"; } + +.fa-skull:before { + content: "\f54c"; } + +.fa-skull-crossbones:before { + content: "\f714"; } + +.fa-skyatlas:before { + content: "\f216"; } + +.fa-skype:before { + content: "\f17e"; } + +.fa-slack:before { + content: "\f198"; } + +.fa-slack-hash:before { + content: "\f3ef"; } + +.fa-slash:before { + content: "\f715"; } + +.fa-sleigh:before { + content: "\f7cc"; } + +.fa-sliders-h:before { + content: "\f1de"; } + +.fa-slideshare:before { + content: "\f1e7"; } + +.fa-smile:before { + content: "\f118"; } + +.fa-smile-beam:before { + content: "\f5b8"; } + +.fa-smile-wink:before { + content: "\f4da"; } + +.fa-smog:before { + content: "\f75f"; } + +.fa-smoking:before { + content: "\f48d"; } + +.fa-smoking-ban:before { + content: "\f54d"; } + +.fa-sms:before { + content: "\f7cd"; } + +.fa-snapchat:before { + content: "\f2ab"; } + +.fa-snapchat-ghost:before { + content: "\f2ac"; } + +.fa-snapchat-square:before { + content: "\f2ad"; } + +.fa-snowboarding:before { + content: "\f7ce"; } + +.fa-snowflake:before { + content: "\f2dc"; } + +.fa-snowman:before { + content: "\f7d0"; } + +.fa-snowplow:before { + content: "\f7d2"; } + +.fa-soap:before { + content: "\f96e"; } + +.fa-socks:before { + content: "\f696"; } + +.fa-solar-panel:before { + content: "\f5ba"; } + +.fa-sort:before { + content: "\f0dc"; } + +.fa-sort-alpha-down:before { + content: "\f15d"; } + +.fa-sort-alpha-down-alt:before { + content: "\f881"; } + +.fa-sort-alpha-up:before { + content: "\f15e"; } + +.fa-sort-alpha-up-alt:before { + content: "\f882"; } + +.fa-sort-amount-down:before { + content: "\f160"; } + +.fa-sort-amount-down-alt:before { + content: "\f884"; } + +.fa-sort-amount-up:before { + content: "\f161"; } + +.fa-sort-amount-up-alt:before { + content: "\f885"; } + +.fa-sort-down:before { + content: "\f0dd"; } + +.fa-sort-numeric-down:before { + content: "\f162"; } + +.fa-sort-numeric-down-alt:before { + content: "\f886"; } + +.fa-sort-numeric-up:before { + content: "\f163"; } + +.fa-sort-numeric-up-alt:before { + content: "\f887"; } + +.fa-sort-up:before { + content: "\f0de"; } + +.fa-soundcloud:before { + content: "\f1be"; } + +.fa-sourcetree:before { + content: "\f7d3"; } + +.fa-spa:before { + content: "\f5bb"; } + +.fa-space-shuttle:before { + content: "\f197"; } + +.fa-speakap:before { + content: "\f3f3"; } + +.fa-speaker-deck:before { + content: "\f83c"; } + +.fa-spell-check:before { + content: "\f891"; } + +.fa-spider:before { + content: "\f717"; } + +.fa-spinner:before { + content: "\f110"; } + +.fa-splotch:before { + content: "\f5bc"; } + +.fa-spotify:before { + content: "\f1bc"; } + +.fa-spray-can:before { + content: "\f5bd"; } + +.fa-square:before { + content: "\f0c8"; } + +.fa-square-full:before { + content: "\f45c"; } + +.fa-square-root-alt:before { + content: "\f698"; } + +.fa-squarespace:before { + content: "\f5be"; } + +.fa-stack-exchange:before { + content: "\f18d"; } + +.fa-stack-overflow:before { + content: "\f16c"; } + +.fa-stackpath:before { + content: "\f842"; } + +.fa-stamp:before { + content: "\f5bf"; } + +.fa-star:before { + content: "\f005"; } + +.fa-star-and-crescent:before { + content: "\f699"; } + +.fa-star-half:before { + content: "\f089"; } + +.fa-star-half-alt:before { + content: "\f5c0"; } + +.fa-star-of-david:before { + content: "\f69a"; } + +.fa-star-of-life:before { + content: "\f621"; } + +.fa-staylinked:before { + content: "\f3f5"; } + +.fa-steam:before { + content: "\f1b6"; } + +.fa-steam-square:before { + content: "\f1b7"; } + +.fa-steam-symbol:before { + content: "\f3f6"; } + +.fa-step-backward:before { + content: "\f048"; } + +.fa-step-forward:before { + content: "\f051"; } + +.fa-stethoscope:before { + content: "\f0f1"; } + +.fa-sticker-mule:before { + content: "\f3f7"; } + +.fa-sticky-note:before { + content: "\f249"; } + +.fa-stop:before { + content: "\f04d"; } + +.fa-stop-circle:before { + content: "\f28d"; } + +.fa-stopwatch:before { + content: "\f2f2"; } + +.fa-stopwatch-20:before { + content: "\f96f"; } + +.fa-store:before { + content: "\f54e"; } + +.fa-store-alt:before { + content: "\f54f"; } + +.fa-store-alt-slash:before { + content: "\f970"; } + +.fa-store-slash:before { + content: "\f971"; } + +.fa-strava:before { + content: "\f428"; } + +.fa-stream:before { + content: "\f550"; } + +.fa-street-view:before { + content: "\f21d"; } + +.fa-strikethrough:before { + content: "\f0cc"; } + +.fa-stripe:before { + content: "\f429"; } + +.fa-stripe-s:before { + content: "\f42a"; } + +.fa-stroopwafel:before { + content: "\f551"; } + +.fa-studiovinari:before { + content: "\f3f8"; } + +.fa-stumbleupon:before { + content: "\f1a4"; } + +.fa-stumbleupon-circle:before { + content: "\f1a3"; } + +.fa-subscript:before { + content: "\f12c"; } + +.fa-subway:before { + content: "\f239"; } + +.fa-suitcase:before { + content: "\f0f2"; } + +.fa-suitcase-rolling:before { + content: "\f5c1"; } + +.fa-sun:before { + content: "\f185"; } + +.fa-superpowers:before { + content: "\f2dd"; } + +.fa-superscript:before { + content: "\f12b"; } + +.fa-supple:before { + content: "\f3f9"; } + +.fa-surprise:before { + content: "\f5c2"; } + +.fa-suse:before { + content: "\f7d6"; } + +.fa-swatchbook:before { + content: "\f5c3"; } + +.fa-swift:before { + content: "\f8e1"; } + +.fa-swimmer:before { + content: "\f5c4"; } + +.fa-swimming-pool:before { + content: "\f5c5"; } + +.fa-symfony:before { + content: "\f83d"; } + +.fa-synagogue:before { + content: "\f69b"; } + +.fa-sync:before { + content: "\f021"; } + +.fa-sync-alt:before { + content: "\f2f1"; } + +.fa-syringe:before { + content: "\f48e"; } + +.fa-table:before { + content: "\f0ce"; } + +.fa-table-tennis:before { + content: "\f45d"; } + +.fa-tablet:before { + content: "\f10a"; } + +.fa-tablet-alt:before { + content: "\f3fa"; } + +.fa-tablets:before { + content: "\f490"; } + +.fa-tachometer-alt:before { + content: "\f3fd"; } + +.fa-tag:before { + content: "\f02b"; } + +.fa-tags:before { + content: "\f02c"; } + +.fa-tape:before { + content: "\f4db"; } + +.fa-tasks:before { + content: "\f0ae"; } + +.fa-taxi:before { + content: "\f1ba"; } + +.fa-teamspeak:before { + content: "\f4f9"; } + +.fa-teeth:before { + content: "\f62e"; } + +.fa-teeth-open:before { + content: "\f62f"; } + +.fa-telegram:before { + content: "\f2c6"; } + +.fa-telegram-plane:before { + content: "\f3fe"; } + +.fa-temperature-high:before { + content: "\f769"; } + +.fa-temperature-low:before { + content: "\f76b"; } + +.fa-tencent-weibo:before { + content: "\f1d5"; } + +.fa-tenge:before { + content: "\f7d7"; } + +.fa-terminal:before { + content: "\f120"; } + +.fa-text-height:before { + content: "\f034"; } + +.fa-text-width:before { + content: "\f035"; } + +.fa-th:before { + content: "\f00a"; } + +.fa-th-large:before { + content: "\f009"; } + +.fa-th-list:before { + content: "\f00b"; } + +.fa-the-red-yeti:before { + content: "\f69d"; } + +.fa-theater-masks:before { + content: "\f630"; } + +.fa-themeco:before { + content: "\f5c6"; } + +.fa-themeisle:before { + content: "\f2b2"; } + +.fa-thermometer:before { + content: "\f491"; } + +.fa-thermometer-empty:before { + content: "\f2cb"; } + +.fa-thermometer-full:before { + content: "\f2c7"; } + +.fa-thermometer-half:before { + content: "\f2c9"; } + +.fa-thermometer-quarter:before { + content: "\f2ca"; } + +.fa-thermometer-three-quarters:before { + content: "\f2c8"; } + +.fa-think-peaks:before { + content: "\f731"; } + +.fa-thumbs-down:before { + content: "\f165"; } + +.fa-thumbs-up:before { + content: "\f164"; } + +.fa-thumbtack:before { + content: "\f08d"; } + +.fa-ticket-alt:before { + content: "\f3ff"; } + +.fa-times:before { + content: "\f00d"; } + +.fa-times-circle:before { + content: "\f057"; } + +.fa-tint:before { + content: "\f043"; } + +.fa-tint-slash:before { + content: "\f5c7"; } + +.fa-tired:before { + content: "\f5c8"; } + +.fa-toggle-off:before { + content: "\f204"; } + +.fa-toggle-on:before { + content: "\f205"; } + +.fa-toilet:before { + content: "\f7d8"; } + +.fa-toilet-paper:before { + content: "\f71e"; } + +.fa-toilet-paper-slash:before { + content: "\f972"; } + +.fa-toolbox:before { + content: "\f552"; } + +.fa-tools:before { + content: "\f7d9"; } + +.fa-tooth:before { + content: "\f5c9"; } + +.fa-torah:before { + content: "\f6a0"; } + +.fa-torii-gate:before { + content: "\f6a1"; } + +.fa-tractor:before { + content: "\f722"; } + +.fa-trade-federation:before { + content: "\f513"; } + +.fa-trademark:before { + content: "\f25c"; } + +.fa-traffic-light:before { + content: "\f637"; } + +.fa-trailer:before { + content: "\f941"; } + +.fa-train:before { + content: "\f238"; } + +.fa-tram:before { + content: "\f7da"; } + +.fa-transgender:before { + content: "\f224"; } + +.fa-transgender-alt:before { + content: "\f225"; } + +.fa-trash:before { + content: "\f1f8"; } + +.fa-trash-alt:before { + content: "\f2ed"; } + +.fa-trash-restore:before { + content: "\f829"; } + +.fa-trash-restore-alt:before { + content: "\f82a"; } + +.fa-tree:before { + content: "\f1bb"; } + +.fa-trello:before { + content: "\f181"; } + +.fa-tripadvisor:before { + content: "\f262"; } + +.fa-trophy:before { + content: "\f091"; } + +.fa-truck:before { + content: "\f0d1"; } + +.fa-truck-loading:before { + content: "\f4de"; } + +.fa-truck-monster:before { + content: "\f63b"; } + +.fa-truck-moving:before { + content: "\f4df"; } + +.fa-truck-pickup:before { + content: "\f63c"; } + +.fa-tshirt:before { + content: "\f553"; } + +.fa-tty:before { + content: "\f1e4"; } + +.fa-tumblr:before { + content: "\f173"; } + +.fa-tumblr-square:before { + content: "\f174"; } + +.fa-tv:before { + content: "\f26c"; } + +.fa-twitch:before { + content: "\f1e8"; } + +.fa-twitter:before { + content: "\f099"; } + +.fa-twitter-square:before { + content: "\f081"; } + +.fa-typo3:before { + content: "\f42b"; } + +.fa-uber:before { + content: "\f402"; } + +.fa-ubuntu:before { + content: "\f7df"; } + +.fa-uikit:before { + content: "\f403"; } + +.fa-umbraco:before { + content: "\f8e8"; } + +.fa-umbrella:before { + content: "\f0e9"; } + +.fa-umbrella-beach:before { + content: "\f5ca"; } + +.fa-underline:before { + content: "\f0cd"; } + +.fa-undo:before { + content: "\f0e2"; } + +.fa-undo-alt:before { + content: "\f2ea"; } + +.fa-uniregistry:before { + content: "\f404"; } + +.fa-unity:before { + content: "\f949"; } + +.fa-universal-access:before { + content: "\f29a"; } + +.fa-university:before { + content: "\f19c"; } + +.fa-unlink:before { + content: "\f127"; } + +.fa-unlock:before { + content: "\f09c"; } + +.fa-unlock-alt:before { + content: "\f13e"; } + +.fa-untappd:before { + content: "\f405"; } + +.fa-upload:before { + content: "\f093"; } + +.fa-ups:before { + content: "\f7e0"; } + +.fa-usb:before { + content: "\f287"; } + +.fa-user:before { + content: "\f007"; } + +.fa-user-alt:before { + content: "\f406"; } + +.fa-user-alt-slash:before { + content: "\f4fa"; } + +.fa-user-astronaut:before { + content: "\f4fb"; } + +.fa-user-check:before { + content: "\f4fc"; } + +.fa-user-circle:before { + content: "\f2bd"; } + +.fa-user-clock:before { + content: "\f4fd"; } + +.fa-user-cog:before { + content: "\f4fe"; } + +.fa-user-edit:before { + content: "\f4ff"; } + +.fa-user-friends:before { + content: "\f500"; } + +.fa-user-graduate:before { + content: "\f501"; } + +.fa-user-injured:before { + content: "\f728"; } + +.fa-user-lock:before { + content: "\f502"; } + +.fa-user-md:before { + content: "\f0f0"; } + +.fa-user-minus:before { + content: "\f503"; } + +.fa-user-ninja:before { + content: "\f504"; } + +.fa-user-nurse:before { + content: "\f82f"; } + +.fa-user-plus:before { + content: "\f234"; } + +.fa-user-secret:before { + content: "\f21b"; } + +.fa-user-shield:before { + content: "\f505"; } + +.fa-user-slash:before { + content: "\f506"; } + +.fa-user-tag:before { + content: "\f507"; } + +.fa-user-tie:before { + content: "\f508"; } + +.fa-user-times:before { + content: "\f235"; } + +.fa-users:before { + content: "\f0c0"; } + +.fa-users-cog:before { + content: "\f509"; } + +.fa-usps:before { + content: "\f7e1"; } + +.fa-ussunnah:before { + content: "\f407"; } + +.fa-utensil-spoon:before { + content: "\f2e5"; } + +.fa-utensils:before { + content: "\f2e7"; } + +.fa-vaadin:before { + content: "\f408"; } + +.fa-vector-square:before { + content: "\f5cb"; } + +.fa-venus:before { + content: "\f221"; } + +.fa-venus-double:before { + content: "\f226"; } + +.fa-venus-mars:before { + content: "\f228"; } + +.fa-viacoin:before { + content: "\f237"; } + +.fa-viadeo:before { + content: "\f2a9"; } + +.fa-viadeo-square:before { + content: "\f2aa"; } + +.fa-vial:before { + content: "\f492"; } + +.fa-vials:before { + content: "\f493"; } + +.fa-viber:before { + content: "\f409"; } + +.fa-video:before { + content: "\f03d"; } + +.fa-video-slash:before { + content: "\f4e2"; } + +.fa-vihara:before { + content: "\f6a7"; } + +.fa-vimeo:before { + content: "\f40a"; } + +.fa-vimeo-square:before { + content: "\f194"; } + +.fa-vimeo-v:before { + content: "\f27d"; } + +.fa-vine:before { + content: "\f1ca"; } + +.fa-virus:before { + content: "\f974"; } + +.fa-virus-slash:before { + content: "\f975"; } + +.fa-viruses:before { + content: "\f976"; } + +.fa-vk:before { + content: "\f189"; } + +.fa-vnv:before { + content: "\f40b"; } + +.fa-voicemail:before { + content: "\f897"; } + +.fa-volleyball-ball:before { + content: "\f45f"; } + +.fa-volume-down:before { + content: "\f027"; } + +.fa-volume-mute:before { + content: "\f6a9"; } + +.fa-volume-off:before { + content: "\f026"; } + +.fa-volume-up:before { + content: "\f028"; } + +.fa-vote-yea:before { + content: "\f772"; } + +.fa-vr-cardboard:before { + content: "\f729"; } + +.fa-vuejs:before { + content: "\f41f"; } + +.fa-walking:before { + content: "\f554"; } + +.fa-wallet:before { + content: "\f555"; } + +.fa-warehouse:before { + content: "\f494"; } + +.fa-water:before { + content: "\f773"; } + +.fa-wave-square:before { + content: "\f83e"; } + +.fa-waze:before { + content: "\f83f"; } + +.fa-weebly:before { + content: "\f5cc"; } + +.fa-weibo:before { + content: "\f18a"; } + +.fa-weight:before { + content: "\f496"; } + +.fa-weight-hanging:before { + content: "\f5cd"; } + +.fa-weixin:before { + content: "\f1d7"; } + +.fa-whatsapp:before { + content: "\f232"; } + +.fa-whatsapp-square:before { + content: "\f40c"; } + +.fa-wheelchair:before { + content: "\f193"; } + +.fa-whmcs:before { + content: "\f40d"; } + +.fa-wifi:before { + content: "\f1eb"; } + +.fa-wikipedia-w:before { + content: "\f266"; } + +.fa-wind:before { + content: "\f72e"; } + +.fa-window-close:before { + content: "\f410"; } + +.fa-window-maximize:before { + content: "\f2d0"; } + +.fa-window-minimize:before { + content: "\f2d1"; } + +.fa-window-restore:before { + content: "\f2d2"; } + +.fa-windows:before { + content: "\f17a"; } + +.fa-wine-bottle:before { + content: "\f72f"; } + +.fa-wine-glass:before { + content: "\f4e3"; } + +.fa-wine-glass-alt:before { + content: "\f5ce"; } + +.fa-wix:before { + content: "\f5cf"; } + +.fa-wizards-of-the-coast:before { + content: "\f730"; } + +.fa-wolf-pack-battalion:before { + content: "\f514"; } + +.fa-won-sign:before { + content: "\f159"; } + +.fa-wordpress:before { + content: "\f19a"; } + +.fa-wordpress-simple:before { + content: "\f411"; } + +.fa-wpbeginner:before { + content: "\f297"; } + +.fa-wpexplorer:before { + content: "\f2de"; } + +.fa-wpforms:before { + content: "\f298"; } + +.fa-wpressr:before { + content: "\f3e4"; } + +.fa-wrench:before { + content: "\f0ad"; } + +.fa-x-ray:before { + content: "\f497"; } + +.fa-xbox:before { + content: "\f412"; } + +.fa-xing:before { + content: "\f168"; } + +.fa-xing-square:before { + content: "\f169"; } + +.fa-y-combinator:before { + content: "\f23b"; } + +.fa-yahoo:before { + content: "\f19e"; } + +.fa-yammer:before { + content: "\f840"; } + +.fa-yandex:before { + content: "\f413"; } + +.fa-yandex-international:before { + content: "\f414"; } + +.fa-yarn:before { + content: "\f7e3"; } + +.fa-yelp:before { + content: "\f1e9"; } + +.fa-yen-sign:before { + content: "\f157"; } + +.fa-yin-yang:before { + content: "\f6ad"; } + +.fa-yoast:before { + content: "\f2b1"; } + +.fa-youtube:before { + content: "\f167"; } + +.fa-youtube-square:before { + content: "\f431"; } + +.fa-zhihu:before { + content: "\f63f"; } + +.sr-only { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } + +.sr-only-focusable:active, .sr-only-focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; } diff --git a/theme/font-awesome/css/solid.css b/theme/font-awesome/css/solid.css new file mode 100644 index 00000000..252d7757 --- /dev/null +++ b/theme/font-awesome/css/solid.css @@ -0,0 +1,16 @@ +/*! + * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 900; + font-display: block; + src: url("../webfonts/fa-solid-900.eot"); + src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } + +.fa, +.fas { + font-family: 'Font Awesome 5 Free'; + font-weight: 900; } diff --git a/theme/font-awesome/webfonts/fa-brands-400.eot b/theme/font-awesome/webfonts/fa-brands-400.eot new file mode 100644 index 00000000..a1bc094a Binary files /dev/null and b/theme/font-awesome/webfonts/fa-brands-400.eot differ diff --git a/theme/font-awesome/webfonts/fa-brands-400.svg b/theme/font-awesome/webfonts/fa-brands-400.svg new file mode 100644 index 00000000..46ad237a --- /dev/null +++ b/theme/font-awesome/webfonts/fa-brands-400.svg @@ -0,0 +1,3570 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/theme/font-awesome/webfonts/fa-brands-400.ttf b/theme/font-awesome/webfonts/fa-brands-400.ttf new file mode 100644 index 00000000..948a2a6c Binary files /dev/null and b/theme/font-awesome/webfonts/fa-brands-400.ttf differ diff --git a/theme/font-awesome/webfonts/fa-brands-400.woff b/theme/font-awesome/webfonts/fa-brands-400.woff new file mode 100644 index 00000000..2a89d521 Binary files /dev/null and b/theme/font-awesome/webfonts/fa-brands-400.woff differ diff --git a/theme/font-awesome/webfonts/fa-brands-400.woff2 b/theme/font-awesome/webfonts/fa-brands-400.woff2 new file mode 100644 index 00000000..141a90a9 Binary files /dev/null and b/theme/font-awesome/webfonts/fa-brands-400.woff2 differ diff --git a/theme/font-awesome/webfonts/fa-solid-900.eot b/theme/font-awesome/webfonts/fa-solid-900.eot new file mode 100644 index 00000000..d3b77c22 Binary files /dev/null and b/theme/font-awesome/webfonts/fa-solid-900.eot differ diff --git a/theme/font-awesome/webfonts/fa-solid-900.svg b/theme/font-awesome/webfonts/fa-solid-900.svg new file mode 100644 index 00000000..7742838b --- /dev/null +++ b/theme/font-awesome/webfonts/fa-solid-900.svg @@ -0,0 +1,4938 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/theme/font-awesome/webfonts/fa-solid-900.ttf b/theme/font-awesome/webfonts/fa-solid-900.ttf new file mode 100644 index 00000000..5b979039 Binary files /dev/null and b/theme/font-awesome/webfonts/fa-solid-900.ttf differ diff --git a/theme/font-awesome/webfonts/fa-solid-900.woff b/theme/font-awesome/webfonts/fa-solid-900.woff new file mode 100644 index 00000000..beec7917 Binary files /dev/null and b/theme/font-awesome/webfonts/fa-solid-900.woff differ diff --git a/theme/font-awesome/webfonts/fa-solid-900.woff2 b/theme/font-awesome/webfonts/fa-solid-900.woff2 new file mode 100644 index 00000000..978a681a Binary files /dev/null and b/theme/font-awesome/webfonts/fa-solid-900.woff2 differ diff --git a/theme/img/cc/by-nc-nd.png b/theme/img/cc/by-nc-nd.png new file mode 100644 index 00000000..d8b23ee2 Binary files /dev/null and b/theme/img/cc/by-nc-nd.png differ diff --git a/theme/img/cc/by-nc-sa.png b/theme/img/cc/by-nc-sa.png new file mode 100644 index 00000000..3d2049bb Binary files /dev/null and b/theme/img/cc/by-nc-sa.png differ diff --git a/theme/img/cc/by-nc.png b/theme/img/cc/by-nc.png new file mode 100644 index 00000000..dc78c3ba Binary files /dev/null and b/theme/img/cc/by-nc.png differ diff --git a/theme/img/cc/by-nd.png b/theme/img/cc/by-nd.png new file mode 100644 index 00000000..53567973 Binary files /dev/null and b/theme/img/cc/by-nd.png differ diff --git a/theme/img/cc/by-sa.png b/theme/img/cc/by-sa.png new file mode 100644 index 00000000..c1b97c48 Binary files /dev/null and b/theme/img/cc/by-sa.png differ diff --git a/theme/img/cc/by.png b/theme/img/cc/by.png new file mode 100644 index 00000000..863f00bb Binary files /dev/null and b/theme/img/cc/by.png differ diff --git a/theme/img/profile.png b/theme/img/profile.png new file mode 100644 index 00000000..8ccf2e8a Binary files /dev/null and b/theme/img/profile.png differ diff --git a/theme/img/profile_license.txt b/theme/img/profile_license.txt new file mode 100644 index 00000000..a38ff919 --- /dev/null +++ b/theme/img/profile_license.txt @@ -0,0 +1 @@ +https://www.iconfinder.com/icons/196742/account_boy_male_man_people_profile_user_icon \ No newline at end of file diff --git a/theme/isso/isso.min.js b/theme/isso/isso.min.js new file mode 100644 index 00000000..e0cb31d6 --- /dev/null +++ b/theme/isso/isso.min.js @@ -0,0 +1,20 @@ +/** + * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. + * Released under MIT license, http://github.com/requirejs/almond/LICENSE + */ + +/* + Copyright (C) 2013 Gregory Schier + Copyright (C) 2013 Martin Zimmermann + + Inspired by http://codepen.io/gschier/pen/GLvAy +*/ + +/* + * Copyright 2014, Martin Zimmermann . All rights reserved. + * Distributed under the MIT license + */ + +!function(){var requirejs,require,define;!function(e){function t(e,t){return x.call(e,t)}function n(e,t){var n,o,i,a,r,s,m,c,d,p,l,u,f=t&&t.split("/"),h=v.map,b=h&&h["*"]||{};if(e){for(e=e.split("/"),r=e.length-1,v.nodeIdCompat&&g.test(e[r])&&(e[r]=e[r].replace(g,"")),"."===e[0].charAt(0)&&f&&(u=f.slice(0,f.length-1),e=u.concat(e)),d=0;d0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}if((f||b)&&h){for(n=e.split("/"),d=n.length;d>0;d-=1){if(o=n.slice(0,d).join("/"),f)for(p=f.length;p>0;p-=1)if((i=h[f.slice(0,p).join("/")])&&(i=i[o])){a=i,s=d;break}if(a)break;!m&&b&&b[o]&&(m=b[o],c=d)}!a&&m&&(a=m,s=c),a&&(n.splice(0,s,a),e=n.join("/"))}return e}function o(t,n){return function(){var o=w.call(arguments,0);return"string"!=typeof o[0]&&1===o.length&&o.push(null),p.apply(e,o.concat([t,n]))}}function i(e){return function(t){return n(t,e)}}function a(e){return function(t){f[e]=t}}function r(n){if(t(h,n)){var o=h[n];delete h[n],b[n]=!0,d.apply(e,o)}if(!t(f,n)&&!t(b,n))throw new Error("No "+n);return f[n]}function s(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function m(e){return e?s(e):[]}function c(e){return function(){return v&&v.config&&v.config[e]||{}}}var d,p,l,u,f={},h={},v={},b={},x=Object.prototype.hasOwnProperty,w=[].slice,g=/\.js$/;l=function(e,t){var o,a=s(e),m=a[0],c=t[1];return e=a[1],m&&(m=n(m,c),o=r(m)),m?e=o&&o.normalize?o.normalize(e,i(c)):n(e,c):(e=n(e,c),a=s(e),m=a[0],e=a[1],m&&(o=r(m))),{f:m?m+"!"+e:e,n:e,pr:m,p:o}},u={require:function(e){return o(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:c(e)}}},d=function(n,i,s,c){var d,p,v,x,w,g,y,k=[],j=typeof s;if(c=c||n,g=m(c),"undefined"===j||"function"===j){for(i=!i.length&&s.length?["require","exports","module"]:i,w=0;w1?1:0]};case"ru":return function(e,t){return t%10==1&&t%100!=11?e[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?e[1]:void 0!==e[2]?e[2]:e[1]};case"oc":return function(e,t){return e[t>1?1:0]};case"pl":return function(e,t){return 1===t?e[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?e[1]:void 0!==e[2]?e[2]:e[1]};case"sk":return function(e,t){return 1===t?e[0]:2===t||3===t||4===t?e[1]:void 0!==e[2]?e[2]:e[1]};default:return null}},A=e.lang;S(A)||(A="en");var E={bg:t,cs:n,da:o,de:i,el:g,en:a,eo:u,es:y,fa:r,fi:s,fr:m,it:l,hr:c,hu:d,oc:f,pl:h,pt:v,pt_BR:v,ru:p,sk:b,sv:x,nl:w,vi:k,zh:z,zh_CN:z,zh_TW:C},T=S(A),N=function(t){return e[t+"-text-"+A]||E[A][t]||a[t]||"???"};return{lang:A,translate:N,pluralize:function(e,t){var n;return n=N(e),n.indexOf("\n")>-1&&(n=T(n.split("\n"),+t)),n?n.replace("{{ n }}",+t):n}}}),define("app/lib/promise",[],function(){"use strict";var e=function(e){console.log(e)},t=function(){this.success=[],this.errors=[]};t.prototype.then=function(t,n){this.success.push(t),n?this.errors.push(n):this.errors.push(e)};var n=function(){this.promise=new t};n.prototype={promise:t,resolve:function(e){this.promise.success.forEach(function(t){window.setTimeout(function(){t(e)},0)})},reject:function(e){this.promise.errors.forEach(function(t){window.setTimeout(function(){t(e)},0)})}};var o=function(e,n){return e instanceof t?e.then(n):n(e)};return{defer:function(){return new n},when:o}}),define("app/globals",[],function(){"use strict";var e=function(){this.values=[]};return e.prototype.update=function(e){this.values.push((new Date).getTime()-e.getTime())},e.prototype.localTime=function(){return new Date((new Date).getTime()-this.values.reduce(function(e,t){return e+t})/this.values.length)},{offset:new e}}),define("app/api",["app/lib/promise","app/globals"],function(e,t){"use strict";for(var n,o,i=function(){return window.location.pathname},a=document.getElementsByTagName("script"),r=0;r=500?a&&a(s.body):i({status:s.status,body:s.responseText})}var s=new XMLHttpRequest;try{s.open(e,n,!0),s.withCredentials=!0,s.setRequestHeader("Content-Type","application/json"),s.onreadystatechange=function(){4===s.readyState&&r()}}catch(e){(a||console.log)(e.message)}s.send(o)},m=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&null!==e[n]&&void 0!==e[n]&&(t+=n+"="+encodeURIComponent(e[n])+"&");return t.substring(0,t.length-1)};return{endpoint:o,salt:"Eech7co8Ohloopo9Ol6baimi",create:function(t,n){var a=e.defer();return s("POST",o+"/new?"+m({uri:t||i()}),JSON.stringify(n),function(e){201===e.status||202===e.status?a.resolve(JSON.parse(e.body)):a.reject(e.body)}),a.promise},modify:function(t,n){var i=e.defer();return s("PUT",o+"/id/"+t,JSON.stringify(n),function(e){403===e.status?i.reject("Not authorized to modify this comment!"):200===e.status?i.resolve(JSON.parse(e.body)):i.reject(e.body)}),i.promise},remove:function(t){var n=e.defer();return s("DELETE",o+"/id/"+t,null,function(e){403===e.status?n.reject("Not authorized to remove this comment!"):200===e.status?n.resolve(null===JSON.parse(e.body)):n.reject(e.body)}),n.promise},view:function(t,n){var i=e.defer();return s("GET",o+"/id/"+t+"?"+m({plain:n}),null,function(e){i.resolve(JSON.parse(e.body))}),i.promise},fetch:function(t,n,a,r,c){void 0===n&&(n="inf"),void 0===a&&(a="inf"),void 0===r&&(r=null);var d={uri:t||i(),after:c,parent:r};"inf"!==n&&(d.limit=n),"inf"!==a&&(d.nested_limit=a);var p=e.defer();return s("GET",o+"/?"+m(d),null,function(e){200===e.status?p.resolve(JSON.parse(e.body)):404===e.status?p.resolve({total_replies:0}):p.reject(e.body)}),p.promise},count:function(t){var n=e.defer();return s("POST",o+"/count",JSON.stringify(t),function(e){200===e.status?n.resolve(JSON.parse(e.body)):n.reject(e.body)}),n.promise},like:function(t){var n=e.defer();return s("POST",o+"/id/"+t+"/like",null,function(e){n.resolve(JSON.parse(e.body))}),n.promise},dislike:function(t){var n=e.defer();return s("POST",o+"/id/"+t+"/dislike",null,function(e){n.resolve(JSON.parse(e.body))}),n.promise},feed:function(e){return o+"/feed?"+m({uri:e||i()})},preview:function(t){var n=e.defer();return s("POST",o+"/preview",JSON.stringify({text:t}),function(e){200===e.status?n.resolve(JSON.parse(e.body).text):n.reject(e.body)}),n.promise}}}),define("app/dom",[],function(){"use strict";function e(e){this.obj=e,this.replace=function(t){var o=n.htmlify(t);return e.parentNode.replaceChild(o.obj,e),o},this.prepend=function(t){var o=n.htmlify(t);return e.insertBefore(o.obj,e.firstChild),o},this.append=function(t){var o=n.htmlify(t);return e.appendChild(o.obj),o},this.insertAfter=function(t){var o=n.htmlify(t);return e.parentNode.insertBefore(o.obj,e.nextSibling),o},this.on=function(t,n,o){e.addEventListener(t,function(e){n(e),(void 0===o||o)&&e.preventDefault()})},this.toggle=function(e,n,o){var i=new t(n,o);this.on(e,function(){i.next()})},this.detach=function(){return e.parentNode.removeChild(this.obj),this},this.remove=function(){e.parentNode.removeChild(this.obj)},this.show=function(){e.style.display="block"},this.hide=function(){e.style.display="none"},this.setText=function(t){e.textContent=t},this.setHtml=function(t){e.innerHTML=t},this.blur=function(){e.blur()},this.focus=function(){e.focus()},this.scrollIntoView=function(t){e.scrollIntoView(t)},this.checked=function(){return e.checked},this.setAttribute=function(t,n){e.setAttribute(t,n)},this.getAttribute=function(t){return e.getAttribute(t)},this.classList=e.classList,Object.defineProperties(this,{textContent:{get:function(){return e.textContent},set:function(t){e.textContent=t}},innerHTML:{get:function(){return e.innerHTML},set:function(t){e.innerHTML=t}},value:{get:function(){return e.value},set:function(t){e.value=t}},placeholder:{get:function(){return e.placeholder},set:function(t){e.placeholder=t}}})}var t=function(e,t){this.state=!1,this.next=function(){this.state?(this.state=!1,t(this)):(this.state=!0,e(this))},this.wait=function(){this.state=!this.state}},n=function(t,n,o){void 0===o&&(o=!0),n||(n=window.document),n instanceof e&&(n=n.obj);var i=[].slice.call(n.querySelectorAll(t),0);return 0===i.length?null:1===i.length&&o?new e(i[0]):(i=[].slice.call(i,0),i.map(function(t){return new e(t)}))};return n.htmlify=function(t){if(t instanceof e)return t;if(t instanceof window.Element)return new e(t);var o=n.new("div");return o.innerHTML=t,new e(o.firstChild)},n.new=function(e,t){var n=document.createElement(e.split(".")[0]);return e.split(".").slice(1).forEach(function(e){n.classList.add(e)}),["A","LINK"].indexOf(n.nodeName)>-1&&(n.href="#"),t||0===t||(t=""),["TEXTAREA","INPUT"].indexOf(n.nodeName)>-1?n.value=t:n.textContent=t,n},n.each=function(e,t){Array.prototype.forEach.call(document.getElementsByTagName(e),t)},n}),define("app/utils",["app/i18n"],function(e){"use strict";var t,n=function(e){return(document.cookie.match("(^|; )"+e+"=([^;]*)")||0)[2]},o=function(e,t,n){return n=n||"0",e+="",e.length>=t?e:new Array(t-e.length+1).join(n)+e},i=function(t,n){var o=(t.getTime()-n.getTime())/1e3;(isNaN(o)||o<0)&&(o=0);var i=Math.floor(o/60),a=Math.floor(i/60),r=Math.floor(a/24);return o<=45&&e.translate("date-now")||o<=90&&e.pluralize("date-minute",1)||i<=45&&e.pluralize("date-minute",i)||i<=90&&e.pluralize("date-hour",1)||a<=22&&e.pluralize("date-hour",a)||a<=36&&e.pluralize("date-day",1)||r<=5&&e.pluralize("date-day",r)||r<=8&&e.pluralize("date-week",1)||r<=21&&e.pluralize("date-week",Math.floor(r/7))||r<=45&&e.pluralize("date-month",1)||r<=345&&e.pluralize("date-month",Math.floor(r/30))||r<=547&&e.pluralize("date-year",1)||e.pluralize("date-year",Math.floor(r/365.25))},a={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},r=function(e){return String(e).replace(/[&<>"'\/]/g,function(e){return a[e]})},s=function(e){var t=document.createElement("div");return t.innerHTML=e.replace(/

<\/div>/gi,"
").replace(/
/gi,"
").replace(/
/gi,"\n").replace(/ /gi," "),t.textContent.trim()},m=function(e){return e=r(e),e.replace(/\n\n/gi,"

").replace(/\n/gi,"
")};try{localStorage.setItem("x","y"),localStorage.removeItem("x"),t=localStorage}catch(e){t=function(e){return{setItem:function(t,n){e[t]=n},getItem:function(t){return void 0!==e[t]?e[t]:null},removeItem:function(t){delete e[t]}}}({})}return{cookie:n,pad:o,ago:i,text:s,detext:m,localStorageImpl:t}}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("libjs-jade-runtime",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jade=e()}}(function(){return function e(t,n,o){function i(r,s){if(!n[r]){if(!t[r]){var m="function"==typeof require&&require;if(!s&&m)return m(r,!0);if(a)return a(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[r]={exports:{}};t[r][0].call(d.exports,function(e){var n=t[r][1][e];return i(n||e)},d,d.exports,e,t,n,o)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r":">",'"':"""},m=/[&<>"]/g;n.escape=r,n.rethrow=function t(n,o,i,a){if(!(n instanceof Error))throw n;if(!("undefined"==typeof window&&o||a))throw n.message+=" on line "+i,n;try{a=a||e("fs").readFileSync(o,"utf8")}catch(e){t(n,null,i)}var r=3,s=a.split("\n"),m=Math.max(i-r,0),c=Math.min(s.length,i+r),r=s.slice(m,c).map(function(e,t){var n=t+m+1;return(n==i?" > ":" ")+n+"| "+e}).join("\n");throw n.path=o,n.message=(o||"Jade")+":"+i+"\n"+r+"\n\n"+n.message,n},n.DebugItem=function(e,t){this.lineno=e,this.filename=t}},{fs:2}],2:[function(e,t,n){},{}]},{},[1])(1)}),define("jade",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),define("jade!app/text/postbox",function(){var e=function(e){return function(t){var n,o=[],i=t||{};return function(t,i,a,r){o.push('
'+e.escape(null==(n=a("postbox-text"))?"":n)+'

")}.call(this,"author"in i?i.author:"undefined"!=typeof author?author:void 0,"email"in i?i.email:"undefined"!=typeof email?email:void 0,"i18n"in i?i.i18n:"undefined"!=typeof i18n?i18n:void 0,"website"in i?i.website:"undefined"!=typeof website?website:void 0),o.join("")}};return e.compiled=!0,e}),define("jade!app/text/comment",function(){var e=function(e){return function(t){var n,o=[],i=t||{};return function(t,i,a,r,s,m,c){o.push("'),a.gravatar&&o.push('
"),a.avatar&&o.push('
"),o.push('
'),t(i.website)?o.push("'+e.escape(null==(n=t(i.author)?i.author:m("comment-anonymous"))?"":n)+""):o.push(''+e.escape(null==(n=t(i.author)?i.author:m("comment-anonymous"))?"":n)+""),o.push(''+e.escape(null==(n=2==i.mode?m("comment-queued"):4==i.mode?m("comment-deleted"):"")?"":n)+'
'),4==i.mode?o.push("

 

"):o.push(null==(n=i.text)?"":n),o.push('
')}.call(this,"bool"in i?i.bool:"undefined"!=typeof bool?bool:void 0,"comment"in i?i.comment:"undefined"!=typeof comment?comment:void 0,"conf"in i?i.conf:"undefined"!=typeof conf?conf:void 0,"datetime"in i?i.datetime:"undefined"!=typeof datetime?datetime:void 0,"humanize"in i?i.humanize:"undefined"!=typeof humanize?humanize:void 0,"i18n"in i?i.i18n:"undefined"!=typeof i18n?i18n:void 0,"svg"in i?i.svg:"undefined"!=typeof svg?svg:void 0),o.join("")}};return e.compiled=!0,e}),define("jade!app/text/comment-loader",function(){var e=function(e){return function(t){var n,o=[],i=t||{};return function(t,i){o.push("'+e.escape(null==(n=i("comment-hidden",t.hidden_replies))?"":n)+"
")}.call(this,"comment"in i?i.comment:"undefined"!=typeof comment?comment:void 0,"pluralize"in i?i.pluralize:"undefined"!=typeof pluralize?pluralize:void 0),o.join("")}};return e.compiled=!0,e}),define("app/jade",["libjs-jade-runtime","app/utils","jade!app/text/postbox","jade!app/text/comment","jade!app/text/comment-loader"],function(runtime,utils,tt_postbox,tt_comment,tt_comment_loader){"use strict";var globals={},templates={},load=function(name,js){templates[name]=function(jade){var fn;return js.compiled?js(jade):(eval("fn = "+js),fn)}(runtime)},set=function(e,t){globals[e]=t};return load("postbox",tt_postbox),load("comment",tt_comment),load("comment-loader",tt_comment_loader),set("bool",function(e){return!!e}),set("humanize",function(e){return"object"!=typeof e&&(e=new Date(1e3*parseInt(e,10))),e.toString()}),set("datetime",function(e){return"object"!=typeof e&&(e=new Date(1e3*parseInt(e,10))),[e.getUTCFullYear(),utils.pad(e.getUTCMonth(),2),utils.pad(e.getUTCDay(),2)].join("-")+"T"+[utils.pad(e.getUTCHours(),2),utils.pad(e.getUTCMinutes(),2),utils.pad(e.getUTCSeconds(),2)].join(":")+"Z"}),{set:set,render:function(e,t){var n;if(!templates[e])throw new Error("Template not found: '"+e+"'");t=t||{};var o=[];for(var i in t)t.hasOwnProperty(i)&&!globals.hasOwnProperty(i)&&(o.push(i),globals[i]=t[i]);n=templates[e](globals);for(var a=0;a=t?e:new Array(t-e.length+1).join("0")+e},o=function(e,t,n,o,i,a){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("x",o+t*i),r.setAttribute("y",o+n*i),r.setAttribute("width",i),r.setAttribute("height",i),r.setAttribute("style","fill: "+a),e.appendChild(r)},i=function(i,a,r){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");return s.setAttribute("version","1.1"),s.setAttribute("viewBox","0 0 "+r+" "+r),s.setAttribute("preserveAspectRatio","xMinYMin meet"),s.setAttribute("shape-rendering","crispEdges"),o(s,0,0,0,r+2*a,t["avatar-bg"]),null===typeof i?s:(e.when(i,function(e){var i=n((parseInt(e.substr(-16),16)%Math.pow(2,18)).toString(2),18),r=0;s.setAttribute("data-hash",e);for(var m=parseInt(i.substring(i.length-3,i.length),2),c=t["avatar-fg"][m%t["avatar-fg"].length],d=0;d0?e(".notification-section",m).show():e(".notification-section",m).hide()};e("[name='email']",m).on("input",c),c(),n["require-email"]&&e("[name='email']",m).setAttribute("placeholder",e("[name='email']",m).getAttribute("placeholder").replace(/ \(.*\)/,"")),n["require-author"]&&(e("[name='author']",m).placeholder=e("[name='author']",m).placeholder.replace(/ \(.*\)/,"")),e("[name='preview']",m).on("click",function(){o.preview(t.text(e(".textarea",m).innerHTML)).then(function(t){e(".preview .text",m).innerHTML=t,m.classList.add("preview-mode")})});var p=function(){e(".preview .text",m).innerHTML="",m.classList.remove("preview-mode")};return e("[name='edit']",m).on("click",p),e(".preview",m).on("click",p),e("[type=submit]",m).on("click",function(){if(p(),m.validate()){var n=e("[name=author]",m).value||null,i=e("[name=email]",m).value||null,r=e("[name=website]",m).value||null;s.setItem("author",JSON.stringify(n)),s.setItem("email",JSON.stringify(i)),s.setItem("website",JSON.stringify(r)),o.create(e("#isso-thread").getAttribute("data-isso-id"),{author:n,email:i,website:r,text:t.text(e(".textarea",m).innerHTML),parent:a||null,title:e("#isso-thread").getAttribute("data-title")||null,notification:e("[name=notification]",m).checked()?1:0}).then(function(t){e(".textarea",m).innerHTML="",e(".textarea",m).blur(),d(t,!0),null!==a&&m.onsuccess()})}}),r.editorify(e(".textarea",m)),m},c=function(t,a){var r;null===t.id?(r=e("#isso-root"),t.name="null"):(r=e("#isso-"+t.id+" > .text-wrapper > .isso-follow-up"),t.name=t.id);var s=e.htmlify(i.render("comment-loader",{comment:t}));r.append(s),e("a.load_hidden",s).on("click",function(){s.remove(),o.fetch(e("#isso-thread").getAttribute("data-isso-id"),n["reveal-on-click"],n["max-comments-nested"],t.id,a).then(function(e){if(0!==e.total_replies){var t=0;e.replies.forEach(function(e){d(e,!1),e.created>t&&(t=e.created)}),e.hidden_replies>0&&c(e,t)}},function(e){console.log(e)})})},d=function(p,l){var u=e.htmlify(i.render("comment",{comment:p})),f=function(){e(".permalink > time",u).textContent=t.ago(s.offset.localTime(),new Date(1e3*parseInt(p.created,10))),setTimeout(f,6e4)};f(),n.avatar&&e("div.avatar > svg",u).replace(r.identicons.generate(p.hash,4,48));var h;h=e(null===p.parent?"#isso-root":"#isso-"+p.parent+" > .text-wrapper > .isso-follow-up"),h.append(u),l&&u.scrollIntoView();var v=e("#isso-"+p.id+" > .text-wrapper > .isso-comment-footer"),b=e("#isso-"+p.id+" > .text-wrapper > .isso-comment-header"),x=e("#isso-"+p.id+" > .text-wrapper > .text"),w=null;if(e("a.reply",v).toggle("click",function(t){w=v.insertAfter(new m(null===p.parent?p.id:p.parent)),w.onsuccess=function(){t.next()},e(".textarea",w).focus(),e("a.reply",v).textContent=a.translate("comment-close")},function(){w.remove(),e("a.reply",v).textContent=a.translate("comment-reply")}),n.vote){var g=n["vote-levels"];"string"==typeof g&&(g=g.split(","));var y=function(t){var n=e("span.votes",v);if(null===n?v.prepend(e.new("span.votes",t)):n.textContent=t,t?u.classList.remove("isso-no-votes"):u.classList.add("isso-no-votes"),g)for(var o=!0,i=0;i<=g.length;i++)o&&(i>=g.length||t 

",e("a.edit",v).remove(),e("a.delete",v).remove()),t.textContent=a.translate("comment-delete")})});var k=function(n){t.cookie("isso-"+p.id)?setTimeout(function(){k(n)},15e3):null!==e(n,v)&&e(n,v).remove()};k("a.edit"),k("a.delete");var j=function(e){t.cookie("isso-"+p.id)?setTimeout(function(){j(e)},15e3):v.append(e)};if(!n["reply-to-self"]&&t.cookie("isso-"+p.id)&&j(e("a.reply",v).detach()),p.hasOwnProperty("replies")){var z=0;p.replies.forEach(function(e){d(e,!1),e.created>z&&(z=e.created)}),p.hidden_replies>0&&c(p,z)}};return{insert:d,insert_loader:c,Postbox:m}}),define("app/count",["app/api","app/dom","app/i18n"],function(e,t,n){return function(){var o={};t.each("a",function(e){if(e.href.match&&e.href.match(/#isso-thread$/)){var t=e.getAttribute("data-isso-id")||e.href.match(/^(.+)#isso-thread$/)[1].replace(/^.*\/\/[^\/]+/,"");t in o?o[t].push(e):o[t]=[e]}});var i=Object.keys(o);e.count(i).then(function(e){for(var t in o)if(o.hasOwnProperty(t))for(var a=i.indexOf(t),r=0;r h4 {\n color: #555;\n font-weight: bold;\n}\n#isso-thread > .isso-feedlink {\n float: right;\n padding-left: 1em;\n}\n#isso-thread > .isso-feedlink > a {\n font-size: 0.8em;\n vertical-align: bottom;\n}\n#isso-thread .textarea {\n min-height: 58px;\n outline: 0;\n}\n#isso-thread .textarea.placeholder {\n color: #757575;\n}\n\n#isso-root .isso-comment {\n max-width: 68em;\n padding-top: 0.95em;\n margin: 0.95em auto;\n}\n#isso-root .preview .isso-comment {\n padding-top: 0;\n margin: 0;\n}\n#isso-root .isso-comment:not(:first-of-type),\n.isso-follow-up .isso-comment {\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n}\n.isso-comment > div.avatar {\n display: block;\n float: left;\n width: 7%;\n margin: 3px 15px 0 0;\n}\n.isso-comment > div.avatar > svg {\n max-width: 48px;\n max-height: 48px;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 3px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.isso-comment > div.text-wrapper {\n display: block;\n}\n.isso-comment .isso-follow-up {\n padding-left: calc(7% + 20px);\n}\n.isso-comment > div.text-wrapper > .isso-comment-header, .isso-comment > div.text-wrapper > .isso-comment-footer {\n font-size: 0.95em;\n}\n.isso-comment > div.text-wrapper > .isso-comment-header {\n font-size: 0.85em;\n}\n.isso-comment > div.text-wrapper > .isso-comment-header .spacer {\n padding: 0 6px;\n}\n.isso-comment > div.text-wrapper > .isso-comment-header .spacer,\n.isso-comment > div.text-wrapper > .isso-comment-header a.permalink,\n.isso-comment > div.text-wrapper > .isso-comment-header .note,\n.isso-comment > div.text-wrapper > .isso-comment-header a.parent {\n color: gray !important;\n font-weight: normal;\n text-shadow: none !important;\n}\n.isso-comment > div.text-wrapper > .isso-comment-header .spacer:hover,\n.isso-comment > div.text-wrapper > .isso-comment-header a.permalink:hover,\n.isso-comment > div.text-wrapper > .isso-comment-header .note:hover,\n.isso-comment > div.text-wrapper > .isso-comment-header a.parent:hover {\n color: #606060 !important;\n}\n.isso-comment > div.text-wrapper > .isso-comment-header .note {\n float: right;\n}\n.isso-comment > div.text-wrapper > .isso-comment-header .author {\n font-weight: bold;\n color: #555;\n}\n.isso-comment > div.text-wrapper > .textarea-wrapper .textarea,\n.isso-comment > div.text-wrapper > .textarea-wrapper .preview {\n margin-top: 0.2em;\n}\n.isso-comment > div.text-wrapper > div.text p {\n margin-top: 0.2em;\n}\n.isso-comment > div.text-wrapper > div.text p:last-child {\n margin-bottom: 0.2em;\n}\n.isso-comment > div.text-wrapper > div.text h1,\n.isso-comment > div.text-wrapper > div.text h2,\n.isso-comment > div.text-wrapper > div.text h3,\n.isso-comment > div.text-wrapper > div.text h4,\n.isso-comment > div.text-wrapper > div.text h5,\n.isso-comment > div.text-wrapper > div.text h6 {\n font-size: 130%;\n font-weight: bold;\n}\n.isso-comment > div.text-wrapper > div.textarea-wrapper .textarea,\n.isso-comment > div.text-wrapper > div.textarea-wrapper .preview {\n width: 100%;\n border: 1px solid #f0f0f0;\n border-radius: 2px;\n box-shadow: 0 0 2px #888;\n}\n.isso-comment > div.text-wrapper > .isso-comment-footer {\n font-size: 0.80em;\n color: gray !important;\n clear: left;\n}\n.isso-feedlink,\n.isso-comment > div.text-wrapper > .isso-comment-footer a {\n font-weight: bold;\n text-decoration: none;\n}\n.isso-feedlink:hover,\n.isso-comment > div.text-wrapper > .isso-comment-footer a:hover {\n color: #111111 !important;\n text-shadow: #aaaaaa 0 0 1px !important;\n}\n.isso-comment > div.text-wrapper > .isso-comment-footer > a {\n position: relative;\n top: .2em;\n}\n.isso-comment > div.text-wrapper > .isso-comment-footer > a + a {\n padding-left: 1em;\n}\n.isso-comment > div.text-wrapper > .isso-comment-footer .votes {\n color: gray;\n}\n.isso-comment > div.text-wrapper > .isso-comment-footer .upvote svg,\n.isso-comment > div.text-wrapper > .isso-comment-footer .downvote svg {\n position: relative;\n top: .2em;\n}\n.isso-comment .isso-postbox {\n margin-top: 0.8em;\n}\n.isso-comment.isso-no-votes span.votes {\n display: none;\n}\n\n.isso-postbox {\n max-width: 68em;\n margin: 0 auto 2em;\n clear: right;\n}\n.isso-postbox > .form-wrapper {\n display: block;\n padding: 0;\n}\n.isso-postbox > .form-wrapper > .auth-section,\n.isso-postbox > .form-wrapper > .auth-section .post-action {\n display: block;\n}\n.isso-postbox > .form-wrapper .textarea,\n.isso-postbox > .form-wrapper .preview {\n margin: 0 0 .3em;\n padding: .4em .8em;\n border-radius: 3px;\n background-color: #fff;\n border: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.isso-postbox > .form-wrapper input[type=checkbox] {\n vertical-align: middle;\n position: relative;\n bottom: 1px;\n margin-left: 0;\n}\n.isso-postbox > .form-wrapper .notification-section {\n font-size: 0.90em;\n padding-top: .3em;\n}\n#isso-thread .textarea:focus,\n#isso-thread input:focus {\n border-color: rgba(0, 0, 0, 0.8);\n}\n.isso-postbox > .form-wrapper > .auth-section .input-wrapper {\n display: inline-block;\n position: relative;\n max-width: 25%;\n margin: 0;\n}\n.isso-postbox > .form-wrapper > .auth-section .input-wrapper input {\n padding: .3em 10px;\n max-width: 100%;\n border-radius: 3px;\n background-color: #fff;\n line-height: 1.4em;\n border: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.isso-postbox > .form-wrapper > .auth-section .post-action {\n display: inline-block;\n float: right;\n margin: 0 0 0 5px;\n}\n.isso-postbox > .form-wrapper > .auth-section .post-action > input {\n padding: calc(.3em - 1px);\n border-radius: 2px;\n border: 1px solid #CCC;\n background-color: #DDD;\n cursor: pointer;\n outline: 0;\n line-height: 1.4em;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.isso-postbox > .form-wrapper > .auth-section .post-action > input:hover {\n background-color: #CCC;\n}\n.isso-postbox > .form-wrapper > .auth-section .post-action > input:active {\n background-color: #BBB;\n}\n.isso-postbox > .form-wrapper .preview,\n.isso-postbox > .form-wrapper input[name="edit"],\n.isso-postbox.preview-mode > .form-wrapper input[name="preview"],\n.isso-postbox.preview-mode > .form-wrapper .textarea {\n display: none;\n}\n.isso-postbox.preview-mode > .form-wrapper .preview {\n display: block;\n}\n.isso-postbox.preview-mode > .form-wrapper input[name="edit"] {\n display: inline;\n}\n.isso-postbox > .form-wrapper .preview {\n background-color: #f8f8f8;\n background: repeating-linear-gradient(\n -45deg,\n #f8f8f8,\n #f8f8f8 10px,\n #fff 10px,\n #fff 20px\n );\n}\n.isso-postbox > .form-wrapper > .notification-section {\n display: none;\n padding-bottom: 10px;\n}\n@media screen and (max-width:600px) {\n .isso-postbox > .form-wrapper > .auth-section .input-wrapper {\n display: block;\n max-width: 100%;\n margin: 0 0 .3em;\n }\n .isso-postbox > .form-wrapper > .auth-section .input-wrapper input {\n width: 100%;\n }\n}\n'}),define("app/text/css",["text!../../../css/isso.css"],function(e){return{inline:e}}),define("text!app/text/arrow-down.svg",[],function(){return'\x3c!-- Generator: IcoMoon.io --\x3e\n \n \n \n \n\n'}),define("text!app/text/arrow-up.svg",[],function(){return'\x3c!-- Generator: IcoMoon.io --\x3e\n \n \n \n \n\n'}),define("app/text/svg",["text!./arrow-down.svg","text!./arrow-up.svg"],function(e,t){return{"arrow-down":e,"arrow-up":t}}),require(["app/lib/ready","app/config","app/i18n","app/api","app/isso","app/count","app/dom","app/text/css","app/text/svg","app/jade"],function(e,t,n,o,i,a,r,s,m,c){"use strict";function d(){if(l=r("#isso-thread"),u=r.new("h4"),t.css&&null===r("style#isso-style")){var e=r.new("style");e.id="isso-style",e.type="text/css",e.textContent=s.inline,r("head").append(e)}if(a(),null===l)return console.log("abort, #isso-thread is missing");if(t.feed){var m=r.new("a",n.translate("atom-feed")),c=r.new("span.isso-feedlink");m.href=o.feed(l.getAttribute("data-isso-id")),c.appendChild(m),l.append(c)}l.append(u),l.append(new i.Postbox(null)),l.append('
')}function p(){0!=r("#isso-root").length&&(r("#isso-root").textContent="",o.fetch(l.getAttribute("data-isso-id")||location.pathname,t["max-comments-top"],t["max-comments-nested"]).then(function(e){if(0===e.total_replies)return void(u.textContent=n.translate("no-comments"));var t=0,o=e.total_replies;e.replies.forEach(function(e){i.insert(e,!1),e.created>t&&(t=e.created),o+=e.total_replies}),u.textContent=n.pluralize("num-comments",o),e.hidden_replies>0&&i.insert_loader(e,t),window.location.hash.length>0&&window.location.hash.match("^#isso-[0-9]+$")&&r(window.location.hash).scrollIntoView()},function(e){console.log(e)}))}c.set("conf",t),c.set("i18n",n.translate),c.set("pluralize",n.pluralize),c.set("svg",m);var l,u;e(function(){d(),p()}),window.Isso={init:d,fetchComments:p}}),define("embed",function(){})}(); \ No newline at end of file diff --git a/theme/pygments/abap.css b/theme/pygments/abap.css new file mode 100644 index 00000000..8564d98a --- /dev/null +++ b/theme/pygments/abap.css @@ -0,0 +1,120 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888; font-style: italic } /* Comment */ +.highlight .err { color: #FF0000 } /* Error */ +.highlight .k { color: #0000ff } /* Keyword */ +.highlight .n { color: #000000 } /* Name */ +.highlight .ch { color: #888888; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #888888; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #888888; font-style: italic } /* Comment.Special */ +.highlight .kc { color: #0000ff } /* Keyword.Constant */ +.highlight .kd { color: #0000ff } /* Keyword.Declaration */ +.highlight .kn { color: #0000ff } /* Keyword.Namespace */ +.highlight .kp { color: #0000ff } /* Keyword.Pseudo */ +.highlight .kr { color: #0000ff } /* Keyword.Reserved */ +.highlight .kt { color: #0000ff } /* Keyword.Type */ +.highlight .m { color: #33aaff } /* Literal.Number */ +.highlight .s { color: #55aa22 } /* Literal.String */ +.highlight .na { color: #000000 } /* Name.Attribute */ +.highlight .nb { color: #000000 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #000000 } /* Name.Decorator */ +.highlight .ni { color: #000000 } /* Name.Entity */ +.highlight .ne { color: #000000 } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #000000 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #000000 } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #0000ff } /* Operator.Word */ +.highlight .mb { color: #33aaff } /* Literal.Number.Bin */ +.highlight .mf { color: #33aaff } /* Literal.Number.Float */ +.highlight .mh { color: #33aaff } /* Literal.Number.Hex */ +.highlight .mi { color: #33aaff } /* Literal.Number.Integer */ +.highlight .mo { color: #33aaff } /* Literal.Number.Oct */ +.highlight .sa { color: #55aa22 } /* Literal.String.Affix */ +.highlight .sb { color: #55aa22 } /* Literal.String.Backtick */ +.highlight .sc { color: #55aa22 } /* Literal.String.Char */ +.highlight .dl { color: #55aa22 } /* Literal.String.Delimiter */ +.highlight .sd { color: #55aa22 } /* Literal.String.Doc */ +.highlight .s2 { color: #55aa22 } /* Literal.String.Double */ +.highlight .se { color: #55aa22 } /* Literal.String.Escape */ +.highlight .sh { color: #55aa22 } /* Literal.String.Heredoc */ +.highlight .si { color: #55aa22 } /* Literal.String.Interpol */ +.highlight .sx { color: #55aa22 } /* Literal.String.Other */ +.highlight .sr { color: #55aa22 } /* Literal.String.Regex */ +.highlight .s1 { color: #55aa22 } /* Literal.String.Single */ +.highlight .ss { color: #55aa22 } /* Literal.String.Symbol */ +.highlight .bp { color: #000000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #33aaff } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #888888; font-style: italic } /* Comment */ +.literal-block .err { color: #FF0000 } /* Error */ +.literal-block .k { color: #0000ff } /* Keyword */ +.literal-block .n { color: #000000 } /* Name */ +.literal-block .ch { color: #888888; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #888888; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #888888; font-style: italic } /* Comment.Special */ +.literal-block .kc { color: #0000ff } /* Keyword.Constant */ +.literal-block .kd { color: #0000ff } /* Keyword.Declaration */ +.literal-block .kn { color: #0000ff } /* Keyword.Namespace */ +.literal-block .kp { color: #0000ff } /* Keyword.Pseudo */ +.literal-block .kr { color: #0000ff } /* Keyword.Reserved */ +.literal-block .kt { color: #0000ff } /* Keyword.Type */ +.literal-block .m { color: #33aaff } /* Literal.Number */ +.literal-block .s { color: #55aa22 } /* Literal.String */ +.literal-block .na { color: #000000 } /* Name.Attribute */ +.literal-block .nb { color: #000000 } /* Name.Builtin */ +.literal-block .nc { color: #000000 } /* Name.Class */ +.literal-block .no { color: #000000 } /* Name.Constant */ +.literal-block .nd { color: #000000 } /* Name.Decorator */ +.literal-block .ni { color: #000000 } /* Name.Entity */ +.literal-block .ne { color: #000000 } /* Name.Exception */ +.literal-block .nf { color: #000000 } /* Name.Function */ +.literal-block .nl { color: #000000 } /* Name.Label */ +.literal-block .nn { color: #000000 } /* Name.Namespace */ +.literal-block .nx { color: #000000 } /* Name.Other */ +.literal-block .py { color: #000000 } /* Name.Property */ +.literal-block .nt { color: #000000 } /* Name.Tag */ +.literal-block .nv { color: #000000 } /* Name.Variable */ +.literal-block .ow { color: #0000ff } /* Operator.Word */ +.literal-block .mb { color: #33aaff } /* Literal.Number.Bin */ +.literal-block .mf { color: #33aaff } /* Literal.Number.Float */ +.literal-block .mh { color: #33aaff } /* Literal.Number.Hex */ +.literal-block .mi { color: #33aaff } /* Literal.Number.Integer */ +.literal-block .mo { color: #33aaff } /* Literal.Number.Oct */ +.literal-block .sa { color: #55aa22 } /* Literal.String.Affix */ +.literal-block .sb { color: #55aa22 } /* Literal.String.Backtick */ +.literal-block .sc { color: #55aa22 } /* Literal.String.Char */ +.literal-block .dl { color: #55aa22 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #55aa22 } /* Literal.String.Doc */ +.literal-block .s2 { color: #55aa22 } /* Literal.String.Double */ +.literal-block .se { color: #55aa22 } /* Literal.String.Escape */ +.literal-block .sh { color: #55aa22 } /* Literal.String.Heredoc */ +.literal-block .si { color: #55aa22 } /* Literal.String.Interpol */ +.literal-block .sx { color: #55aa22 } /* Literal.String.Other */ +.literal-block .sr { color: #55aa22 } /* Literal.String.Regex */ +.literal-block .s1 { color: #55aa22 } /* Literal.String.Single */ +.literal-block .ss { color: #55aa22 } /* Literal.String.Symbol */ +.literal-block .bp { color: #000000 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #000000 } /* Name.Function.Magic */ +.literal-block .vc { color: #000000 } /* Name.Variable.Class */ +.literal-block .vg { color: #000000 } /* Name.Variable.Global */ +.literal-block .vi { color: #000000 } /* Name.Variable.Instance */ +.literal-block .vm { color: #000000 } /* Name.Variable.Magic */ +.literal-block .il { color: #33aaff } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/abap.min.css b/theme/pygments/abap.min.css new file mode 100644 index 00000000..84f7e505 --- /dev/null +++ b/theme/pygments/abap.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#888;font-style:italic}.highlight .err{color:red}.highlight .k{color:#00f}.highlight .n{color:#000}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#888;font-style:italic}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#00f}.highlight .m{color:#3af}.highlight .s{color:#5a2}.highlight .na,.highlight .nb,.highlight .nc,.highlight .nd,.highlight .ne,.highlight .nf,.highlight .ni,.highlight .nl,.highlight .nn,.highlight .no,.highlight .nt,.highlight .nv,.highlight .nx,.highlight .py{color:#000}.highlight .ow{color:#00f}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#3af}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#5a2}.highlight .bp,.highlight .fm,.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#000}.highlight .il{color:#3af}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#888;font-style:italic}.literal-block .err{color:red}.literal-block .k{color:#00f}.literal-block .n{color:#000}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#888;font-style:italic}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#00f}.literal-block .m{color:#3af}.literal-block .s{color:#5a2}.literal-block .na,.literal-block .nb,.literal-block .nc,.literal-block .nd,.literal-block .ne,.literal-block .nf,.literal-block .ni,.literal-block .nl,.literal-block .nn,.literal-block .no,.literal-block .nt,.literal-block .nv,.literal-block .nx,.literal-block .py{color:#000}.literal-block .ow{color:#00f}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#3af}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#5a2}.literal-block .bp,.literal-block .fm,.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#000}.literal-block .il{color:#3af} \ No newline at end of file diff --git a/theme/pygments/algol.css b/theme/pygments/algol.css new file mode 100644 index 00000000..07a1f9f2 --- /dev/null +++ b/theme/pygments/algol.css @@ -0,0 +1,88 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { font-weight: bold; text-decoration: underline } /* Keyword */ +.highlight .ch { color: #888888; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #888888; font-weight: bold } /* Comment.Preproc */ +.highlight .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #888888; font-weight: bold } /* Comment.Special */ +.highlight .kc { font-weight: bold; text-decoration: underline } /* Keyword.Constant */ +.highlight .kd { font-weight: bold; font-style: italic; text-decoration: underline } /* Keyword.Declaration */ +.highlight .kn { font-weight: bold; text-decoration: underline } /* Keyword.Namespace */ +.highlight .kp { font-weight: bold; text-decoration: underline } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold; text-decoration: underline } /* Keyword.Reserved */ +.highlight .kt { font-weight: bold; text-decoration: underline } /* Keyword.Type */ +.highlight .s { color: #666666; font-style: italic } /* Literal.String */ +.highlight .nb { font-weight: bold; font-style: italic } /* Name.Builtin */ +.highlight .nc { color: #666666; font-weight: bold; font-style: italic } /* Name.Class */ +.highlight .no { color: #666666; font-weight: bold; font-style: italic } /* Name.Constant */ +.highlight .nf { color: #666666; font-weight: bold; font-style: italic } /* Name.Function */ +.highlight .nn { color: #666666; font-weight: bold; font-style: italic } /* Name.Namespace */ +.highlight .nv { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .sa { color: #666666; font-style: italic } /* Literal.String.Affix */ +.highlight .sb { color: #666666; font-style: italic } /* Literal.String.Backtick */ +.highlight .sc { color: #666666; font-style: italic } /* Literal.String.Char */ +.highlight .dl { color: #666666; font-style: italic } /* Literal.String.Delimiter */ +.highlight .sd { color: #666666; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #666666; font-style: italic } /* Literal.String.Double */ +.highlight .se { color: #666666; font-style: italic } /* Literal.String.Escape */ +.highlight .sh { color: #666666; font-style: italic } /* Literal.String.Heredoc */ +.highlight .si { color: #666666; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #666666; font-style: italic } /* Literal.String.Other */ +.highlight .sr { color: #666666; font-style: italic } /* Literal.String.Regex */ +.highlight .s1 { color: #666666; font-style: italic } /* Literal.String.Single */ +.highlight .ss { color: #666666; font-style: italic } /* Literal.String.Symbol */ +.highlight .bp { font-weight: bold; font-style: italic } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #666666; font-weight: bold; font-style: italic } /* Name.Function.Magic */ +.highlight .vc { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Class */ +.highlight .vg { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Global */ +.highlight .vi { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Instance */ +.highlight .vm { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Magic */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #888888; font-style: italic } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { font-weight: bold; text-decoration: underline } /* Keyword */ +.literal-block .ch { color: #888888; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #888888; font-weight: bold } /* Comment.Preproc */ +.literal-block .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #888888; font-weight: bold } /* Comment.Special */ +.literal-block .kc { font-weight: bold; text-decoration: underline } /* Keyword.Constant */ +.literal-block .kd { font-weight: bold; font-style: italic; text-decoration: underline } /* Keyword.Declaration */ +.literal-block .kn { font-weight: bold; text-decoration: underline } /* Keyword.Namespace */ +.literal-block .kp { font-weight: bold; text-decoration: underline } /* Keyword.Pseudo */ +.literal-block .kr { font-weight: bold; text-decoration: underline } /* Keyword.Reserved */ +.literal-block .kt { font-weight: bold; text-decoration: underline } /* Keyword.Type */ +.literal-block .s { color: #666666; font-style: italic } /* Literal.String */ +.literal-block .nb { font-weight: bold; font-style: italic } /* Name.Builtin */ +.literal-block .nc { color: #666666; font-weight: bold; font-style: italic } /* Name.Class */ +.literal-block .no { color: #666666; font-weight: bold; font-style: italic } /* Name.Constant */ +.literal-block .nf { color: #666666; font-weight: bold; font-style: italic } /* Name.Function */ +.literal-block .nn { color: #666666; font-weight: bold; font-style: italic } /* Name.Namespace */ +.literal-block .nv { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable */ +.literal-block .ow { font-weight: bold } /* Operator.Word */ +.literal-block .sa { color: #666666; font-style: italic } /* Literal.String.Affix */ +.literal-block .sb { color: #666666; font-style: italic } /* Literal.String.Backtick */ +.literal-block .sc { color: #666666; font-style: italic } /* Literal.String.Char */ +.literal-block .dl { color: #666666; font-style: italic } /* Literal.String.Delimiter */ +.literal-block .sd { color: #666666; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #666666; font-style: italic } /* Literal.String.Double */ +.literal-block .se { color: #666666; font-style: italic } /* Literal.String.Escape */ +.literal-block .sh { color: #666666; font-style: italic } /* Literal.String.Heredoc */ +.literal-block .si { color: #666666; font-style: italic } /* Literal.String.Interpol */ +.literal-block .sx { color: #666666; font-style: italic } /* Literal.String.Other */ +.literal-block .sr { color: #666666; font-style: italic } /* Literal.String.Regex */ +.literal-block .s1 { color: #666666; font-style: italic } /* Literal.String.Single */ +.literal-block .ss { color: #666666; font-style: italic } /* Literal.String.Symbol */ +.literal-block .bp { font-weight: bold; font-style: italic } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #666666; font-weight: bold; font-style: italic } /* Name.Function.Magic */ +.literal-block .vc { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Class */ +.literal-block .vg { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Global */ +.literal-block .vi { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Instance */ +.literal-block .vm { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Magic */ \ No newline at end of file diff --git a/theme/pygments/algol.min.css b/theme/pygments/algol.min.css new file mode 100644 index 00000000..9f59c51c --- /dev/null +++ b/theme/pygments/algol.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#888;font-style:italic}.highlight .err{border:1px solid red}.highlight .k{font-weight:700;text-decoration:underline}.highlight .ch,.highlight .cm{color:#888;font-style:italic}.highlight .cp{color:#888;font-weight:700}.highlight .c1,.highlight .cpf{color:#888;font-style:italic}.highlight .cs{color:#888;font-weight:700}.highlight .kc,.highlight .kd{font-weight:700;text-decoration:underline}.highlight .kd{font-style:italic}.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{font-weight:700;text-decoration:underline}.highlight .s{color:#666;font-style:italic}.highlight .nb,.highlight .nc{font-weight:700;font-style:italic}.highlight .nc{color:#666}.highlight .nf,.highlight .nn,.highlight .no,.highlight .nv{color:#666;font-weight:700;font-style:italic}.highlight .ow{font-weight:700}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#666;font-style:italic}.highlight .bp,.highlight .fm{font-weight:700;font-style:italic}.highlight .fm{color:#666}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#666;font-weight:700;font-style:italic}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#888;font-style:italic}.literal-block .err{border:1px solid red}.literal-block .k{font-weight:700;text-decoration:underline}.literal-block .ch,.literal-block .cm{color:#888;font-style:italic}.literal-block .cp{color:#888;font-weight:700}.literal-block .c1,.literal-block .cpf{color:#888;font-style:italic}.literal-block .cs{color:#888;font-weight:700}.literal-block .kc,.literal-block .kd{font-weight:700;text-decoration:underline}.literal-block .kd{font-style:italic}.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{font-weight:700;text-decoration:underline}.literal-block .s{color:#666;font-style:italic}.literal-block .nb,.literal-block .nc{font-weight:700;font-style:italic}.literal-block .nc{color:#666}.literal-block .nf,.literal-block .nn,.literal-block .no,.literal-block .nv{color:#666;font-weight:700;font-style:italic}.literal-block .ow{font-weight:700}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#666;font-style:italic}.literal-block .bp,.literal-block .fm{font-weight:700;font-style:italic}.literal-block .fm{color:#666}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#666;font-weight:700;font-style:italic} \ No newline at end of file diff --git a/theme/pygments/algol_nu.css b/theme/pygments/algol_nu.css new file mode 100644 index 00000000..ece43add --- /dev/null +++ b/theme/pygments/algol_nu.css @@ -0,0 +1,88 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .ch { color: #888888; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #888888; font-weight: bold } /* Comment.Preproc */ +.highlight .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #888888; font-weight: bold } /* Comment.Special */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold; font-style: italic } /* Keyword.Declaration */ +.highlight .kn { font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { font-weight: bold } /* Keyword.Type */ +.highlight .s { color: #666666; font-style: italic } /* Literal.String */ +.highlight .nb { font-weight: bold; font-style: italic } /* Name.Builtin */ +.highlight .nc { color: #666666; font-weight: bold; font-style: italic } /* Name.Class */ +.highlight .no { color: #666666; font-weight: bold; font-style: italic } /* Name.Constant */ +.highlight .nf { color: #666666; font-weight: bold; font-style: italic } /* Name.Function */ +.highlight .nn { color: #666666; font-weight: bold; font-style: italic } /* Name.Namespace */ +.highlight .nv { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .sa { color: #666666; font-style: italic } /* Literal.String.Affix */ +.highlight .sb { color: #666666; font-style: italic } /* Literal.String.Backtick */ +.highlight .sc { color: #666666; font-style: italic } /* Literal.String.Char */ +.highlight .dl { color: #666666; font-style: italic } /* Literal.String.Delimiter */ +.highlight .sd { color: #666666; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #666666; font-style: italic } /* Literal.String.Double */ +.highlight .se { color: #666666; font-style: italic } /* Literal.String.Escape */ +.highlight .sh { color: #666666; font-style: italic } /* Literal.String.Heredoc */ +.highlight .si { color: #666666; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #666666; font-style: italic } /* Literal.String.Other */ +.highlight .sr { color: #666666; font-style: italic } /* Literal.String.Regex */ +.highlight .s1 { color: #666666; font-style: italic } /* Literal.String.Single */ +.highlight .ss { color: #666666; font-style: italic } /* Literal.String.Symbol */ +.highlight .bp { font-weight: bold; font-style: italic } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #666666; font-weight: bold; font-style: italic } /* Name.Function.Magic */ +.highlight .vc { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Class */ +.highlight .vg { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Global */ +.highlight .vi { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Instance */ +.highlight .vm { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Magic */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #888888; font-style: italic } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { font-weight: bold } /* Keyword */ +.literal-block .ch { color: #888888; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #888888; font-weight: bold } /* Comment.Preproc */ +.literal-block .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #888888; font-weight: bold } /* Comment.Special */ +.literal-block .kc { font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { font-weight: bold; font-style: italic } /* Keyword.Declaration */ +.literal-block .kn { font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { font-weight: bold } /* Keyword.Type */ +.literal-block .s { color: #666666; font-style: italic } /* Literal.String */ +.literal-block .nb { font-weight: bold; font-style: italic } /* Name.Builtin */ +.literal-block .nc { color: #666666; font-weight: bold; font-style: italic } /* Name.Class */ +.literal-block .no { color: #666666; font-weight: bold; font-style: italic } /* Name.Constant */ +.literal-block .nf { color: #666666; font-weight: bold; font-style: italic } /* Name.Function */ +.literal-block .nn { color: #666666; font-weight: bold; font-style: italic } /* Name.Namespace */ +.literal-block .nv { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable */ +.literal-block .ow { font-weight: bold } /* Operator.Word */ +.literal-block .sa { color: #666666; font-style: italic } /* Literal.String.Affix */ +.literal-block .sb { color: #666666; font-style: italic } /* Literal.String.Backtick */ +.literal-block .sc { color: #666666; font-style: italic } /* Literal.String.Char */ +.literal-block .dl { color: #666666; font-style: italic } /* Literal.String.Delimiter */ +.literal-block .sd { color: #666666; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #666666; font-style: italic } /* Literal.String.Double */ +.literal-block .se { color: #666666; font-style: italic } /* Literal.String.Escape */ +.literal-block .sh { color: #666666; font-style: italic } /* Literal.String.Heredoc */ +.literal-block .si { color: #666666; font-style: italic } /* Literal.String.Interpol */ +.literal-block .sx { color: #666666; font-style: italic } /* Literal.String.Other */ +.literal-block .sr { color: #666666; font-style: italic } /* Literal.String.Regex */ +.literal-block .s1 { color: #666666; font-style: italic } /* Literal.String.Single */ +.literal-block .ss { color: #666666; font-style: italic } /* Literal.String.Symbol */ +.literal-block .bp { font-weight: bold; font-style: italic } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #666666; font-weight: bold; font-style: italic } /* Name.Function.Magic */ +.literal-block .vc { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Class */ +.literal-block .vg { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Global */ +.literal-block .vi { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Instance */ +.literal-block .vm { color: #666666; font-weight: bold; font-style: italic } /* Name.Variable.Magic */ \ No newline at end of file diff --git a/theme/pygments/algol_nu.min.css b/theme/pygments/algol_nu.min.css new file mode 100644 index 00000000..b81e2014 --- /dev/null +++ b/theme/pygments/algol_nu.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#888;font-style:italic}.highlight .err{border:1px solid red}.highlight .k{font-weight:700}.highlight .ch,.highlight .cm{color:#888;font-style:italic}.highlight .cp{color:#888;font-weight:700}.highlight .c1,.highlight .cpf{color:#888;font-style:italic}.highlight .cs{color:#888}.highlight .cs,.highlight .kc,.highlight .kd{font-weight:700}.highlight .kd{font-style:italic}.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{font-weight:700}.highlight .s{color:#666;font-style:italic}.highlight .nb,.highlight .nc{font-weight:700;font-style:italic}.highlight .nc{color:#666}.highlight .nf,.highlight .nn,.highlight .no,.highlight .nv{color:#666;font-weight:700;font-style:italic}.highlight .ow{font-weight:700}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#666;font-style:italic}.highlight .bp,.highlight .fm{font-weight:700;font-style:italic}.highlight .fm{color:#666}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#666;font-weight:700;font-style:italic}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#888;font-style:italic}.literal-block .err{border:1px solid red}.literal-block .k{font-weight:700}.literal-block .ch,.literal-block .cm{color:#888;font-style:italic}.literal-block .cp{color:#888;font-weight:700}.literal-block .c1,.literal-block .cpf{color:#888;font-style:italic}.literal-block .cs{color:#888;font-weight:700}.literal-block .kc{font-weight:700}.literal-block .kd{font-weight:700;font-style:italic}.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{font-weight:700}.literal-block .s{color:#666;font-style:italic}.literal-block .nb,.literal-block .nc{font-weight:700;font-style:italic}.literal-block .nc{color:#666}.literal-block .nf,.literal-block .nn,.literal-block .no,.literal-block .nv{color:#666;font-weight:700;font-style:italic}.literal-block .ow{font-weight:700}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#666;font-style:italic}.literal-block .bp,.literal-block .fm{font-weight:700;font-style:italic}.literal-block .fm{color:#666}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#666;font-weight:700;font-style:italic} \ No newline at end of file diff --git a/theme/pygments/arduino.css b/theme/pygments/arduino.css new file mode 100644 index 00000000..9a768dab --- /dev/null +++ b/theme/pygments/arduino.css @@ -0,0 +1,122 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #95a5a6 } /* Comment */ +.highlight .err { color: #a61717 } /* Error */ +.highlight .k { color: #728E00 } /* Keyword */ +.highlight .n { color: #434f54 } /* Name */ +.highlight .o { color: #728E00 } /* Operator */ +.highlight .ch { color: #95a5a6 } /* Comment.Hashbang */ +.highlight .cm { color: #95a5a6 } /* Comment.Multiline */ +.highlight .cp { color: #728E00 } /* Comment.Preproc */ +.highlight .cpf { color: #95a5a6 } /* Comment.PreprocFile */ +.highlight .c1 { color: #95a5a6 } /* Comment.Single */ +.highlight .cs { color: #95a5a6 } /* Comment.Special */ +.highlight .kc { color: #00979D } /* Keyword.Constant */ +.highlight .kd { color: #728E00 } /* Keyword.Declaration */ +.highlight .kn { color: #728E00 } /* Keyword.Namespace */ +.highlight .kp { color: #00979D } /* Keyword.Pseudo */ +.highlight .kr { color: #00979D } /* Keyword.Reserved */ +.highlight .kt { color: #00979D } /* Keyword.Type */ +.highlight .m { color: #8A7B52 } /* Literal.Number */ +.highlight .s { color: #7F8C8D } /* Literal.String */ +.highlight .na { color: #434f54 } /* Name.Attribute */ +.highlight .nb { color: #728E00 } /* Name.Builtin */ +.highlight .nc { color: #434f54 } /* Name.Class */ +.highlight .no { color: #434f54 } /* Name.Constant */ +.highlight .nd { color: #434f54 } /* Name.Decorator */ +.highlight .ni { color: #434f54 } /* Name.Entity */ +.highlight .ne { color: #434f54 } /* Name.Exception */ +.highlight .nf { color: #D35400 } /* Name.Function */ +.highlight .nl { color: #434f54 } /* Name.Label */ +.highlight .nn { color: #434f54 } /* Name.Namespace */ +.highlight .nx { color: #728E00 } /* Name.Other */ +.highlight .py { color: #434f54 } /* Name.Property */ +.highlight .nt { color: #434f54 } /* Name.Tag */ +.highlight .nv { color: #434f54 } /* Name.Variable */ +.highlight .ow { color: #728E00 } /* Operator.Word */ +.highlight .mb { color: #8A7B52 } /* Literal.Number.Bin */ +.highlight .mf { color: #8A7B52 } /* Literal.Number.Float */ +.highlight .mh { color: #8A7B52 } /* Literal.Number.Hex */ +.highlight .mi { color: #8A7B52 } /* Literal.Number.Integer */ +.highlight .mo { color: #8A7B52 } /* Literal.Number.Oct */ +.highlight .sa { color: #7F8C8D } /* Literal.String.Affix */ +.highlight .sb { color: #7F8C8D } /* Literal.String.Backtick */ +.highlight .sc { color: #7F8C8D } /* Literal.String.Char */ +.highlight .dl { color: #7F8C8D } /* Literal.String.Delimiter */ +.highlight .sd { color: #7F8C8D } /* Literal.String.Doc */ +.highlight .s2 { color: #7F8C8D } /* Literal.String.Double */ +.highlight .se { color: #7F8C8D } /* Literal.String.Escape */ +.highlight .sh { color: #7F8C8D } /* Literal.String.Heredoc */ +.highlight .si { color: #7F8C8D } /* Literal.String.Interpol */ +.highlight .sx { color: #7F8C8D } /* Literal.String.Other */ +.highlight .sr { color: #7F8C8D } /* Literal.String.Regex */ +.highlight .s1 { color: #7F8C8D } /* Literal.String.Single */ +.highlight .ss { color: #7F8C8D } /* Literal.String.Symbol */ +.highlight .bp { color: #728E00 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #D35400 } /* Name.Function.Magic */ +.highlight .vc { color: #434f54 } /* Name.Variable.Class */ +.highlight .vg { color: #434f54 } /* Name.Variable.Global */ +.highlight .vi { color: #434f54 } /* Name.Variable.Instance */ +.highlight .vm { color: #434f54 } /* Name.Variable.Magic */ +.highlight .il { color: #8A7B52 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #95a5a6 } /* Comment */ +.literal-block .err { color: #a61717 } /* Error */ +.literal-block .k { color: #728E00 } /* Keyword */ +.literal-block .n { color: #434f54 } /* Name */ +.literal-block .o { color: #728E00 } /* Operator */ +.literal-block .ch { color: #95a5a6 } /* Comment.Hashbang */ +.literal-block .cm { color: #95a5a6 } /* Comment.Multiline */ +.literal-block .cp { color: #728E00 } /* Comment.Preproc */ +.literal-block .cpf { color: #95a5a6 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #95a5a6 } /* Comment.Single */ +.literal-block .cs { color: #95a5a6 } /* Comment.Special */ +.literal-block .kc { color: #00979D } /* Keyword.Constant */ +.literal-block .kd { color: #728E00 } /* Keyword.Declaration */ +.literal-block .kn { color: #728E00 } /* Keyword.Namespace */ +.literal-block .kp { color: #00979D } /* Keyword.Pseudo */ +.literal-block .kr { color: #00979D } /* Keyword.Reserved */ +.literal-block .kt { color: #00979D } /* Keyword.Type */ +.literal-block .m { color: #8A7B52 } /* Literal.Number */ +.literal-block .s { color: #7F8C8D } /* Literal.String */ +.literal-block .na { color: #434f54 } /* Name.Attribute */ +.literal-block .nb { color: #728E00 } /* Name.Builtin */ +.literal-block .nc { color: #434f54 } /* Name.Class */ +.literal-block .no { color: #434f54 } /* Name.Constant */ +.literal-block .nd { color: #434f54 } /* Name.Decorator */ +.literal-block .ni { color: #434f54 } /* Name.Entity */ +.literal-block .ne { color: #434f54 } /* Name.Exception */ +.literal-block .nf { color: #D35400 } /* Name.Function */ +.literal-block .nl { color: #434f54 } /* Name.Label */ +.literal-block .nn { color: #434f54 } /* Name.Namespace */ +.literal-block .nx { color: #728E00 } /* Name.Other */ +.literal-block .py { color: #434f54 } /* Name.Property */ +.literal-block .nt { color: #434f54 } /* Name.Tag */ +.literal-block .nv { color: #434f54 } /* Name.Variable */ +.literal-block .ow { color: #728E00 } /* Operator.Word */ +.literal-block .mb { color: #8A7B52 } /* Literal.Number.Bin */ +.literal-block .mf { color: #8A7B52 } /* Literal.Number.Float */ +.literal-block .mh { color: #8A7B52 } /* Literal.Number.Hex */ +.literal-block .mi { color: #8A7B52 } /* Literal.Number.Integer */ +.literal-block .mo { color: #8A7B52 } /* Literal.Number.Oct */ +.literal-block .sa { color: #7F8C8D } /* Literal.String.Affix */ +.literal-block .sb { color: #7F8C8D } /* Literal.String.Backtick */ +.literal-block .sc { color: #7F8C8D } /* Literal.String.Char */ +.literal-block .dl { color: #7F8C8D } /* Literal.String.Delimiter */ +.literal-block .sd { color: #7F8C8D } /* Literal.String.Doc */ +.literal-block .s2 { color: #7F8C8D } /* Literal.String.Double */ +.literal-block .se { color: #7F8C8D } /* Literal.String.Escape */ +.literal-block .sh { color: #7F8C8D } /* Literal.String.Heredoc */ +.literal-block .si { color: #7F8C8D } /* Literal.String.Interpol */ +.literal-block .sx { color: #7F8C8D } /* Literal.String.Other */ +.literal-block .sr { color: #7F8C8D } /* Literal.String.Regex */ +.literal-block .s1 { color: #7F8C8D } /* Literal.String.Single */ +.literal-block .ss { color: #7F8C8D } /* Literal.String.Symbol */ +.literal-block .bp { color: #728E00 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #D35400 } /* Name.Function.Magic */ +.literal-block .vc { color: #434f54 } /* Name.Variable.Class */ +.literal-block .vg { color: #434f54 } /* Name.Variable.Global */ +.literal-block .vi { color: #434f54 } /* Name.Variable.Instance */ +.literal-block .vm { color: #434f54 } /* Name.Variable.Magic */ +.literal-block .il { color: #8A7B52 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/arduino.min.css b/theme/pygments/arduino.min.css new file mode 100644 index 00000000..cca52ffe --- /dev/null +++ b/theme/pygments/arduino.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#95a5a6}.highlight .err{color:#a61717}.highlight .k{color:#728e00}.highlight .n{color:#434f54}.highlight .o{color:#728e00}.highlight .ch,.highlight .cm{color:#95a5a6}.highlight .cp{color:#728e00}.highlight .c1,.highlight .cpf,.highlight .cs{color:#95a5a6}.highlight .kc{color:#00979d}.highlight .kd,.highlight .kn{color:#728e00}.highlight .kp,.highlight .kr,.highlight .kt{color:#00979d}.highlight .m{color:#8a7b52}.highlight .s{color:#7f8c8d}.highlight .na{color:#434f54}.highlight .nb{color:#728e00}.highlight .nc,.highlight .nd,.highlight .ne,.highlight .ni,.highlight .no{color:#434f54}.highlight .nf{color:#d35400}.highlight .nl,.highlight .nn{color:#434f54}.highlight .nx{color:#728e00}.highlight .nt,.highlight .nv,.highlight .py{color:#434f54}.highlight .ow{color:#728e00}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#8a7b52}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#7f8c8d}.highlight .bp{color:#728e00}.highlight .fm{color:#d35400}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#434f54}.highlight .il{color:#8a7b52}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#95a5a6}.literal-block .err{color:#a61717}.literal-block .k{color:#728e00}.literal-block .n{color:#434f54}.literal-block .o{color:#728e00}.literal-block .ch,.literal-block .cm{color:#95a5a6}.literal-block .cp{color:#728e00}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#95a5a6}.literal-block .kc{color:#00979d}.literal-block .kd,.literal-block .kn{color:#728e00}.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#00979d}.literal-block .m{color:#8a7b52}.literal-block .s{color:#7f8c8d}.literal-block .na{color:#434f54}.literal-block .nb{color:#728e00}.literal-block .nc,.literal-block .nd,.literal-block .ne,.literal-block .ni,.literal-block .no{color:#434f54}.literal-block .nf{color:#d35400}.literal-block .nl,.literal-block .nn{color:#434f54}.literal-block .nx{color:#728e00}.literal-block .nt,.literal-block .nv,.literal-block .py{color:#434f54}.literal-block .ow{color:#728e00}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#8a7b52}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#7f8c8d}.literal-block .bp{color:#728e00}.literal-block .fm{color:#d35400}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#434f54}.literal-block .il{color:#8a7b52} \ No newline at end of file diff --git a/theme/pygments/autumn.css b/theme/pygments/autumn.css new file mode 100644 index 00000000..6215d9fc --- /dev/null +++ b/theme/pygments/autumn.css @@ -0,0 +1,132 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #aaaaaa; font-style: italic } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #0000aa } /* Keyword */ +.highlight .ch { color: #aaaaaa; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #aaaaaa; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #4c8317 } /* Comment.Preproc */ +.highlight .cpf { color: #aaaaaa; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #aaaaaa; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #0000aa; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #aa0000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00aa00 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #0000aa } /* Keyword.Constant */ +.highlight .kd { color: #0000aa } /* Keyword.Declaration */ +.highlight .kn { color: #0000aa } /* Keyword.Namespace */ +.highlight .kp { color: #0000aa } /* Keyword.Pseudo */ +.highlight .kr { color: #0000aa } /* Keyword.Reserved */ +.highlight .kt { color: #00aaaa } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #aa5500 } /* Literal.String */ +.highlight .na { color: #1e90ff } /* Name.Attribute */ +.highlight .nb { color: #00aaaa } /* Name.Builtin */ +.highlight .nc { color: #00aa00; text-decoration: underline } /* Name.Class */ +.highlight .no { color: #aa0000 } /* Name.Constant */ +.highlight .nd { color: #888888 } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .nf { color: #00aa00 } /* Name.Function */ +.highlight .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */ +.highlight .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #aa0000 } /* Name.Variable */ +.highlight .ow { color: #0000aa } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #009999 } /* Literal.Number.Bin */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sa { color: #aa5500 } /* Literal.String.Affix */ +.highlight .sb { color: #aa5500 } /* Literal.String.Backtick */ +.highlight .sc { color: #aa5500 } /* Literal.String.Char */ +.highlight .dl { color: #aa5500 } /* Literal.String.Delimiter */ +.highlight .sd { color: #aa5500 } /* Literal.String.Doc */ +.highlight .s2 { color: #aa5500 } /* Literal.String.Double */ +.highlight .se { color: #aa5500 } /* Literal.String.Escape */ +.highlight .sh { color: #aa5500 } /* Literal.String.Heredoc */ +.highlight .si { color: #aa5500 } /* Literal.String.Interpol */ +.highlight .sx { color: #aa5500 } /* Literal.String.Other */ +.highlight .sr { color: #009999 } /* Literal.String.Regex */ +.highlight .s1 { color: #aa5500 } /* Literal.String.Single */ +.highlight .ss { color: #0000aa } /* Literal.String.Symbol */ +.highlight .bp { color: #00aaaa } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #00aa00 } /* Name.Function.Magic */ +.highlight .vc { color: #aa0000 } /* Name.Variable.Class */ +.highlight .vg { color: #aa0000 } /* Name.Variable.Global */ +.highlight .vi { color: #aa0000 } /* Name.Variable.Instance */ +.highlight .vm { color: #aa0000 } /* Name.Variable.Magic */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #aaaaaa; font-style: italic } /* Comment */ +.literal-block .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.literal-block .k { color: #0000aa } /* Keyword */ +.literal-block .ch { color: #aaaaaa; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #aaaaaa; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #4c8317 } /* Comment.Preproc */ +.literal-block .cpf { color: #aaaaaa; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #aaaaaa; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #0000aa; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #aa0000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #aa0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00aa00 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #555555 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #aa0000 } /* Generic.Traceback */ +.literal-block .kc { color: #0000aa } /* Keyword.Constant */ +.literal-block .kd { color: #0000aa } /* Keyword.Declaration */ +.literal-block .kn { color: #0000aa } /* Keyword.Namespace */ +.literal-block .kp { color: #0000aa } /* Keyword.Pseudo */ +.literal-block .kr { color: #0000aa } /* Keyword.Reserved */ +.literal-block .kt { color: #00aaaa } /* Keyword.Type */ +.literal-block .m { color: #009999 } /* Literal.Number */ +.literal-block .s { color: #aa5500 } /* Literal.String */ +.literal-block .na { color: #1e90ff } /* Name.Attribute */ +.literal-block .nb { color: #00aaaa } /* Name.Builtin */ +.literal-block .nc { color: #00aa00; text-decoration: underline } /* Name.Class */ +.literal-block .no { color: #aa0000 } /* Name.Constant */ +.literal-block .nd { color: #888888 } /* Name.Decorator */ +.literal-block .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.literal-block .nf { color: #00aa00 } /* Name.Function */ +.literal-block .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */ +.literal-block .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #aa0000 } /* Name.Variable */ +.literal-block .ow { color: #0000aa } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #009999 } /* Literal.Number.Bin */ +.literal-block .mf { color: #009999 } /* Literal.Number.Float */ +.literal-block .mh { color: #009999 } /* Literal.Number.Hex */ +.literal-block .mi { color: #009999 } /* Literal.Number.Integer */ +.literal-block .mo { color: #009999 } /* Literal.Number.Oct */ +.literal-block .sa { color: #aa5500 } /* Literal.String.Affix */ +.literal-block .sb { color: #aa5500 } /* Literal.String.Backtick */ +.literal-block .sc { color: #aa5500 } /* Literal.String.Char */ +.literal-block .dl { color: #aa5500 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #aa5500 } /* Literal.String.Doc */ +.literal-block .s2 { color: #aa5500 } /* Literal.String.Double */ +.literal-block .se { color: #aa5500 } /* Literal.String.Escape */ +.literal-block .sh { color: #aa5500 } /* Literal.String.Heredoc */ +.literal-block .si { color: #aa5500 } /* Literal.String.Interpol */ +.literal-block .sx { color: #aa5500 } /* Literal.String.Other */ +.literal-block .sr { color: #009999 } /* Literal.String.Regex */ +.literal-block .s1 { color: #aa5500 } /* Literal.String.Single */ +.literal-block .ss { color: #0000aa } /* Literal.String.Symbol */ +.literal-block .bp { color: #00aaaa } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #00aa00 } /* Name.Function.Magic */ +.literal-block .vc { color: #aa0000 } /* Name.Variable.Class */ +.literal-block .vg { color: #aa0000 } /* Name.Variable.Global */ +.literal-block .vi { color: #aa0000 } /* Name.Variable.Instance */ +.literal-block .vm { color: #aa0000 } /* Name.Variable.Magic */ +.literal-block .il { color: #009999 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/autumn.min.css b/theme/pygments/autumn.min.css new file mode 100644 index 00000000..14fdb192 --- /dev/null +++ b/theme/pygments/autumn.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#aaa;font-style:italic}.highlight .err{color:red;background-color:#faa}.highlight .k{color:#00a}.highlight .ch,.highlight .cm{color:#aaa;font-style:italic}.highlight .cp{color:#4c8317}.highlight .c1,.highlight .cpf{color:#aaa;font-style:italic}.highlight .cs{color:#00a;font-style:italic}.highlight .gd{color:#a00}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#0a0}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{color:#00a}.highlight .kt{color:#0aa}.highlight .m{color:#099}.highlight .s{color:#a50}.highlight .na{color:#1e90ff}.highlight .nb{color:#0aa}.highlight .nc{color:#0a0;text-decoration:underline}.highlight .no{color:#a00}.highlight .nd{color:#888}.highlight .ni{color:#800;font-weight:700}.highlight .nf{color:#0a0}.highlight .nn{color:#0aa;text-decoration:underline}.highlight .nt{color:#1e90ff;font-weight:700}.highlight .nv{color:#a00}.highlight .ow{color:#00a}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#099}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#a50}.highlight .sr{color:#099}.highlight .s1{color:#a50}.highlight .ss{color:#00a}.highlight .bp{color:#0aa}.highlight .fm{color:#0a0}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#a00}.highlight .il{color:#099}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#aaa;font-style:italic}.literal-block .err{color:red;background-color:#faa}.literal-block .k{color:#00a}.literal-block .ch,.literal-block .cm{color:#aaa;font-style:italic}.literal-block .cp{color:#4c8317}.literal-block .c1,.literal-block .cpf{color:#aaa;font-style:italic}.literal-block .cs{color:#00a;font-style:italic}.literal-block .gd{color:#a00}.literal-block .ge{font-style:italic}.literal-block .gr{color:#a00}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#0a0}.literal-block .go{color:#888}.literal-block .gp{color:#555}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#a00}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{color:#00a}.literal-block .kt{color:#0aa}.literal-block .m{color:#099}.literal-block .s{color:#a50}.literal-block .na{color:#1e90ff}.literal-block .nb{color:#0aa}.literal-block .nc{color:#0a0;text-decoration:underline}.literal-block .no{color:#a00}.literal-block .nd{color:#888}.literal-block .ni{color:#800;font-weight:700}.literal-block .nf{color:#0a0}.literal-block .nn{color:#0aa;text-decoration:underline}.literal-block .nt{color:#1e90ff;font-weight:700}.literal-block .nv{color:#a00}.literal-block .ow{color:#00a}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#099}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sx{color:#a50}.literal-block .sr{color:#099}.literal-block .s1{color:#a50}.literal-block .ss{color:#00a}.literal-block .bp{color:#0aa}.literal-block .fm{color:#0a0}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#a00}.literal-block .il{color:#099} \ No newline at end of file diff --git a/theme/pygments/borland.css b/theme/pygments/borland.css new file mode 100644 index 00000000..7e49561f --- /dev/null +++ b/theme/pygments/borland.css @@ -0,0 +1,104 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #000080; font-weight: bold } /* Keyword */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008080 } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #000080; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #000080; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #000080; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #000080; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #000080; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #000080; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #0000FF } /* Literal.Number */ +.highlight .s { color: #0000FF } /* Literal.String */ +.highlight .na { color: #FF0000 } /* Name.Attribute */ +.highlight .nt { color: #000080; font-weight: bold } /* Name.Tag */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #0000FF } /* Literal.Number.Bin */ +.highlight .mf { color: #0000FF } /* Literal.Number.Float */ +.highlight .mh { color: #0000FF } /* Literal.Number.Hex */ +.highlight .mi { color: #0000FF } /* Literal.Number.Integer */ +.highlight .mo { color: #0000FF } /* Literal.Number.Oct */ +.highlight .sa { color: #0000FF } /* Literal.String.Affix */ +.highlight .sb { color: #0000FF } /* Literal.String.Backtick */ +.highlight .sc { color: #800080 } /* Literal.String.Char */ +.highlight .dl { color: #0000FF } /* Literal.String.Delimiter */ +.highlight .sd { color: #0000FF } /* Literal.String.Doc */ +.highlight .s2 { color: #0000FF } /* Literal.String.Double */ +.highlight .se { color: #0000FF } /* Literal.String.Escape */ +.highlight .sh { color: #0000FF } /* Literal.String.Heredoc */ +.highlight .si { color: #0000FF } /* Literal.String.Interpol */ +.highlight .sx { color: #0000FF } /* Literal.String.Other */ +.highlight .sr { color: #0000FF } /* Literal.String.Regex */ +.highlight .s1 { color: #0000FF } /* Literal.String.Single */ +.highlight .ss { color: #0000FF } /* Literal.String.Symbol */ +.highlight .il { color: #0000FF } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #008800; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #000080; font-weight: bold } /* Keyword */ +.literal-block .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #008080 } /* Comment.Preproc */ +.literal-block .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.literal-block .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #aa0000 } /* Generic.Error */ +.literal-block .gh { color: #999999 } /* Generic.Heading */ +.literal-block .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #555555 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #aaaaaa } /* Generic.Subheading */ +.literal-block .gt { color: #aa0000 } /* Generic.Traceback */ +.literal-block .kc { color: #000080; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #000080; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #000080; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #000080; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #000080; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #000080; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #0000FF } /* Literal.Number */ +.literal-block .s { color: #0000FF } /* Literal.String */ +.literal-block .na { color: #FF0000 } /* Name.Attribute */ +.literal-block .nt { color: #000080; font-weight: bold } /* Name.Tag */ +.literal-block .ow { font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #0000FF } /* Literal.Number.Bin */ +.literal-block .mf { color: #0000FF } /* Literal.Number.Float */ +.literal-block .mh { color: #0000FF } /* Literal.Number.Hex */ +.literal-block .mi { color: #0000FF } /* Literal.Number.Integer */ +.literal-block .mo { color: #0000FF } /* Literal.Number.Oct */ +.literal-block .sa { color: #0000FF } /* Literal.String.Affix */ +.literal-block .sb { color: #0000FF } /* Literal.String.Backtick */ +.literal-block .sc { color: #800080 } /* Literal.String.Char */ +.literal-block .dl { color: #0000FF } /* Literal.String.Delimiter */ +.literal-block .sd { color: #0000FF } /* Literal.String.Doc */ +.literal-block .s2 { color: #0000FF } /* Literal.String.Double */ +.literal-block .se { color: #0000FF } /* Literal.String.Escape */ +.literal-block .sh { color: #0000FF } /* Literal.String.Heredoc */ +.literal-block .si { color: #0000FF } /* Literal.String.Interpol */ +.literal-block .sx { color: #0000FF } /* Literal.String.Other */ +.literal-block .sr { color: #0000FF } /* Literal.String.Regex */ +.literal-block .s1 { color: #0000FF } /* Literal.String.Single */ +.literal-block .ss { color: #0000FF } /* Literal.String.Symbol */ +.literal-block .il { color: #0000FF } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/borland.min.css b/theme/pygments/borland.min.css new file mode 100644 index 00000000..c56d16aa --- /dev/null +++ b/theme/pygments/borland.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#080;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:navy;font-weight:700}.highlight .ch,.highlight .cm{color:#080;font-style:italic}.highlight .cp{color:teal}.highlight .c1,.highlight .cpf{color:#080;font-style:italic}.highlight .cs{color:#080;font-weight:700}.highlight .gd{color:#000;background-color:#fdd}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:700}.highlight .gu{color:#aaa}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:navy;font-weight:700}.highlight .m,.highlight .s{color:#00f}.highlight .na{color:red}.highlight .nt{color:navy}.highlight .nt,.highlight .ow{font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo,.highlight .sa,.highlight .sb{color:#00f}.highlight .sc{color:purple}.highlight .dl,.highlight .il,.highlight .s1,.highlight .s2,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#00f}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#080;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k{color:navy;font-weight:700}.literal-block .ch,.literal-block .cm{color:#080;font-style:italic}.literal-block .cp{color:teal}.literal-block .c1,.literal-block .cpf{color:#080;font-style:italic}.literal-block .cs{color:#080;font-weight:700}.literal-block .gd{color:#000;background-color:#fdd}.literal-block .ge{font-style:italic}.literal-block .gr{color:#a00}.literal-block .gh{color:#999}.literal-block .gi{color:#000;background-color:#dfd}.literal-block .go{color:#888}.literal-block .gp{color:#555}.literal-block .gs{font-weight:700}.literal-block .gu{color:#aaa}.literal-block .gt{color:#a00}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:navy;font-weight:700}.literal-block .m,.literal-block .s{color:#00f}.literal-block .na{color:red}.literal-block .nt{color:navy;font-weight:700}.literal-block .ow{font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo,.literal-block .sa,.literal-block .sb{color:#00f}.literal-block .sc{color:purple}.literal-block .dl,.literal-block .il,.literal-block .s1,.literal-block .s2,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#00f} \ No newline at end of file diff --git a/theme/pygments/bw.css b/theme/pygments/bw.css new file mode 100644 index 00000000..165236d4 --- /dev/null +++ b/theme/pygments/bw.css @@ -0,0 +1,78 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .ch { font-style: italic } /* Comment.Hashbang */ +.highlight .cm { font-style: italic } /* Comment.Multiline */ +.highlight .cpf { font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { font-style: italic } /* Comment.Single */ +.highlight .cs { font-style: italic } /* Comment.Special */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gh { font-weight: bold } /* Generic.Heading */ +.highlight .gp { font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { font-weight: bold } /* Generic.Subheading */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { font-weight: bold } /* Keyword.Namespace */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .s { font-style: italic } /* Literal.String */ +.highlight .nc { font-weight: bold } /* Name.Class */ +.highlight .ni { font-weight: bold } /* Name.Entity */ +.highlight .ne { font-weight: bold } /* Name.Exception */ +.highlight .nn { font-weight: bold } /* Name.Namespace */ +.highlight .nt { font-weight: bold } /* Name.Tag */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .sa { font-style: italic } /* Literal.String.Affix */ +.highlight .sb { font-style: italic } /* Literal.String.Backtick */ +.highlight .sc { font-style: italic } /* Literal.String.Char */ +.highlight .dl { font-style: italic } /* Literal.String.Delimiter */ +.highlight .sd { font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { font-style: italic } /* Literal.String.Double */ +.highlight .se { font-weight: bold; font-style: italic } /* Literal.String.Escape */ +.highlight .sh { font-style: italic } /* Literal.String.Heredoc */ +.highlight .si { font-weight: bold; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { font-style: italic } /* Literal.String.Other */ +.highlight .sr { font-style: italic } /* Literal.String.Regex */ +.highlight .s1 { font-style: italic } /* Literal.String.Single */ +.highlight .ss { font-style: italic } /* Literal.String.Symbol */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { font-style: italic } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { font-weight: bold } /* Keyword */ +.literal-block .ch { font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { font-style: italic } /* Comment.Multiline */ +.literal-block .cpf { font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { font-style: italic } /* Comment.Single */ +.literal-block .cs { font-style: italic } /* Comment.Special */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gh { font-weight: bold } /* Generic.Heading */ +.literal-block .gp { font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { font-weight: bold } /* Generic.Subheading */ +.literal-block .kc { font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { font-weight: bold } /* Keyword.Namespace */ +.literal-block .kr { font-weight: bold } /* Keyword.Reserved */ +.literal-block .s { font-style: italic } /* Literal.String */ +.literal-block .nc { font-weight: bold } /* Name.Class */ +.literal-block .ni { font-weight: bold } /* Name.Entity */ +.literal-block .ne { font-weight: bold } /* Name.Exception */ +.literal-block .nn { font-weight: bold } /* Name.Namespace */ +.literal-block .nt { font-weight: bold } /* Name.Tag */ +.literal-block .ow { font-weight: bold } /* Operator.Word */ +.literal-block .sa { font-style: italic } /* Literal.String.Affix */ +.literal-block .sb { font-style: italic } /* Literal.String.Backtick */ +.literal-block .sc { font-style: italic } /* Literal.String.Char */ +.literal-block .dl { font-style: italic } /* Literal.String.Delimiter */ +.literal-block .sd { font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { font-style: italic } /* Literal.String.Double */ +.literal-block .se { font-weight: bold; font-style: italic } /* Literal.String.Escape */ +.literal-block .sh { font-style: italic } /* Literal.String.Heredoc */ +.literal-block .si { font-weight: bold; font-style: italic } /* Literal.String.Interpol */ +.literal-block .sx { font-style: italic } /* Literal.String.Other */ +.literal-block .sr { font-style: italic } /* Literal.String.Regex */ +.literal-block .s1 { font-style: italic } /* Literal.String.Single */ +.literal-block .ss { font-style: italic } /* Literal.String.Symbol */ \ No newline at end of file diff --git a/theme/pygments/bw.min.css b/theme/pygments/bw.min.css new file mode 100644 index 00000000..b598799e --- /dev/null +++ b/theme/pygments/bw.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{font-style:italic}.highlight .err{border:1px solid red}.highlight .k{font-weight:700}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cpf,.highlight .cs,.highlight .ge{font-style:italic}.highlight .gh,.highlight .gp,.highlight .gs,.highlight .gu,.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kr{font-weight:700}.highlight .s{font-style:italic}.highlight .nc,.highlight .ne,.highlight .ni,.highlight .nn,.highlight .nt,.highlight .ow{font-weight:700}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se{font-style:italic}.highlight .se{font-weight:700}.highlight .sh,.highlight .si{font-style:italic}.highlight .si{font-weight:700}.highlight .s1,.highlight .sr,.highlight .ss,.highlight .sx{font-style:italic}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{font-style:italic}.literal-block .err{border:1px solid red}.literal-block .k{font-weight:700}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cpf,.literal-block .cs,.literal-block .ge{font-style:italic}.literal-block .gh,.literal-block .gp,.literal-block .gs,.literal-block .gu,.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kr{font-weight:700}.literal-block .s{font-style:italic}.literal-block .nc,.literal-block .ne,.literal-block .ni,.literal-block .nn,.literal-block .nt,.literal-block .ow{font-weight:700}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd{font-style:italic}.literal-block .se{font-weight:700;font-style:italic}.literal-block .sh{font-style:italic}.literal-block .si{font-weight:700;font-style:italic}.literal-block .s1,.literal-block .sr,.literal-block .ss,.literal-block .sx{font-style:italic} \ No newline at end of file diff --git a/theme/pygments/colorful.css b/theme/pygments/colorful.css new file mode 100644 index 00000000..fb2fec94 --- /dev/null +++ b/theme/pygments/colorful.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #888888 } /* Comment */ +.literal-block .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.literal-block .k { color: #008800; font-weight: bold } /* Keyword */ +.literal-block .o { color: #333333 } /* Operator */ +.literal-block .ch { color: #888888 } /* Comment.Hashbang */ +.literal-block .cm { color: #888888 } /* Comment.Multiline */ +.literal-block .cp { color: #557799 } /* Comment.Preproc */ +.literal-block .cpf { color: #888888 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #888888 } /* Comment.Single */ +.literal-block .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.literal-block .gd { color: #A00000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.literal-block .s { background-color: #fff0f0 } /* Literal.String */ +.literal-block .na { color: #0000CC } /* Name.Attribute */ +.literal-block .nb { color: #007020 } /* Name.Builtin */ +.literal-block .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #003366; font-weight: bold } /* Name.Constant */ +.literal-block .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.literal-block .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.literal-block .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.literal-block .nl { color: #997700; font-weight: bold } /* Name.Label */ +.literal-block .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.literal-block .nt { color: #007700 } /* Name.Tag */ +.literal-block .nv { color: #996633 } /* Name.Variable */ +.literal-block .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.literal-block .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.literal-block .sc { color: #0044DD } /* Literal.String.Char */ +.literal-block .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #DD4422 } /* Literal.String.Doc */ +.literal-block .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.literal-block .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.literal-block .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.literal-block .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.literal-block .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.literal-block .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.literal-block .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.literal-block .ss { color: #AA6600 } /* Literal.String.Symbol */ +.literal-block .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.literal-block .vc { color: #336699 } /* Name.Variable.Class */ +.literal-block .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.literal-block .vi { color: #3333BB } /* Name.Variable.Instance */ +.literal-block .vm { color: #996633 } /* Name.Variable.Magic */ +.literal-block .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/colorful.min.css b/theme/pygments/colorful.min.css new file mode 100644 index 00000000..f34652ef --- /dev/null +++ b/theme/pygments/colorful.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#888}.highlight .err{color:red;background-color:#faa}.highlight .k{color:#080;font-weight:700}.highlight .o{color:#333}.highlight .ch,.highlight .cm{color:#888}.highlight .cp{color:#579}.highlight .c1,.highlight .cpf{color:#888}.highlight .cs{color:#c00;font-weight:700}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:#c65d09}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#04d}.highlight .kc,.highlight .kd,.highlight .kn{color:#080;font-weight:700}.highlight .kp{color:#038;font-weight:700}.highlight .kr{color:#080;font-weight:700}.highlight .kt{color:#339;font-weight:700}.highlight .m{color:#60e;font-weight:700}.highlight .s{background-color:#fff0f0}.highlight .na{color:#00c}.highlight .nb{color:#007020}.highlight .nc{color:#b06;font-weight:700}.highlight .no{color:#036;font-weight:700}.highlight .nd{color:#555;font-weight:700}.highlight .ni{color:#800;font-weight:700}.highlight .ne{color:red;font-weight:700}.highlight .nf{color:#06b;font-weight:700}.highlight .nl{color:#970;font-weight:700}.highlight .nn{color:#0e84b5;font-weight:700}.highlight .nt{color:#070}.highlight .nv{color:#963}.highlight .ow{color:#000;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf{color:#60e;font-weight:700}.highlight .mh{color:#058;font-weight:700}.highlight .mi{color:#00d;font-weight:700}.highlight .mo{color:#40e;font-weight:700}.highlight .sa,.highlight .sb{background-color:#fff0f0}.highlight .sc{color:#04d}.highlight .dl{background-color:#fff0f0}.highlight .sd{color:#d42}.highlight .s2,.highlight .se{background-color:#fff0f0}.highlight .se{color:#666;font-weight:700}.highlight .sh{background-color:#fff0f0}.highlight .si{background-color:#eee}.highlight .sx{color:#d20;background-color:#fff0f0}.highlight .sr{color:#000;background-color:#fff0ff}.highlight .s1{background-color:#fff0f0}.highlight .ss{color:#a60}.highlight .bp{color:#007020}.highlight .fm{color:#06b;font-weight:700}.highlight .vc{color:#369}.highlight .vg{color:#d70;font-weight:700}.highlight .vi{color:#33b}.highlight .vm{color:#963}.highlight .il{color:#00d;font-weight:700}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#888}.literal-block .err{color:red;background-color:#faa}.literal-block .k{color:#080;font-weight:700}.literal-block .o{color:#333}.literal-block .ch,.literal-block .cm{color:#888}.literal-block .cp{color:#579}.literal-block .c1,.literal-block .cpf{color:#888}.literal-block .cs{color:#c00;font-weight:700}.literal-block .gd{color:#a00000}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#888}.literal-block .gp{color:#c65d09;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#080;font-weight:700}.literal-block .kp{color:#038;font-weight:700}.literal-block .kr{color:#080;font-weight:700}.literal-block .kt{color:#339;font-weight:700}.literal-block .m{color:#60e;font-weight:700}.literal-block .s{background-color:#fff0f0}.literal-block .na{color:#00c}.literal-block .nb{color:#007020}.literal-block .nc{color:#b06;font-weight:700}.literal-block .no{color:#036;font-weight:700}.literal-block .nd{color:#555;font-weight:700}.literal-block .ni{color:#800;font-weight:700}.literal-block .ne{color:red;font-weight:700}.literal-block .nf{color:#06b;font-weight:700}.literal-block .nl{color:#970;font-weight:700}.literal-block .nn{color:#0e84b5;font-weight:700}.literal-block .nt{color:#070}.literal-block .nv{color:#963}.literal-block .ow{color:#000;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf{color:#60e;font-weight:700}.literal-block .mh{color:#058;font-weight:700}.literal-block .mi{color:#00d;font-weight:700}.literal-block .mo{color:#40e;font-weight:700}.literal-block .sa,.literal-block .sb{background-color:#fff0f0}.literal-block .sc{color:#04d}.literal-block .dl{background-color:#fff0f0}.literal-block .sd{color:#d42}.literal-block .s2,.literal-block .se{background-color:#fff0f0}.literal-block .se{color:#666;font-weight:700}.literal-block .sh{background-color:#fff0f0}.literal-block .si{background-color:#eee}.literal-block .sx{color:#d20;background-color:#fff0f0}.literal-block .sr{color:#000;background-color:#fff0ff}.literal-block .s1{background-color:#fff0f0}.literal-block .ss{color:#a60}.literal-block .bp{color:#007020}.literal-block .fm{color:#06b;font-weight:700}.literal-block .vc{color:#369}.literal-block .vg{color:#d70;font-weight:700}.literal-block .vi{color:#33b}.literal-block .vm{color:#963}.literal-block .il{color:#00d;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/default.css b/theme/pygments/default.css new file mode 100644 index 00000000..917c471a --- /dev/null +++ b/theme/pygments/default.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #408080; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ +.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #7D9029 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #f8f8f8; } +.literal-block .c { color: #408080; font-style: italic } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { color: #008000; font-weight: bold } /* Keyword */ +.literal-block .o { color: #666666 } /* Operator */ +.literal-block .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #BC7A00 } /* Comment.Preproc */ +.literal-block .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #408080; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #A00000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #008000 } /* Keyword.Pseudo */ +.literal-block .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #B00040 } /* Keyword.Type */ +.literal-block .m { color: #666666 } /* Literal.Number */ +.literal-block .s { color: #BA2121 } /* Literal.String */ +.literal-block .na { color: #7D9029 } /* Name.Attribute */ +.literal-block .nb { color: #008000 } /* Name.Builtin */ +.literal-block .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #880000 } /* Name.Constant */ +.literal-block .nd { color: #AA22FF } /* Name.Decorator */ +.literal-block .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.literal-block .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #0000FF } /* Name.Function */ +.literal-block .nl { color: #A0A000 } /* Name.Label */ +.literal-block .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.literal-block .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #19177C } /* Name.Variable */ +.literal-block .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #666666 } /* Literal.Number.Bin */ +.literal-block .mf { color: #666666 } /* Literal.Number.Float */ +.literal-block .mh { color: #666666 } /* Literal.Number.Hex */ +.literal-block .mi { color: #666666 } /* Literal.Number.Integer */ +.literal-block .mo { color: #666666 } /* Literal.Number.Oct */ +.literal-block .sa { color: #BA2121 } /* Literal.String.Affix */ +.literal-block .sb { color: #BA2121 } /* Literal.String.Backtick */ +.literal-block .sc { color: #BA2121 } /* Literal.String.Char */ +.literal-block .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #BA2121 } /* Literal.String.Double */ +.literal-block .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.literal-block .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.literal-block .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.literal-block .sx { color: #008000 } /* Literal.String.Other */ +.literal-block .sr { color: #BB6688 } /* Literal.String.Regex */ +.literal-block .s1 { color: #BA2121 } /* Literal.String.Single */ +.literal-block .ss { color: #19177C } /* Literal.String.Symbol */ +.literal-block .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #0000FF } /* Name.Function.Magic */ +.literal-block .vc { color: #19177C } /* Name.Variable.Class */ +.literal-block .vg { color: #19177C } /* Name.Variable.Global */ +.literal-block .vi { color: #19177C } /* Name.Variable.Instance */ +.literal-block .vm { color: #19177C } /* Name.Variable.Magic */ +.literal-block .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/default.min.css b/theme/pygments/default.min.css new file mode 100644 index 00000000..281bb01f --- /dev/null +++ b/theme/pygments/default.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#408080;font-style:italic}.highlight .err{border:1px solid red}.highlight .k{color:green;font-weight:700}.highlight .o{color:#666}.highlight .ch,.highlight .cm{color:#408080;font-style:italic}.highlight .cp{color:#bc7a00}.highlight .c1,.highlight .cpf,.highlight .cs{color:#408080;font-style:italic}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#04d}.highlight .kc,.highlight .kd,.highlight .kn{color:green;font-weight:700}.highlight .kp{color:green}.highlight .kr{color:green;font-weight:700}.highlight .kt{color:#b00040}.highlight .m{color:#666}.highlight .s{color:#ba2121}.highlight .na{color:#7d9029}.highlight .nb{color:green}.highlight .nc{color:#00f;font-weight:700}.highlight .no{color:#800}.highlight .nd{color:#a2f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#d2413a;font-weight:700}.highlight .nf{color:#00f}.highlight .nl{color:#a0a000}.highlight .nn{color:#00f;font-weight:700}.highlight .nt{color:green;font-weight:700}.highlight .nv{color:#19177c}.highlight .ow{color:#a2f;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#666}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#ba2121}.highlight .sd{color:#ba2121;font-style:italic}.highlight .s2{color:#ba2121}.highlight .se{color:#b62;font-weight:700}.highlight .sh{color:#ba2121}.highlight .si{color:#b68;font-weight:700}.highlight .sx{color:green}.highlight .sr{color:#b68}.highlight .s1{color:#ba2121}.highlight .ss{color:#19177c}.highlight .bp{color:green}.highlight .fm{color:#00f}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#19177c}.highlight .il{color:#666}.literal-block .hll{background-color:#ffc}.literal-block{background:#f8f8f8}.literal-block .c{color:#408080;font-style:italic}.literal-block .err{border:1px solid red}.literal-block .k{color:green;font-weight:700}.literal-block .o{color:#666}.literal-block .ch,.literal-block .cm{color:#408080;font-style:italic}.literal-block .cp{color:#bc7a00}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#408080;font-style:italic}.literal-block .gd{color:#a00000}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#888}.literal-block .gp{color:navy;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:green;font-weight:700}.literal-block .kp{color:green}.literal-block .kr{color:green;font-weight:700}.literal-block .kt{color:#b00040}.literal-block .m{color:#666}.literal-block .s{color:#ba2121}.literal-block .na{color:#7d9029}.literal-block .nb{color:green}.literal-block .nc{color:#00f;font-weight:700}.literal-block .no{color:#800}.literal-block .nd{color:#a2f}.literal-block .ni{color:#999;font-weight:700}.literal-block .ne{color:#d2413a;font-weight:700}.literal-block .nf{color:#00f}.literal-block .nl{color:#a0a000}.literal-block .nn{color:#00f;font-weight:700}.literal-block .nt{color:green;font-weight:700}.literal-block .nv{color:#19177c}.literal-block .ow{color:#a2f;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#666}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#ba2121}.literal-block .sd{color:#ba2121;font-style:italic}.literal-block .s2{color:#ba2121}.literal-block .se{color:#b62;font-weight:700}.literal-block .sh{color:#ba2121}.literal-block .si{color:#b68;font-weight:700}.literal-block .sx{color:green}.literal-block .sr{color:#b68}.literal-block .s1{color:#ba2121}.literal-block .ss{color:#19177c}.literal-block .bp{color:green}.literal-block .fm{color:#00f}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#19177c}.literal-block .il{color:#666} \ No newline at end of file diff --git a/theme/pygments/emacs.css b/theme/pygments/emacs.css new file mode 100644 index 00000000..8423a38d --- /dev/null +++ b/theme/pygments/emacs.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #AA22FF; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008800 } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #AA22FF } /* Keyword.Pseudo */ +.highlight .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BB4444 } /* Literal.String */ +.highlight .na { color: #BB4444 } /* Name.Attribute */ +.highlight .nb { color: #AA22FF } /* Name.Builtin */ +.highlight .nc { color: #0000FF } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #00A000 } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #B8860B } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BB4444 } /* Literal.String.Affix */ +.highlight .sb { color: #BB4444 } /* Literal.String.Backtick */ +.highlight .sc { color: #BB4444 } /* Literal.String.Char */ +.highlight .dl { color: #BB4444 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BB4444 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BB4444 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BB4444 } /* Literal.String.Single */ +.highlight .ss { color: #B8860B } /* Literal.String.Symbol */ +.highlight .bp { color: #AA22FF } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #00A000 } /* Name.Function.Magic */ +.highlight .vc { color: #B8860B } /* Name.Variable.Class */ +.highlight .vg { color: #B8860B } /* Name.Variable.Global */ +.highlight .vi { color: #B8860B } /* Name.Variable.Instance */ +.highlight .vm { color: #B8860B } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #f8f8f8; } +.literal-block .c { color: #008800; font-style: italic } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { color: #AA22FF; font-weight: bold } /* Keyword */ +.literal-block .o { color: #666666 } /* Operator */ +.literal-block .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #008800 } /* Comment.Preproc */ +.literal-block .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.literal-block .gd { color: #A00000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #AA22FF } /* Keyword.Pseudo */ +.literal-block .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #666666 } /* Literal.Number */ +.literal-block .s { color: #BB4444 } /* Literal.String */ +.literal-block .na { color: #BB4444 } /* Name.Attribute */ +.literal-block .nb { color: #AA22FF } /* Name.Builtin */ +.literal-block .nc { color: #0000FF } /* Name.Class */ +.literal-block .no { color: #880000 } /* Name.Constant */ +.literal-block .nd { color: #AA22FF } /* Name.Decorator */ +.literal-block .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.literal-block .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #00A000 } /* Name.Function */ +.literal-block .nl { color: #A0A000 } /* Name.Label */ +.literal-block .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.literal-block .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #B8860B } /* Name.Variable */ +.literal-block .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #666666 } /* Literal.Number.Bin */ +.literal-block .mf { color: #666666 } /* Literal.Number.Float */ +.literal-block .mh { color: #666666 } /* Literal.Number.Hex */ +.literal-block .mi { color: #666666 } /* Literal.Number.Integer */ +.literal-block .mo { color: #666666 } /* Literal.Number.Oct */ +.literal-block .sa { color: #BB4444 } /* Literal.String.Affix */ +.literal-block .sb { color: #BB4444 } /* Literal.String.Backtick */ +.literal-block .sc { color: #BB4444 } /* Literal.String.Char */ +.literal-block .dl { color: #BB4444 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #BB4444 } /* Literal.String.Double */ +.literal-block .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.literal-block .sh { color: #BB4444 } /* Literal.String.Heredoc */ +.literal-block .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.literal-block .sx { color: #008000 } /* Literal.String.Other */ +.literal-block .sr { color: #BB6688 } /* Literal.String.Regex */ +.literal-block .s1 { color: #BB4444 } /* Literal.String.Single */ +.literal-block .ss { color: #B8860B } /* Literal.String.Symbol */ +.literal-block .bp { color: #AA22FF } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #00A000 } /* Name.Function.Magic */ +.literal-block .vc { color: #B8860B } /* Name.Variable.Class */ +.literal-block .vg { color: #B8860B } /* Name.Variable.Global */ +.literal-block .vi { color: #B8860B } /* Name.Variable.Instance */ +.literal-block .vm { color: #B8860B } /* Name.Variable.Magic */ +.literal-block .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/emacs.min.css b/theme/pygments/emacs.min.css new file mode 100644 index 00000000..33820348 --- /dev/null +++ b/theme/pygments/emacs.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#080;font-style:italic}.highlight .err{border:1px solid red}.highlight .k{color:#a2f;font-weight:700}.highlight .o{color:#666}.highlight .ch,.highlight .cm{color:#080;font-style:italic}.highlight .cp{color:#080}.highlight .c1,.highlight .cpf{color:#080;font-style:italic}.highlight .cs{color:#080;font-weight:700}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#04d}.highlight .kc,.highlight .kd,.highlight .kn{color:#a2f;font-weight:700}.highlight .kp{color:#a2f}.highlight .kr{color:#a2f;font-weight:700}.highlight .kt{color:#0b0;font-weight:700}.highlight .m{color:#666}.highlight .na,.highlight .s{color:#b44}.highlight .nb{color:#a2f}.highlight .nc{color:#00f}.highlight .no{color:#800}.highlight .nd{color:#a2f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#d2413a;font-weight:700}.highlight .nf{color:#00a000}.highlight .nl{color:#a0a000}.highlight .nn{color:#00f;font-weight:700}.highlight .nt{color:green;font-weight:700}.highlight .nv{color:#b8860b}.highlight .ow{color:#a2f;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#666}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#b44}.highlight .sd{color:#b44;font-style:italic}.highlight .s2{color:#b44}.highlight .se{color:#b62;font-weight:700}.highlight .sh{color:#b44}.highlight .si{color:#b68;font-weight:700}.highlight .sx{color:green}.highlight .sr{color:#b68}.highlight .s1{color:#b44}.highlight .ss{color:#b8860b}.highlight .bp{color:#a2f}.highlight .fm{color:#00a000}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#b8860b}.highlight .il{color:#666}.literal-block .hll{background-color:#ffc}.literal-block{background:#f8f8f8}.literal-block .c{color:#080;font-style:italic}.literal-block .err{border:1px solid red}.literal-block .k{color:#a2f;font-weight:700}.literal-block .o{color:#666}.literal-block .ch,.literal-block .cm{color:#080;font-style:italic}.literal-block .cp{color:#080}.literal-block .c1,.literal-block .cpf{color:#080;font-style:italic}.literal-block .cs{color:#080;font-weight:700}.literal-block .gd{color:#a00000}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#888}.literal-block .gp{color:navy;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#a2f;font-weight:700}.literal-block .kp{color:#a2f}.literal-block .kr{color:#a2f;font-weight:700}.literal-block .kt{color:#0b0;font-weight:700}.literal-block .m{color:#666}.literal-block .na,.literal-block .s{color:#b44}.literal-block .nb{color:#a2f}.literal-block .nc{color:#00f}.literal-block .no{color:#800}.literal-block .nd{color:#a2f}.literal-block .ni{color:#999;font-weight:700}.literal-block .ne{color:#d2413a;font-weight:700}.literal-block .nf{color:#00a000}.literal-block .nl{color:#a0a000}.literal-block .nn{color:#00f;font-weight:700}.literal-block .nt{color:green;font-weight:700}.literal-block .nv{color:#b8860b}.literal-block .ow{color:#a2f;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#666}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#b44}.literal-block .sd{color:#b44;font-style:italic}.literal-block .s2{color:#b44}.literal-block .se{color:#b62;font-weight:700}.literal-block .sh{color:#b44}.literal-block .si{color:#b68;font-weight:700}.literal-block .sx{color:green}.literal-block .sr{color:#b68}.literal-block .s1{color:#b44}.literal-block .ss{color:#b8860b}.literal-block .bp{color:#a2f}.literal-block .fm{color:#00a000}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#b8860b}.literal-block .il{color:#666} \ No newline at end of file diff --git a/theme/pygments/friendly.css b/theme/pygments/friendly.css new file mode 100644 index 00000000..84279fb1 --- /dev/null +++ b/theme/pygments/friendly.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f0f0f0; } +.highlight .c { color: #60a0b0; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #40a070 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #40a070 } /* Literal.Number.Bin */ +.highlight .mf { color: #40a070 } /* Literal.Number.Float */ +.highlight .mh { color: #40a070 } /* Literal.Number.Hex */ +.highlight .mi { color: #40a070 } /* Literal.Number.Integer */ +.highlight .mo { color: #40a070 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287e } /* Name.Function.Magic */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ +.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #f0f0f0; } +.literal-block .c { color: #60a0b0; font-style: italic } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { color: #007020; font-weight: bold } /* Keyword */ +.literal-block .o { color: #666666 } /* Operator */ +.literal-block .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #007020 } /* Comment.Preproc */ +.literal-block .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ +.literal-block .gd { color: #A00000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #007020 } /* Keyword.Pseudo */ +.literal-block .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #902000 } /* Keyword.Type */ +.literal-block .m { color: #40a070 } /* Literal.Number */ +.literal-block .s { color: #4070a0 } /* Literal.String */ +.literal-block .na { color: #4070a0 } /* Name.Attribute */ +.literal-block .nb { color: #007020 } /* Name.Builtin */ +.literal-block .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #60add5 } /* Name.Constant */ +.literal-block .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.literal-block .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.literal-block .ne { color: #007020 } /* Name.Exception */ +.literal-block .nf { color: #06287e } /* Name.Function */ +.literal-block .nl { color: #002070; font-weight: bold } /* Name.Label */ +.literal-block .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.literal-block .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #bb60d5 } /* Name.Variable */ +.literal-block .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #40a070 } /* Literal.Number.Bin */ +.literal-block .mf { color: #40a070 } /* Literal.Number.Float */ +.literal-block .mh { color: #40a070 } /* Literal.Number.Hex */ +.literal-block .mi { color: #40a070 } /* Literal.Number.Integer */ +.literal-block .mo { color: #40a070 } /* Literal.Number.Oct */ +.literal-block .sa { color: #4070a0 } /* Literal.String.Affix */ +.literal-block .sb { color: #4070a0 } /* Literal.String.Backtick */ +.literal-block .sc { color: #4070a0 } /* Literal.String.Char */ +.literal-block .dl { color: #4070a0 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #4070a0 } /* Literal.String.Double */ +.literal-block .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.literal-block .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.literal-block .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.literal-block .sx { color: #c65d09 } /* Literal.String.Other */ +.literal-block .sr { color: #235388 } /* Literal.String.Regex */ +.literal-block .s1 { color: #4070a0 } /* Literal.String.Single */ +.literal-block .ss { color: #517918 } /* Literal.String.Symbol */ +.literal-block .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #06287e } /* Name.Function.Magic */ +.literal-block .vc { color: #bb60d5 } /* Name.Variable.Class */ +.literal-block .vg { color: #bb60d5 } /* Name.Variable.Global */ +.literal-block .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.literal-block .vm { color: #bb60d5 } /* Name.Variable.Magic */ +.literal-block .il { color: #40a070 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/friendly.min.css b/theme/pygments/friendly.min.css new file mode 100644 index 00000000..d7d70b9b --- /dev/null +++ b/theme/pygments/friendly.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#f0f0f0}.highlight .c{color:#60a0b0;font-style:italic}.highlight .err{border:1px solid red}.highlight .k{color:#007020;font-weight:700}.highlight .o{color:#666}.highlight .ch,.highlight .cm{color:#60a0b0;font-style:italic}.highlight .cp{color:#007020}.highlight .c1,.highlight .cpf{color:#60a0b0;font-style:italic}.highlight .cs{color:#60a0b0;background-color:#fff0f0}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:#c65d09}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#04d}.highlight .kc,.highlight .kd,.highlight .kn{color:#007020;font-weight:700}.highlight .kp{color:#007020}.highlight .kr{color:#007020;font-weight:700}.highlight .kt{color:#902000}.highlight .m{color:#40a070}.highlight .na,.highlight .s{color:#4070a0}.highlight .nb{color:#007020}.highlight .nc{color:#0e84b5;font-weight:700}.highlight .no{color:#60add5}.highlight .nd{color:#555;font-weight:700}.highlight .ni{color:#d55537;font-weight:700}.highlight .ne{color:#007020}.highlight .nf{color:#06287e}.highlight .nl{color:#002070;font-weight:700}.highlight .nn{color:#0e84b5;font-weight:700}.highlight .nt{color:#062873;font-weight:700}.highlight .nv{color:#bb60d5}.highlight .ow{color:#007020;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#40a070}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#4070a0}.highlight .sd{color:#4070a0;font-style:italic}.highlight .s2{color:#4070a0}.highlight .se{color:#4070a0;font-weight:700}.highlight .sh{color:#4070a0}.highlight .si{color:#70a0d0;font-style:italic}.highlight .sx{color:#c65d09}.highlight .sr{color:#235388}.highlight .s1{color:#4070a0}.highlight .ss{color:#517918}.highlight .bp{color:#007020}.highlight .fm{color:#06287e}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#bb60d5}.highlight .il{color:#40a070}.literal-block .hll{background-color:#ffc}.literal-block{background:#f0f0f0}.literal-block .c{color:#60a0b0;font-style:italic}.literal-block .err{border:1px solid red}.literal-block .k{color:#007020;font-weight:700}.literal-block .o{color:#666}.literal-block .ch,.literal-block .cm{color:#60a0b0;font-style:italic}.literal-block .cp{color:#007020}.literal-block .c1,.literal-block .cpf{color:#60a0b0;font-style:italic}.literal-block .cs{color:#60a0b0;background-color:#fff0f0}.literal-block .gd{color:#a00000}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#888}.literal-block .gp{color:#c65d09;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#007020;font-weight:700}.literal-block .kp{color:#007020}.literal-block .kr{color:#007020;font-weight:700}.literal-block .kt{color:#902000}.literal-block .m{color:#40a070}.literal-block .na,.literal-block .s{color:#4070a0}.literal-block .nb{color:#007020}.literal-block .nc{color:#0e84b5;font-weight:700}.literal-block .no{color:#60add5}.literal-block .nd{color:#555;font-weight:700}.literal-block .ni{color:#d55537;font-weight:700}.literal-block .ne{color:#007020}.literal-block .nf{color:#06287e}.literal-block .nl{color:#002070;font-weight:700}.literal-block .nn{color:#0e84b5;font-weight:700}.literal-block .nt{color:#062873;font-weight:700}.literal-block .nv{color:#bb60d5}.literal-block .ow{color:#007020;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#40a070}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#4070a0}.literal-block .sd{color:#4070a0;font-style:italic}.literal-block .s2{color:#4070a0}.literal-block .se{color:#4070a0;font-weight:700}.literal-block .sh{color:#4070a0}.literal-block .si{color:#70a0d0;font-style:italic}.literal-block .sx{color:#c65d09}.literal-block .sr{color:#235388}.literal-block .s1{color:#4070a0}.literal-block .ss{color:#517918}.literal-block .bp{color:#007020}.literal-block .fm{color:#06287e}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#bb60d5}.literal-block .il{color:#40a070} \ No newline at end of file diff --git a/theme/pygments/fruity.css b/theme/pygments/fruity.css new file mode 100644 index 00000000..41911d5e --- /dev/null +++ b/theme/pygments/fruity.css @@ -0,0 +1,156 @@ +.highlight .hll { background-color: #333333 } +.highlight { background: #111111; color: #ffffff } +.highlight .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */ +.highlight .err { color: #ffffff } /* Error */ +.highlight .esc { color: #ffffff } /* Escape */ +.highlight .g { color: #ffffff } /* Generic */ +.highlight .k { color: #fb660a; font-weight: bold } /* Keyword */ +.highlight .l { color: #ffffff } /* Literal */ +.highlight .n { color: #ffffff } /* Name */ +.highlight .o { color: #ffffff } /* Operator */ +.highlight .x { color: #ffffff } /* Other */ +.highlight .p { color: #ffffff } /* Punctuation */ +.highlight .ch { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */ +.highlight .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */ +.highlight .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */ +.highlight .gd { color: #ffffff } /* Generic.Deleted */ +.highlight .ge { color: #ffffff } /* Generic.Emph */ +.highlight .gr { color: #ffffff } /* Generic.Error */ +.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #ffffff } /* Generic.Inserted */ +.highlight .go { color: #444444; background-color: #222222 } /* Generic.Output */ +.highlight .gp { color: #ffffff } /* Generic.Prompt */ +.highlight .gs { color: #ffffff } /* Generic.Strong */ +.highlight .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #ffffff } /* Generic.Traceback */ +.highlight .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #fb660a; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #fb660a } /* Keyword.Pseudo */ +.highlight .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #ffffff } /* Literal.Date */ +.highlight .m { color: #0086f7; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #0086d2 } /* Literal.String */ +.highlight .na { color: #ff0086; font-weight: bold } /* Name.Attribute */ +.highlight .nb { color: #ffffff } /* Name.Builtin */ +.highlight .nc { color: #ffffff } /* Name.Class */ +.highlight .no { color: #0086d2 } /* Name.Constant */ +.highlight .nd { color: #ffffff } /* Name.Decorator */ +.highlight .ni { color: #ffffff } /* Name.Entity */ +.highlight .ne { color: #ffffff } /* Name.Exception */ +.highlight .nf { color: #ff0086; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #ffffff } /* Name.Label */ +.highlight .nn { color: #ffffff } /* Name.Namespace */ +.highlight .nx { color: #ffffff } /* Name.Other */ +.highlight .py { color: #ffffff } /* Name.Property */ +.highlight .nt { color: #fb660a; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #fb660a } /* Name.Variable */ +.highlight .ow { color: #ffffff } /* Operator.Word */ +.highlight .w { color: #888888 } /* Text.Whitespace */ +.highlight .mb { color: #0086f7; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #0086d2 } /* Literal.String.Affix */ +.highlight .sb { color: #0086d2 } /* Literal.String.Backtick */ +.highlight .sc { color: #0086d2 } /* Literal.String.Char */ +.highlight .dl { color: #0086d2 } /* Literal.String.Delimiter */ +.highlight .sd { color: #0086d2 } /* Literal.String.Doc */ +.highlight .s2 { color: #0086d2 } /* Literal.String.Double */ +.highlight .se { color: #0086d2 } /* Literal.String.Escape */ +.highlight .sh { color: #0086d2 } /* Literal.String.Heredoc */ +.highlight .si { color: #0086d2 } /* Literal.String.Interpol */ +.highlight .sx { color: #0086d2 } /* Literal.String.Other */ +.highlight .sr { color: #0086d2 } /* Literal.String.Regex */ +.highlight .s1 { color: #0086d2 } /* Literal.String.Single */ +.highlight .ss { color: #0086d2 } /* Literal.String.Symbol */ +.highlight .bp { color: #ffffff } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #ff0086; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #fb660a } /* Name.Variable.Class */ +.highlight .vg { color: #fb660a } /* Name.Variable.Global */ +.highlight .vi { color: #fb660a } /* Name.Variable.Instance */ +.highlight .vm { color: #fb660a } /* Name.Variable.Magic */ +.highlight .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #333333 } +.literal-block { background: #111111; color: #ffffff } +.literal-block .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */ +.literal-block .err { color: #ffffff } /* Error */ +.literal-block .esc { color: #ffffff } /* Escape */ +.literal-block .g { color: #ffffff } /* Generic */ +.literal-block .k { color: #fb660a; font-weight: bold } /* Keyword */ +.literal-block .l { color: #ffffff } /* Literal */ +.literal-block .n { color: #ffffff } /* Name */ +.literal-block .o { color: #ffffff } /* Operator */ +.literal-block .x { color: #ffffff } /* Other */ +.literal-block .p { color: #ffffff } /* Punctuation */ +.literal-block .ch { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Hashbang */ +.literal-block .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */ +.literal-block .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */ +.literal-block .cpf { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */ +.literal-block .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */ +.literal-block .gd { color: #ffffff } /* Generic.Deleted */ +.literal-block .ge { color: #ffffff } /* Generic.Emph */ +.literal-block .gr { color: #ffffff } /* Generic.Error */ +.literal-block .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #ffffff } /* Generic.Inserted */ +.literal-block .go { color: #444444; background-color: #222222 } /* Generic.Output */ +.literal-block .gp { color: #ffffff } /* Generic.Prompt */ +.literal-block .gs { color: #ffffff } /* Generic.Strong */ +.literal-block .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #ffffff } /* Generic.Traceback */ +.literal-block .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #fb660a; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #fb660a } /* Keyword.Pseudo */ +.literal-block .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */ +.literal-block .ld { color: #ffffff } /* Literal.Date */ +.literal-block .m { color: #0086f7; font-weight: bold } /* Literal.Number */ +.literal-block .s { color: #0086d2 } /* Literal.String */ +.literal-block .na { color: #ff0086; font-weight: bold } /* Name.Attribute */ +.literal-block .nb { color: #ffffff } /* Name.Builtin */ +.literal-block .nc { color: #ffffff } /* Name.Class */ +.literal-block .no { color: #0086d2 } /* Name.Constant */ +.literal-block .nd { color: #ffffff } /* Name.Decorator */ +.literal-block .ni { color: #ffffff } /* Name.Entity */ +.literal-block .ne { color: #ffffff } /* Name.Exception */ +.literal-block .nf { color: #ff0086; font-weight: bold } /* Name.Function */ +.literal-block .nl { color: #ffffff } /* Name.Label */ +.literal-block .nn { color: #ffffff } /* Name.Namespace */ +.literal-block .nx { color: #ffffff } /* Name.Other */ +.literal-block .py { color: #ffffff } /* Name.Property */ +.literal-block .nt { color: #fb660a; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #fb660a } /* Name.Variable */ +.literal-block .ow { color: #ffffff } /* Operator.Word */ +.literal-block .w { color: #888888 } /* Text.Whitespace */ +.literal-block .mb { color: #0086f7; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { color: #0086d2 } /* Literal.String.Affix */ +.literal-block .sb { color: #0086d2 } /* Literal.String.Backtick */ +.literal-block .sc { color: #0086d2 } /* Literal.String.Char */ +.literal-block .dl { color: #0086d2 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #0086d2 } /* Literal.String.Doc */ +.literal-block .s2 { color: #0086d2 } /* Literal.String.Double */ +.literal-block .se { color: #0086d2 } /* Literal.String.Escape */ +.literal-block .sh { color: #0086d2 } /* Literal.String.Heredoc */ +.literal-block .si { color: #0086d2 } /* Literal.String.Interpol */ +.literal-block .sx { color: #0086d2 } /* Literal.String.Other */ +.literal-block .sr { color: #0086d2 } /* Literal.String.Regex */ +.literal-block .s1 { color: #0086d2 } /* Literal.String.Single */ +.literal-block .ss { color: #0086d2 } /* Literal.String.Symbol */ +.literal-block .bp { color: #ffffff } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #ff0086; font-weight: bold } /* Name.Function.Magic */ +.literal-block .vc { color: #fb660a } /* Name.Variable.Class */ +.literal-block .vg { color: #fb660a } /* Name.Variable.Global */ +.literal-block .vi { color: #fb660a } /* Name.Variable.Instance */ +.literal-block .vm { color: #fb660a } /* Name.Variable.Magic */ +.literal-block .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/fruity.min.css b/theme/pygments/fruity.min.css new file mode 100644 index 00000000..4076a52d --- /dev/null +++ b/theme/pygments/fruity.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#333}.highlight{background:#111;color:#fff}.highlight .c{color:#080;font-style:italic;background-color:#0f140f}.highlight .err,.highlight .esc,.highlight .g{color:#fff}.highlight .k{color:#fb660a;font-weight:700}.highlight .l,.highlight .n,.highlight .o,.highlight .p,.highlight .x{color:#fff}.highlight .ch,.highlight .cm{color:#080;font-style:italic;background-color:#0f140f}.highlight .cp{color:#ff0007;font-weight:700;font-style:italic;background-color:#0f140f}.highlight .c1,.highlight .cpf,.highlight .cs{color:#080;font-style:italic;background-color:#0f140f}.highlight .gd,.highlight .ge,.highlight .gr{color:#fff}.highlight .gh{color:#fff;font-weight:700}.highlight .gi{color:#fff}.highlight .go{color:#444;background-color:#222}.highlight .gp,.highlight .gs{color:#fff}.highlight .gu{color:#fff;font-weight:700}.highlight .gt{color:#fff}.highlight .kc,.highlight .kd,.highlight .kn{color:#fb660a;font-weight:700}.highlight .kp{color:#fb660a}.highlight .kr{color:#fb660a;font-weight:700}.highlight .kt{color:#cdcaa9;font-weight:700}.highlight .ld{color:#fff}.highlight .m{color:#0086f7;font-weight:700}.highlight .s{color:#0086d2}.highlight .na{color:#ff0086;font-weight:700}.highlight .nb,.highlight .nc{color:#fff}.highlight .no{color:#0086d2}.highlight .nd,.highlight .ne,.highlight .ni{color:#fff}.highlight .nf{color:#ff0086;font-weight:700}.highlight .nl,.highlight .nn,.highlight .nx,.highlight .py{color:#fff}.highlight .nt{color:#fb660a;font-weight:700}.highlight .nv{color:#fb660a}.highlight .ow{color:#fff}.highlight .w{color:#888}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#0086f7;font-weight:700}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#0086d2}.highlight .bp{color:#fff}.highlight .fm{color:#ff0086;font-weight:700}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#fb660a}.highlight .il{color:#0086f7;font-weight:700}.literal-block .hll{background-color:#333}.literal-block{background:#111;color:#fff}.literal-block .c{color:#080;font-style:italic;background-color:#0f140f}.literal-block .err,.literal-block .esc,.literal-block .g{color:#fff}.literal-block .k{color:#fb660a;font-weight:700}.literal-block .l,.literal-block .n,.literal-block .o,.literal-block .p,.literal-block .x{color:#fff}.literal-block .ch,.literal-block .cm{color:#080;font-style:italic;background-color:#0f140f}.literal-block .cp{color:#ff0007;font-weight:700;font-style:italic;background-color:#0f140f}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#080;font-style:italic;background-color:#0f140f}.literal-block .gd,.literal-block .ge,.literal-block .gr{color:#fff}.literal-block .gh{color:#fff;font-weight:700}.literal-block .gi{color:#fff}.literal-block .go{color:#444;background-color:#222}.literal-block .gp,.literal-block .gs{color:#fff}.literal-block .gu{color:#fff;font-weight:700}.literal-block .gt{color:#fff}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#fb660a;font-weight:700}.literal-block .kp{color:#fb660a}.literal-block .kr{color:#fb660a;font-weight:700}.literal-block .kt{color:#cdcaa9;font-weight:700}.literal-block .ld{color:#fff}.literal-block .m{color:#0086f7;font-weight:700}.literal-block .s{color:#0086d2}.literal-block .na{color:#ff0086;font-weight:700}.literal-block .nb,.literal-block .nc{color:#fff}.literal-block .no{color:#0086d2}.literal-block .nd,.literal-block .ne,.literal-block .ni{color:#fff}.literal-block .nf{color:#ff0086;font-weight:700}.literal-block .nl,.literal-block .nn,.literal-block .nx,.literal-block .py{color:#fff}.literal-block .nt{color:#fb660a;font-weight:700}.literal-block .nv{color:#fb660a}.literal-block .ow{color:#fff}.literal-block .w{color:#888}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#0086f7;font-weight:700}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#0086d2}.literal-block .bp{color:#fff}.literal-block .fm{color:#ff0086;font-weight:700}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#fb660a}.literal-block .il{color:#0086f7;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/github.css b/theme/pygments/github.css new file mode 100644 index 00000000..742468c5 --- /dev/null +++ b/theme/pygments/github.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #000000; font-weight: bold } /* Keyword */ +.highlight .o { color: #000000; font-weight: bold } /* Operator */ +.highlight .ch { color: #999988; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #999988; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #dd1144 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #009999 } /* Literal.Number.Bin */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sa { color: #dd1144 } /* Literal.String.Affix */ +.highlight .sb { color: #dd1144 } /* Literal.String.Backtick */ +.highlight .sc { color: #dd1144 } /* Literal.String.Char */ +.highlight .dl { color: #dd1144 } /* Literal.String.Delimiter */ +.highlight .sd { color: #dd1144 } /* Literal.String.Doc */ +.highlight .s2 { color: #dd1144 } /* Literal.String.Double */ +.highlight .se { color: #dd1144 } /* Literal.String.Escape */ +.highlight .sh { color: #dd1144 } /* Literal.String.Heredoc */ +.highlight .si { color: #dd1144 } /* Literal.String.Interpol */ +.highlight .sx { color: #dd1144 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #dd1144 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #990000; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .vm { color: #008080 } /* Name.Variable.Magic */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #999988; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #000000; font-weight: bold } /* Keyword */ +.literal-block .o { color: #000000; font-weight: bold } /* Operator */ +.literal-block .ch { color: #999988; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #999988; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.literal-block .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #aa0000 } /* Generic.Error */ +.literal-block .gh { color: #999999 } /* Generic.Heading */ +.literal-block .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #555555 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #aaaaaa } /* Generic.Subheading */ +.literal-block .gt { color: #aa0000 } /* Generic.Traceback */ +.literal-block .kc { color: #000000; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #009999 } /* Literal.Number */ +.literal-block .s { color: #dd1144 } /* Literal.String */ +.literal-block .na { color: #008080 } /* Name.Attribute */ +.literal-block .nb { color: #0086B3 } /* Name.Builtin */ +.literal-block .nc { color: #445588; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #008080 } /* Name.Constant */ +.literal-block .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ +.literal-block .ni { color: #800080 } /* Name.Entity */ +.literal-block .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #990000; font-weight: bold } /* Name.Function */ +.literal-block .nl { color: #990000; font-weight: bold } /* Name.Label */ +.literal-block .nn { color: #555555 } /* Name.Namespace */ +.literal-block .nt { color: #000080 } /* Name.Tag */ +.literal-block .nv { color: #008080 } /* Name.Variable */ +.literal-block .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #009999 } /* Literal.Number.Bin */ +.literal-block .mf { color: #009999 } /* Literal.Number.Float */ +.literal-block .mh { color: #009999 } /* Literal.Number.Hex */ +.literal-block .mi { color: #009999 } /* Literal.Number.Integer */ +.literal-block .mo { color: #009999 } /* Literal.Number.Oct */ +.literal-block .sa { color: #dd1144 } /* Literal.String.Affix */ +.literal-block .sb { color: #dd1144 } /* Literal.String.Backtick */ +.literal-block .sc { color: #dd1144 } /* Literal.String.Char */ +.literal-block .dl { color: #dd1144 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #dd1144 } /* Literal.String.Doc */ +.literal-block .s2 { color: #dd1144 } /* Literal.String.Double */ +.literal-block .se { color: #dd1144 } /* Literal.String.Escape */ +.literal-block .sh { color: #dd1144 } /* Literal.String.Heredoc */ +.literal-block .si { color: #dd1144 } /* Literal.String.Interpol */ +.literal-block .sx { color: #dd1144 } /* Literal.String.Other */ +.literal-block .sr { color: #009926 } /* Literal.String.Regex */ +.literal-block .s1 { color: #dd1144 } /* Literal.String.Single */ +.literal-block .ss { color: #990073 } /* Literal.String.Symbol */ +.literal-block .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #990000; font-weight: bold } /* Name.Function.Magic */ +.literal-block .vc { color: #008080 } /* Name.Variable.Class */ +.literal-block .vg { color: #008080 } /* Name.Variable.Global */ +.literal-block .vi { color: #008080 } /* Name.Variable.Instance */ +.literal-block .vm { color: #008080 } /* Name.Variable.Magic */ +.literal-block .il { color: #009999 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/github.min.css b/theme/pygments/github.min.css new file mode 100644 index 00000000..72fe0f2c --- /dev/null +++ b/theme/pygments/github.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#998;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k,.highlight .o{color:#000;font-weight:700}.highlight .ch,.highlight .cm{color:#998;font-style:italic}.highlight .cp{color:#999;font-weight:700;font-style:italic}.highlight .c1,.highlight .cpf{color:#998;font-style:italic}.highlight .cs{color:#999;font-weight:700;font-style:italic}.highlight .gd{color:#000;background-color:#fdd}.highlight .ge{color:#000;font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:700}.highlight .gu{color:#aaa}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{color:#000;font-weight:700}.highlight .kt{color:#458;font-weight:700}.highlight .m{color:#099}.highlight .s{color:#d14}.highlight .na{color:teal}.highlight .nb{color:#0086b3}.highlight .nc{color:#458;font-weight:700}.highlight .no{color:teal}.highlight .nd{color:#3c5d5d;font-weight:700}.highlight .ni{color:purple}.highlight .ne,.highlight .nf,.highlight .nl{color:#900;font-weight:700}.highlight .nn{color:#555}.highlight .nt{color:navy}.highlight .nv{color:teal}.highlight .ow{color:#000;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#099}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999}.highlight .fm{color:#900;font-weight:700}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:teal}.highlight .il{color:#099}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#998;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k,.literal-block .o{color:#000;font-weight:700}.literal-block .ch,.literal-block .cm{color:#998;font-style:italic}.literal-block .cp{color:#999;font-weight:700;font-style:italic}.literal-block .c1,.literal-block .cpf{color:#998;font-style:italic}.literal-block .cs{color:#999;font-weight:700;font-style:italic}.literal-block .gd{color:#000;background-color:#fdd}.literal-block .ge{color:#000;font-style:italic}.literal-block .gr{color:#a00}.literal-block .gh{color:#999}.literal-block .gi{color:#000;background-color:#dfd}.literal-block .go{color:#888}.literal-block .gp{color:#555}.literal-block .gs{font-weight:700}.literal-block .gu{color:#aaa}.literal-block .gt{color:#a00}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{color:#000;font-weight:700}.literal-block .kt{color:#458;font-weight:700}.literal-block .m{color:#099}.literal-block .s{color:#d14}.literal-block .na{color:teal}.literal-block .nb{color:#0086b3}.literal-block .nc{color:#458;font-weight:700}.literal-block .no{color:teal}.literal-block .nd{color:#3c5d5d;font-weight:700}.literal-block .ni{color:purple}.literal-block .ne,.literal-block .nf,.literal-block .nl{color:#900;font-weight:700}.literal-block .nn{color:#555}.literal-block .nt{color:navy}.literal-block .nv{color:teal}.literal-block .ow{color:#000;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#099}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sx{color:#d14}.literal-block .sr{color:#009926}.literal-block .s1{color:#d14}.literal-block .ss{color:#990073}.literal-block .bp{color:#999}.literal-block .fm{color:#900;font-weight:700}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:teal}.literal-block .il{color:#099} \ No newline at end of file diff --git a/theme/pygments/igor.css b/theme/pygments/igor.css new file mode 100644 index 00000000..12a5315e --- /dev/null +++ b/theme/pygments/igor.css @@ -0,0 +1,68 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #FF0000; font-style: italic } /* Comment */ +.highlight .k { color: #0000FF } /* Keyword */ +.highlight .ch { color: #FF0000; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #FF0000; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #FF0000; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #FF0000; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #FF0000; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #FF0000; font-style: italic } /* Comment.Special */ +.highlight .kc { color: #0000FF } /* Keyword.Constant */ +.highlight .kd { color: #0000FF } /* Keyword.Declaration */ +.highlight .kn { color: #0000FF } /* Keyword.Namespace */ +.highlight .kp { color: #0000FF } /* Keyword.Pseudo */ +.highlight .kr { color: #0000FF } /* Keyword.Reserved */ +.highlight .kt { color: #0000FF } /* Keyword.Type */ +.highlight .s { color: #009C00 } /* Literal.String */ +.highlight .nc { color: #007575 } /* Name.Class */ +.highlight .nd { color: #CC00A3 } /* Name.Decorator */ +.highlight .nf { color: #C34E00 } /* Name.Function */ +.highlight .sa { color: #009C00 } /* Literal.String.Affix */ +.highlight .sb { color: #009C00 } /* Literal.String.Backtick */ +.highlight .sc { color: #009C00 } /* Literal.String.Char */ +.highlight .dl { color: #009C00 } /* Literal.String.Delimiter */ +.highlight .sd { color: #009C00 } /* Literal.String.Doc */ +.highlight .s2 { color: #009C00 } /* Literal.String.Double */ +.highlight .se { color: #009C00 } /* Literal.String.Escape */ +.highlight .sh { color: #009C00 } /* Literal.String.Heredoc */ +.highlight .si { color: #009C00 } /* Literal.String.Interpol */ +.highlight .sx { color: #009C00 } /* Literal.String.Other */ +.highlight .sr { color: #009C00 } /* Literal.String.Regex */ +.highlight .s1 { color: #009C00 } /* Literal.String.Single */ +.highlight .ss { color: #009C00 } /* Literal.String.Symbol */ +.highlight .fm { color: #C34E00 } /* Name.Function.Magic */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #FF0000; font-style: italic } /* Comment */ +.literal-block .k { color: #0000FF } /* Keyword */ +.literal-block .ch { color: #FF0000; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #FF0000; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #FF0000; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #FF0000; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #FF0000; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #FF0000; font-style: italic } /* Comment.Special */ +.literal-block .kc { color: #0000FF } /* Keyword.Constant */ +.literal-block .kd { color: #0000FF } /* Keyword.Declaration */ +.literal-block .kn { color: #0000FF } /* Keyword.Namespace */ +.literal-block .kp { color: #0000FF } /* Keyword.Pseudo */ +.literal-block .kr { color: #0000FF } /* Keyword.Reserved */ +.literal-block .kt { color: #0000FF } /* Keyword.Type */ +.literal-block .s { color: #009C00 } /* Literal.String */ +.literal-block .nc { color: #007575 } /* Name.Class */ +.literal-block .nd { color: #CC00A3 } /* Name.Decorator */ +.literal-block .nf { color: #C34E00 } /* Name.Function */ +.literal-block .sa { color: #009C00 } /* Literal.String.Affix */ +.literal-block .sb { color: #009C00 } /* Literal.String.Backtick */ +.literal-block .sc { color: #009C00 } /* Literal.String.Char */ +.literal-block .dl { color: #009C00 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #009C00 } /* Literal.String.Doc */ +.literal-block .s2 { color: #009C00 } /* Literal.String.Double */ +.literal-block .se { color: #009C00 } /* Literal.String.Escape */ +.literal-block .sh { color: #009C00 } /* Literal.String.Heredoc */ +.literal-block .si { color: #009C00 } /* Literal.String.Interpol */ +.literal-block .sx { color: #009C00 } /* Literal.String.Other */ +.literal-block .sr { color: #009C00 } /* Literal.String.Regex */ +.literal-block .s1 { color: #009C00 } /* Literal.String.Single */ +.literal-block .ss { color: #009C00 } /* Literal.String.Symbol */ +.literal-block .fm { color: #C34E00 } /* Name.Function.Magic */ \ No newline at end of file diff --git a/theme/pygments/igor.min.css b/theme/pygments/igor.min.css new file mode 100644 index 00000000..a24b2bc5 --- /dev/null +++ b/theme/pygments/igor.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:red;font-style:italic}.highlight .k{color:#00f}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:red;font-style:italic}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#00f}.highlight .s{color:#009c00}.highlight .nc{color:#007575}.highlight .nd{color:#cc00a3}.highlight .nf{color:#c34e00}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#009c00}.highlight .fm{color:#c34e00}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:red;font-style:italic}.literal-block .k{color:#00f}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:red;font-style:italic}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#00f}.literal-block .s{color:#009c00}.literal-block .nc{color:#007575}.literal-block .nd{color:#cc00a3}.literal-block .nf{color:#c34e00}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#009c00}.literal-block .fm{color:#c34e00} \ No newline at end of file diff --git a/theme/pygments/inkpot.css b/theme/pygments/inkpot.css new file mode 100644 index 00000000..456e09b1 --- /dev/null +++ b/theme/pygments/inkpot.css @@ -0,0 +1,148 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #1e1e27; color: #cfbfad } +.highlight .c { color: #cd8b00 } /* Comment */ +.highlight .err { color: #ffffff; background-color: #6e2e2e } /* Error */ +.highlight .k { color: #808bed } /* Keyword */ +.highlight .n { color: #cfbfad } /* Name */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .x { color: #cfbfad } /* Other */ +.highlight .p { color: #cfbfad } /* Punctuation */ +.highlight .ch { color: #cd8b00 } /* Comment.Hashbang */ +.highlight .cm { color: #cd8b00 } /* Comment.Multiline */ +.highlight .cp { color: #409090 } /* Comment.Preproc */ +.highlight .cpf { color: #ffcd8b; background-color: #404040 } /* Comment.PreprocFile */ +.highlight .c1 { color: #cd8b00 } /* Comment.Single */ +.highlight .cs { color: #808bed } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #808bed } /* Keyword.Constant */ +.highlight .kd { color: #808bed } /* Keyword.Declaration */ +.highlight .kn { color: #808bed } /* Keyword.Namespace */ +.highlight .kp { color: #808bed } /* Keyword.Pseudo */ +.highlight .kr { color: #808bed } /* Keyword.Reserved */ +.highlight .kt { color: #ff8bff } /* Keyword.Type */ +.highlight .m { color: #f0ad6d } /* Literal.Number */ +.highlight .s { color: #ffcd8b; background-color: #404040 } /* Literal.String */ +.highlight .na { color: #cfbfad } /* Name.Attribute */ +.highlight .nb { color: #808bed } /* Name.Builtin */ +.highlight .nc { color: #ff8bff } /* Name.Class */ +.highlight .no { color: #409090 } /* Name.Constant */ +.highlight .nd { color: #409090 } /* Name.Decorator */ +.highlight .ni { color: #cfbfad } /* Name.Entity */ +.highlight .ne { color: #ff0000 } /* Name.Exception */ +.highlight .nf { color: #c080d0 } /* Name.Function */ +.highlight .nl { color: #808bed } /* Name.Label */ +.highlight .nn { color: #ff0000 } /* Name.Namespace */ +.highlight .nx { color: #cfbfad } /* Name.Other */ +.highlight .py { color: #cfbfad } /* Name.Property */ +.highlight .nt { color: #cfbfad } /* Name.Tag */ +.highlight .nv { color: #cfbfad } /* Name.Variable */ +.highlight .ow { color: #666666 } /* Operator.Word */ +.highlight .w { color: #434357 } /* Text.Whitespace */ +.highlight .mb { color: #f0ad6d } /* Literal.Number.Bin */ +.highlight .mf { color: #f0ad6d } /* Literal.Number.Float */ +.highlight .mh { color: #f0ad6d } /* Literal.Number.Hex */ +.highlight .mi { color: #f0ad6d } /* Literal.Number.Integer */ +.highlight .mo { color: #f0ad6d } /* Literal.Number.Oct */ +.highlight .sa { color: #ffcd8b; background-color: #404040 } /* Literal.String.Affix */ +.highlight .sb { color: #ffcd8b; background-color: #404040 } /* Literal.String.Backtick */ +.highlight .sc { color: #ffcd8b; background-color: #404040 } /* Literal.String.Char */ +.highlight .dl { color: #ffcd8b; background-color: #404040 } /* Literal.String.Delimiter */ +.highlight .sd { color: #808bed; background-color: #404040 } /* Literal.String.Doc */ +.highlight .s2 { color: #ffcd8b; background-color: #404040 } /* Literal.String.Double */ +.highlight .se { color: #ffcd8b; background-color: #404040 } /* Literal.String.Escape */ +.highlight .sh { color: #ffcd8b; background-color: #404040 } /* Literal.String.Heredoc */ +.highlight .si { color: #ffcd8b; background-color: #404040 } /* Literal.String.Interpol */ +.highlight .sx { color: #ffcd8b; background-color: #404040 } /* Literal.String.Other */ +.highlight .sr { color: #ffcd8b; background-color: #404040 } /* Literal.String.Regex */ +.highlight .s1 { color: #ffcd8b; background-color: #404040 } /* Literal.String.Single */ +.highlight .ss { color: #ffcd8b; background-color: #404040 } /* Literal.String.Symbol */ +.highlight .bp { color: #ffff00 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #c080d0 } /* Name.Function.Magic */ +.highlight .vc { color: #cfbfad } /* Name.Variable.Class */ +.highlight .vg { color: #cfbfad } /* Name.Variable.Global */ +.highlight .vi { color: #cfbfad } /* Name.Variable.Instance */ +.highlight .vm { color: #cfbfad } /* Name.Variable.Magic */ +.highlight .il { color: #f0ad6d } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #1e1e27; color: #cfbfad } +.literal-block .c { color: #cd8b00 } /* Comment */ +.literal-block .err { color: #ffffff; background-color: #6e2e2e } /* Error */ +.literal-block .k { color: #808bed } /* Keyword */ +.literal-block .n { color: #cfbfad } /* Name */ +.literal-block .o { color: #666666 } /* Operator */ +.literal-block .x { color: #cfbfad } /* Other */ +.literal-block .p { color: #cfbfad } /* Punctuation */ +.literal-block .ch { color: #cd8b00 } /* Comment.Hashbang */ +.literal-block .cm { color: #cd8b00 } /* Comment.Multiline */ +.literal-block .cp { color: #409090 } /* Comment.Preproc */ +.literal-block .cpf { color: #ffcd8b; background-color: #404040 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #cd8b00 } /* Comment.Single */ +.literal-block .cs { color: #808bed } /* Comment.Special */ +.literal-block .gd { color: #A00000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #808bed } /* Keyword.Constant */ +.literal-block .kd { color: #808bed } /* Keyword.Declaration */ +.literal-block .kn { color: #808bed } /* Keyword.Namespace */ +.literal-block .kp { color: #808bed } /* Keyword.Pseudo */ +.literal-block .kr { color: #808bed } /* Keyword.Reserved */ +.literal-block .kt { color: #ff8bff } /* Keyword.Type */ +.literal-block .m { color: #f0ad6d } /* Literal.Number */ +.literal-block .s { color: #ffcd8b; background-color: #404040 } /* Literal.String */ +.literal-block .na { color: #cfbfad } /* Name.Attribute */ +.literal-block .nb { color: #808bed } /* Name.Builtin */ +.literal-block .nc { color: #ff8bff } /* Name.Class */ +.literal-block .no { color: #409090 } /* Name.Constant */ +.literal-block .nd { color: #409090 } /* Name.Decorator */ +.literal-block .ni { color: #cfbfad } /* Name.Entity */ +.literal-block .ne { color: #ff0000 } /* Name.Exception */ +.literal-block .nf { color: #c080d0 } /* Name.Function */ +.literal-block .nl { color: #808bed } /* Name.Label */ +.literal-block .nn { color: #ff0000 } /* Name.Namespace */ +.literal-block .nx { color: #cfbfad } /* Name.Other */ +.literal-block .py { color: #cfbfad } /* Name.Property */ +.literal-block .nt { color: #cfbfad } /* Name.Tag */ +.literal-block .nv { color: #cfbfad } /* Name.Variable */ +.literal-block .ow { color: #666666 } /* Operator.Word */ +.literal-block .w { color: #434357 } /* Text.Whitespace */ +.literal-block .mb { color: #f0ad6d } /* Literal.Number.Bin */ +.literal-block .mf { color: #f0ad6d } /* Literal.Number.Float */ +.literal-block .mh { color: #f0ad6d } /* Literal.Number.Hex */ +.literal-block .mi { color: #f0ad6d } /* Literal.Number.Integer */ +.literal-block .mo { color: #f0ad6d } /* Literal.Number.Oct */ +.literal-block .sa { color: #ffcd8b; background-color: #404040 } /* Literal.String.Affix */ +.literal-block .sb { color: #ffcd8b; background-color: #404040 } /* Literal.String.Backtick */ +.literal-block .sc { color: #ffcd8b; background-color: #404040 } /* Literal.String.Char */ +.literal-block .dl { color: #ffcd8b; background-color: #404040 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #808bed; background-color: #404040 } /* Literal.String.Doc */ +.literal-block .s2 { color: #ffcd8b; background-color: #404040 } /* Literal.String.Double */ +.literal-block .se { color: #ffcd8b; background-color: #404040 } /* Literal.String.Escape */ +.literal-block .sh { color: #ffcd8b; background-color: #404040 } /* Literal.String.Heredoc */ +.literal-block .si { color: #ffcd8b; background-color: #404040 } /* Literal.String.Interpol */ +.literal-block .sx { color: #ffcd8b; background-color: #404040 } /* Literal.String.Other */ +.literal-block .sr { color: #ffcd8b; background-color: #404040 } /* Literal.String.Regex */ +.literal-block .s1 { color: #ffcd8b; background-color: #404040 } /* Literal.String.Single */ +.literal-block .ss { color: #ffcd8b; background-color: #404040 } /* Literal.String.Symbol */ +.literal-block .bp { color: #ffff00 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #c080d0 } /* Name.Function.Magic */ +.literal-block .vc { color: #cfbfad } /* Name.Variable.Class */ +.literal-block .vg { color: #cfbfad } /* Name.Variable.Global */ +.literal-block .vi { color: #cfbfad } /* Name.Variable.Instance */ +.literal-block .vm { color: #cfbfad } /* Name.Variable.Magic */ +.literal-block .il { color: #f0ad6d } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/inkpot.min.css b/theme/pygments/inkpot.min.css new file mode 100644 index 00000000..55b22385 --- /dev/null +++ b/theme/pygments/inkpot.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#1e1e27;color:#cfbfad}.highlight .c{color:#cd8b00}.highlight .err{color:#fff;background-color:#6e2e2e}.highlight .k{color:#808bed}.highlight .n{color:#cfbfad}.highlight .o{color:#666}.highlight .p,.highlight .x{color:#cfbfad}.highlight .ch,.highlight .cm{color:#cd8b00}.highlight .cp{color:#409090}.highlight .cpf{color:#ffcd8b;background-color:#404040}.highlight .c1{color:#cd8b00}.highlight .cs{color:#808bed}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#04d}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{color:#808bed}.highlight .kt{color:#ff8bff}.highlight .m{color:#f0ad6d}.highlight .s{color:#ffcd8b;background-color:#404040}.highlight .na{color:#cfbfad}.highlight .nb{color:#808bed}.highlight .nc{color:#ff8bff}.highlight .nd,.highlight .no{color:#409090}.highlight .ni{color:#cfbfad}.highlight .ne{color:red}.highlight .nf{color:#c080d0}.highlight .nl{color:#808bed}.highlight .nn{color:red}.highlight .nt,.highlight .nv,.highlight .nx,.highlight .py{color:#cfbfad}.highlight .ow{color:#666}.highlight .w{color:#434357}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#f0ad6d}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#ffcd8b;background-color:#404040}.highlight .sd{color:#808bed;background-color:#404040}.highlight .s1,.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#ffcd8b;background-color:#404040}.highlight .bp{color:#ff0}.highlight .fm{color:#c080d0}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#cfbfad}.highlight .il{color:#f0ad6d}.literal-block .hll{background-color:#ffc}.literal-block{background:#1e1e27;color:#cfbfad}.literal-block .c{color:#cd8b00}.literal-block .err{color:#fff;background-color:#6e2e2e}.literal-block .k{color:#808bed}.literal-block .n{color:#cfbfad}.literal-block .o{color:#666}.literal-block .p,.literal-block .x{color:#cfbfad}.literal-block .ch,.literal-block .cm{color:#cd8b00}.literal-block .cp{color:#409090}.literal-block .cpf{color:#ffcd8b;background-color:#404040}.literal-block .c1{color:#cd8b00}.literal-block .cs{color:#808bed}.literal-block .gd{color:#a00000}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#888}.literal-block .gp{color:navy;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{color:#808bed}.literal-block .kt{color:#ff8bff}.literal-block .m{color:#f0ad6d}.literal-block .s{color:#ffcd8b;background-color:#404040}.literal-block .na{color:#cfbfad}.literal-block .nb{color:#808bed}.literal-block .nc{color:#ff8bff}.literal-block .nd,.literal-block .no{color:#409090}.literal-block .ni{color:#cfbfad}.literal-block .ne{color:red}.literal-block .nf{color:#c080d0}.literal-block .nl{color:#808bed}.literal-block .nn{color:red}.literal-block .nt,.literal-block .nv,.literal-block .nx,.literal-block .py{color:#cfbfad}.literal-block .ow{color:#666}.literal-block .w{color:#434357}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#f0ad6d}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#ffcd8b;background-color:#404040}.literal-block .sd{color:#808bed;background-color:#404040}.literal-block .s1,.literal-block .s2,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#ffcd8b;background-color:#404040}.literal-block .bp{color:#ff0}.literal-block .fm{color:#c080d0}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#cfbfad}.literal-block .il{color:#f0ad6d} \ No newline at end of file diff --git a/theme/pygments/lovelace.css b/theme/pygments/lovelace.css new file mode 100644 index 00000000..73eb7e8a --- /dev/null +++ b/theme/pygments/lovelace.css @@ -0,0 +1,140 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888; font-style: italic } /* Comment */ +.highlight .err { background-color: #a848a8 } /* Error */ +.highlight .k { color: #2838b0 } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .p { color: #888888 } /* Punctuation */ +.highlight .ch { color: #287088; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #289870 } /* Comment.Preproc */ +.highlight .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #888888; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #c02828 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #c02828 } /* Generic.Error */ +.highlight .gh { color: #666666 } /* Generic.Heading */ +.highlight .gi { color: #388038 } /* Generic.Inserted */ +.highlight .go { color: #666666 } /* Generic.Output */ +.highlight .gp { color: #444444 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #444444 } /* Generic.Subheading */ +.highlight .gt { color: #2838b0 } /* Generic.Traceback */ +.highlight .kc { color: #444444; font-style: italic } /* Keyword.Constant */ +.highlight .kd { color: #2838b0; font-style: italic } /* Keyword.Declaration */ +.highlight .kn { color: #2838b0 } /* Keyword.Namespace */ +.highlight .kp { color: #2838b0 } /* Keyword.Pseudo */ +.highlight .kr { color: #2838b0 } /* Keyword.Reserved */ +.highlight .kt { color: #2838b0; font-style: italic } /* Keyword.Type */ +.highlight .m { color: #444444 } /* Literal.Number */ +.highlight .s { color: #b83838 } /* Literal.String */ +.highlight .na { color: #388038 } /* Name.Attribute */ +.highlight .nb { color: #388038 } /* Name.Builtin */ +.highlight .nc { color: #287088 } /* Name.Class */ +.highlight .no { color: #b85820 } /* Name.Constant */ +.highlight .nd { color: #287088 } /* Name.Decorator */ +.highlight .ni { color: #709030 } /* Name.Entity */ +.highlight .ne { color: #908828 } /* Name.Exception */ +.highlight .nf { color: #785840 } /* Name.Function */ +.highlight .nl { color: #289870 } /* Name.Label */ +.highlight .nn { color: #289870 } /* Name.Namespace */ +.highlight .nt { color: #2838b0 } /* Name.Tag */ +.highlight .nv { color: #b04040 } /* Name.Variable */ +.highlight .ow { color: #a848a8 } /* Operator.Word */ +.highlight .w { color: #a89028 } /* Text.Whitespace */ +.highlight .mb { color: #444444 } /* Literal.Number.Bin */ +.highlight .mf { color: #444444 } /* Literal.Number.Float */ +.highlight .mh { color: #444444 } /* Literal.Number.Hex */ +.highlight .mi { color: #444444 } /* Literal.Number.Integer */ +.highlight .mo { color: #444444 } /* Literal.Number.Oct */ +.highlight .sa { color: #444444 } /* Literal.String.Affix */ +.highlight .sb { color: #b83838 } /* Literal.String.Backtick */ +.highlight .sc { color: #a848a8 } /* Literal.String.Char */ +.highlight .dl { color: #b85820 } /* Literal.String.Delimiter */ +.highlight .sd { color: #b85820; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #b83838 } /* Literal.String.Double */ +.highlight .se { color: #709030 } /* Literal.String.Escape */ +.highlight .sh { color: #b83838 } /* Literal.String.Heredoc */ +.highlight .si { color: #b83838; text-decoration: underline } /* Literal.String.Interpol */ +.highlight .sx { color: #a848a8 } /* Literal.String.Other */ +.highlight .sr { color: #a848a8 } /* Literal.String.Regex */ +.highlight .s1 { color: #b83838 } /* Literal.String.Single */ +.highlight .ss { color: #b83838 } /* Literal.String.Symbol */ +.highlight .bp { color: #388038; font-style: italic } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #b85820 } /* Name.Function.Magic */ +.highlight .vc { color: #b04040 } /* Name.Variable.Class */ +.highlight .vg { color: #908828 } /* Name.Variable.Global */ +.highlight .vi { color: #b04040 } /* Name.Variable.Instance */ +.highlight .vm { color: #b85820 } /* Name.Variable.Magic */ +.highlight .il { color: #444444 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #888888; font-style: italic } /* Comment */ +.literal-block .err { background-color: #a848a8 } /* Error */ +.literal-block .k { color: #2838b0 } /* Keyword */ +.literal-block .o { color: #666666 } /* Operator */ +.literal-block .p { color: #888888 } /* Punctuation */ +.literal-block .ch { color: #287088; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #888888; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #289870 } /* Comment.Preproc */ +.literal-block .cpf { color: #888888; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #888888; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #888888; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #c02828 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #c02828 } /* Generic.Error */ +.literal-block .gh { color: #666666 } /* Generic.Heading */ +.literal-block .gi { color: #388038 } /* Generic.Inserted */ +.literal-block .go { color: #666666 } /* Generic.Output */ +.literal-block .gp { color: #444444 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #444444 } /* Generic.Subheading */ +.literal-block .gt { color: #2838b0 } /* Generic.Traceback */ +.literal-block .kc { color: #444444; font-style: italic } /* Keyword.Constant */ +.literal-block .kd { color: #2838b0; font-style: italic } /* Keyword.Declaration */ +.literal-block .kn { color: #2838b0 } /* Keyword.Namespace */ +.literal-block .kp { color: #2838b0 } /* Keyword.Pseudo */ +.literal-block .kr { color: #2838b0 } /* Keyword.Reserved */ +.literal-block .kt { color: #2838b0; font-style: italic } /* Keyword.Type */ +.literal-block .m { color: #444444 } /* Literal.Number */ +.literal-block .s { color: #b83838 } /* Literal.String */ +.literal-block .na { color: #388038 } /* Name.Attribute */ +.literal-block .nb { color: #388038 } /* Name.Builtin */ +.literal-block .nc { color: #287088 } /* Name.Class */ +.literal-block .no { color: #b85820 } /* Name.Constant */ +.literal-block .nd { color: #287088 } /* Name.Decorator */ +.literal-block .ni { color: #709030 } /* Name.Entity */ +.literal-block .ne { color: #908828 } /* Name.Exception */ +.literal-block .nf { color: #785840 } /* Name.Function */ +.literal-block .nl { color: #289870 } /* Name.Label */ +.literal-block .nn { color: #289870 } /* Name.Namespace */ +.literal-block .nt { color: #2838b0 } /* Name.Tag */ +.literal-block .nv { color: #b04040 } /* Name.Variable */ +.literal-block .ow { color: #a848a8 } /* Operator.Word */ +.literal-block .w { color: #a89028 } /* Text.Whitespace */ +.literal-block .mb { color: #444444 } /* Literal.Number.Bin */ +.literal-block .mf { color: #444444 } /* Literal.Number.Float */ +.literal-block .mh { color: #444444 } /* Literal.Number.Hex */ +.literal-block .mi { color: #444444 } /* Literal.Number.Integer */ +.literal-block .mo { color: #444444 } /* Literal.Number.Oct */ +.literal-block .sa { color: #444444 } /* Literal.String.Affix */ +.literal-block .sb { color: #b83838 } /* Literal.String.Backtick */ +.literal-block .sc { color: #a848a8 } /* Literal.String.Char */ +.literal-block .dl { color: #b85820 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #b85820; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #b83838 } /* Literal.String.Double */ +.literal-block .se { color: #709030 } /* Literal.String.Escape */ +.literal-block .sh { color: #b83838 } /* Literal.String.Heredoc */ +.literal-block .si { color: #b83838; text-decoration: underline } /* Literal.String.Interpol */ +.literal-block .sx { color: #a848a8 } /* Literal.String.Other */ +.literal-block .sr { color: #a848a8 } /* Literal.String.Regex */ +.literal-block .s1 { color: #b83838 } /* Literal.String.Single */ +.literal-block .ss { color: #b83838 } /* Literal.String.Symbol */ +.literal-block .bp { color: #388038; font-style: italic } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #b85820 } /* Name.Function.Magic */ +.literal-block .vc { color: #b04040 } /* Name.Variable.Class */ +.literal-block .vg { color: #908828 } /* Name.Variable.Global */ +.literal-block .vi { color: #b04040 } /* Name.Variable.Instance */ +.literal-block .vm { color: #b85820 } /* Name.Variable.Magic */ +.literal-block .il { color: #444444 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/lovelace.min.css b/theme/pygments/lovelace.min.css new file mode 100644 index 00000000..06b5a7f4 --- /dev/null +++ b/theme/pygments/lovelace.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#888;font-style:italic}.highlight .err{background-color:#a848a8}.highlight .k{color:#2838b0}.highlight .o{color:#666}.highlight .p{color:#888}.highlight .ch{color:#287088;font-style:italic}.highlight .cm{color:#888;font-style:italic}.highlight .cp{color:#289870}.highlight .c1,.highlight .cpf,.highlight .cs{color:#888;font-style:italic}.highlight .gd{color:#c02828}.highlight .ge{font-style:italic}.highlight .gr{color:#c02828}.highlight .gh{color:#666}.highlight .gi{color:#388038}.highlight .go{color:#666}.highlight .gp{color:#444}.highlight .gs{font-weight:700}.highlight .gu{color:#444}.highlight .gt{color:#2838b0}.highlight .kc{color:#444;font-style:italic}.highlight .kd{color:#2838b0;font-style:italic}.highlight .kn,.highlight .kp,.highlight .kr{color:#2838b0}.highlight .kt{color:#2838b0;font-style:italic}.highlight .m{color:#444}.highlight .s{color:#b83838}.highlight .na,.highlight .nb{color:#388038}.highlight .nc{color:#287088}.highlight .no{color:#b85820}.highlight .nd{color:#287088}.highlight .ni{color:#709030}.highlight .ne{color:#908828}.highlight .nf{color:#785840}.highlight .nl,.highlight .nn{color:#289870}.highlight .nt{color:#2838b0}.highlight .nv{color:#b04040}.highlight .ow{color:#a848a8}.highlight .w{color:#a89028}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo,.highlight .sa{color:#444}.highlight .sb{color:#b83838}.highlight .sc{color:#a848a8}.highlight .dl{color:#b85820}.highlight .sd{color:#b85820;font-style:italic}.highlight .s2{color:#b83838}.highlight .se{color:#709030}.highlight .sh{color:#b83838}.highlight .si{color:#b83838;text-decoration:underline}.highlight .sr,.highlight .sx{color:#a848a8}.highlight .s1,.highlight .ss{color:#b83838}.highlight .bp{color:#388038;font-style:italic}.highlight .fm{color:#b85820}.highlight .vc{color:#b04040}.highlight .vg{color:#908828}.highlight .vi{color:#b04040}.highlight .vm{color:#b85820}.highlight .il{color:#444}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#888;font-style:italic}.literal-block .err{background-color:#a848a8}.literal-block .k{color:#2838b0}.literal-block .o{color:#666}.literal-block .p{color:#888}.literal-block .ch{color:#287088;font-style:italic}.literal-block .cm{color:#888;font-style:italic}.literal-block .cp{color:#289870}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#888;font-style:italic}.literal-block .gd{color:#c02828}.literal-block .ge{font-style:italic}.literal-block .gr{color:#c02828}.literal-block .gh{color:#666}.literal-block .gi{color:#388038}.literal-block .go{color:#666}.literal-block .gp{color:#444}.literal-block .gs{font-weight:700}.literal-block .gu{color:#444}.literal-block .gt{color:#2838b0}.literal-block .kc{color:#444;font-style:italic}.literal-block .kd{color:#2838b0;font-style:italic}.literal-block .kn,.literal-block .kp,.literal-block .kr{color:#2838b0}.literal-block .kt{color:#2838b0;font-style:italic}.literal-block .m{color:#444}.literal-block .s{color:#b83838}.literal-block .na,.literal-block .nb{color:#388038}.literal-block .nc{color:#287088}.literal-block .no{color:#b85820}.literal-block .nd{color:#287088}.literal-block .ni{color:#709030}.literal-block .ne{color:#908828}.literal-block .nf{color:#785840}.literal-block .nl,.literal-block .nn{color:#289870}.literal-block .nt{color:#2838b0}.literal-block .nv{color:#b04040}.literal-block .ow{color:#a848a8}.literal-block .w{color:#a89028}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo,.literal-block .sa{color:#444}.literal-block .sb{color:#b83838}.literal-block .sc{color:#a848a8}.literal-block .dl{color:#b85820}.literal-block .sd{color:#b85820;font-style:italic}.literal-block .s2{color:#b83838}.literal-block .se{color:#709030}.literal-block .sh{color:#b83838}.literal-block .si{color:#b83838;text-decoration:underline}.literal-block .sr,.literal-block .sx{color:#a848a8}.literal-block .s1,.literal-block .ss{color:#b83838}.literal-block .bp{color:#388038;font-style:italic}.literal-block .fm{color:#b85820}.literal-block .vc{color:#b04040}.literal-block .vg{color:#908828}.literal-block .vi{color:#b04040}.literal-block .vm{color:#b85820}.literal-block .il{color:#444} \ No newline at end of file diff --git a/theme/pygments/manni.css b/theme/pygments/manni.css new file mode 100644 index 00000000..4fdcb31c --- /dev/null +++ b/theme/pygments/manni.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f0f3f3; } +.highlight .c { color: #0099FF; font-style: italic } /* Comment */ +.highlight .err { color: #AA0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #006699; font-weight: bold } /* Keyword */ +.highlight .o { color: #555555 } /* Operator */ +.highlight .ch { color: #0099FF; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #009999 } /* Comment.Preproc */ +.highlight .cpf { color: #0099FF; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #0099FF; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #0099FF; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #003300; font-weight: bold } /* Generic.Heading */ +.highlight .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ +.highlight .go { color: #AAAAAA } /* Generic.Output */ +.highlight .gp { color: #000099; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #003300; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #99CC66 } /* Generic.Traceback */ +.highlight .kc { color: #006699; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #006699 } /* Keyword.Pseudo */ +.highlight .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #007788; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #FF6600 } /* Literal.Number */ +.highlight .s { color: #CC3300 } /* Literal.String */ +.highlight .na { color: #330099 } /* Name.Attribute */ +.highlight .nb { color: #336666 } /* Name.Builtin */ +.highlight .nc { color: #00AA88; font-weight: bold } /* Name.Class */ +.highlight .no { color: #336600 } /* Name.Constant */ +.highlight .nd { color: #9999FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CC0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #CC00FF } /* Name.Function */ +.highlight .nl { color: #9999FF } /* Name.Label */ +.highlight .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #330099; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #003333 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #FF6600 } /* Literal.Number.Bin */ +.highlight .mf { color: #FF6600 } /* Literal.Number.Float */ +.highlight .mh { color: #FF6600 } /* Literal.Number.Hex */ +.highlight .mi { color: #FF6600 } /* Literal.Number.Integer */ +.highlight .mo { color: #FF6600 } /* Literal.Number.Oct */ +.highlight .sa { color: #CC3300 } /* Literal.String.Affix */ +.highlight .sb { color: #CC3300 } /* Literal.String.Backtick */ +.highlight .sc { color: #CC3300 } /* Literal.String.Char */ +.highlight .dl { color: #CC3300 } /* Literal.String.Delimiter */ +.highlight .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #CC3300 } /* Literal.String.Double */ +.highlight .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #CC3300 } /* Literal.String.Heredoc */ +.highlight .si { color: #AA0000 } /* Literal.String.Interpol */ +.highlight .sx { color: #CC3300 } /* Literal.String.Other */ +.highlight .sr { color: #33AAAA } /* Literal.String.Regex */ +.highlight .s1 { color: #CC3300 } /* Literal.String.Single */ +.highlight .ss { color: #FFCC33 } /* Literal.String.Symbol */ +.highlight .bp { color: #336666 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #CC00FF } /* Name.Function.Magic */ +.highlight .vc { color: #003333 } /* Name.Variable.Class */ +.highlight .vg { color: #003333 } /* Name.Variable.Global */ +.highlight .vi { color: #003333 } /* Name.Variable.Instance */ +.highlight .vm { color: #003333 } /* Name.Variable.Magic */ +.highlight .il { color: #FF6600 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #f0f3f3; } +.literal-block .c { color: #0099FF; font-style: italic } /* Comment */ +.literal-block .err { color: #AA0000; background-color: #FFAAAA } /* Error */ +.literal-block .k { color: #006699; font-weight: bold } /* Keyword */ +.literal-block .o { color: #555555 } /* Operator */ +.literal-block .ch { color: #0099FF; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #009999 } /* Comment.Preproc */ +.literal-block .cpf { color: #0099FF; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #0099FF; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #0099FF; font-weight: bold; font-style: italic } /* Comment.Special */ +.literal-block .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #003300; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ +.literal-block .go { color: #AAAAAA } /* Generic.Output */ +.literal-block .gp { color: #000099; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #003300; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #99CC66 } /* Generic.Traceback */ +.literal-block .kc { color: #006699; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #006699 } /* Keyword.Pseudo */ +.literal-block .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #007788; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #FF6600 } /* Literal.Number */ +.literal-block .s { color: #CC3300 } /* Literal.String */ +.literal-block .na { color: #330099 } /* Name.Attribute */ +.literal-block .nb { color: #336666 } /* Name.Builtin */ +.literal-block .nc { color: #00AA88; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #336600 } /* Name.Constant */ +.literal-block .nd { color: #9999FF } /* Name.Decorator */ +.literal-block .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.literal-block .ne { color: #CC0000; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #CC00FF } /* Name.Function */ +.literal-block .nl { color: #9999FF } /* Name.Label */ +.literal-block .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ +.literal-block .nt { color: #330099; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #003333 } /* Name.Variable */ +.literal-block .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #FF6600 } /* Literal.Number.Bin */ +.literal-block .mf { color: #FF6600 } /* Literal.Number.Float */ +.literal-block .mh { color: #FF6600 } /* Literal.Number.Hex */ +.literal-block .mi { color: #FF6600 } /* Literal.Number.Integer */ +.literal-block .mo { color: #FF6600 } /* Literal.Number.Oct */ +.literal-block .sa { color: #CC3300 } /* Literal.String.Affix */ +.literal-block .sb { color: #CC3300 } /* Literal.String.Backtick */ +.literal-block .sc { color: #CC3300 } /* Literal.String.Char */ +.literal-block .dl { color: #CC3300 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #CC3300 } /* Literal.String.Double */ +.literal-block .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ +.literal-block .sh { color: #CC3300 } /* Literal.String.Heredoc */ +.literal-block .si { color: #AA0000 } /* Literal.String.Interpol */ +.literal-block .sx { color: #CC3300 } /* Literal.String.Other */ +.literal-block .sr { color: #33AAAA } /* Literal.String.Regex */ +.literal-block .s1 { color: #CC3300 } /* Literal.String.Single */ +.literal-block .ss { color: #FFCC33 } /* Literal.String.Symbol */ +.literal-block .bp { color: #336666 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #CC00FF } /* Name.Function.Magic */ +.literal-block .vc { color: #003333 } /* Name.Variable.Class */ +.literal-block .vg { color: #003333 } /* Name.Variable.Global */ +.literal-block .vi { color: #003333 } /* Name.Variable.Instance */ +.literal-block .vm { color: #003333 } /* Name.Variable.Magic */ +.literal-block .il { color: #FF6600 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/manni.min.css b/theme/pygments/manni.min.css new file mode 100644 index 00000000..f9e7e6a5 --- /dev/null +++ b/theme/pygments/manni.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#f0f3f3}.highlight .c{color:#09f;font-style:italic}.highlight .err{color:#a00;background-color:#faa}.highlight .k{color:#069;font-weight:700}.highlight .o{color:#555}.highlight .ch,.highlight .cm{color:#09f;font-style:italic}.highlight .cp{color:#099}.highlight .c1,.highlight .cpf,.highlight .cs{color:#09f;font-style:italic}.highlight .cs{font-weight:700}.highlight .gd{background-color:#fcc;border:1px solid #c00}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:#030;font-weight:700}.highlight .gi{background-color:#cfc;border:1px solid #0c0}.highlight .go{color:#aaa}.highlight .gp{color:#009}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:#030}.highlight .gt{color:#9c6}.highlight .kc,.highlight .kd,.highlight .kn{color:#069;font-weight:700}.highlight .kp{color:#069}.highlight .kr{color:#069;font-weight:700}.highlight .kt{color:#078;font-weight:700}.highlight .m{color:#f60}.highlight .s{color:#c30}.highlight .na{color:#309}.highlight .nb{color:#366}.highlight .nc{color:#0a8;font-weight:700}.highlight .no{color:#360}.highlight .nd{color:#99f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#c00;font-weight:700}.highlight .nf{color:#c0f}.highlight .nl{color:#99f}.highlight .nn{color:#0cf;font-weight:700}.highlight .nt{color:#309;font-weight:700}.highlight .nv{color:#033}.highlight .ow{color:#000;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#f60}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#c30}.highlight .sd{color:#c30;font-style:italic}.highlight .s2{color:#c30}.highlight .se{color:#c30;font-weight:700}.highlight .sh{color:#c30}.highlight .si{color:#a00}.highlight .sx{color:#c30}.highlight .sr{color:#3aa}.highlight .s1{color:#c30}.highlight .ss{color:#fc3}.highlight .bp{color:#366}.highlight .fm{color:#c0f}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#033}.highlight .il{color:#f60}.literal-block .hll{background-color:#ffc}.literal-block{background:#f0f3f3}.literal-block .c{color:#09f;font-style:italic}.literal-block .err{color:#a00;background-color:#faa}.literal-block .k{color:#069;font-weight:700}.literal-block .o{color:#555}.literal-block .ch,.literal-block .cm{color:#09f;font-style:italic}.literal-block .cp{color:#099}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#09f;font-style:italic}.literal-block .cs{font-weight:700}.literal-block .gd{background-color:#fcc;border:1px solid #c00}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:#030;font-weight:700}.literal-block .gi{background-color:#cfc;border:1px solid #0c0}.literal-block .go{color:#aaa}.literal-block .gp{color:#009;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:#030;font-weight:700}.literal-block .gt{color:#9c6}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#069;font-weight:700}.literal-block .kp{color:#069}.literal-block .kr{color:#069;font-weight:700}.literal-block .kt{color:#078;font-weight:700}.literal-block .m{color:#f60}.literal-block .s{color:#c30}.literal-block .na{color:#309}.literal-block .nb{color:#366}.literal-block .nc{color:#0a8;font-weight:700}.literal-block .no{color:#360}.literal-block .nd{color:#99f}.literal-block .ni{color:#999;font-weight:700}.literal-block .ne{color:#c00;font-weight:700}.literal-block .nf{color:#c0f}.literal-block .nl{color:#99f}.literal-block .nn{color:#0cf;font-weight:700}.literal-block .nt{color:#309;font-weight:700}.literal-block .nv{color:#033}.literal-block .ow{color:#000;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#f60}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#c30}.literal-block .sd{color:#c30;font-style:italic}.literal-block .s2{color:#c30}.literal-block .se{color:#c30;font-weight:700}.literal-block .sh{color:#c30}.literal-block .si{color:#a00}.literal-block .sx{color:#c30}.literal-block .sr{color:#3aa}.literal-block .s1{color:#c30}.literal-block .ss{color:#fc3}.literal-block .bp{color:#366}.literal-block .fm{color:#c0f}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#033}.literal-block .il{color:#f60} \ No newline at end of file diff --git a/theme/pygments/monokai.css b/theme/pygments/monokai.css new file mode 100644 index 00000000..b9e66e67 --- /dev/null +++ b/theme/pygments/monokai.css @@ -0,0 +1,144 @@ +.highlight .hll { background-color: #49483e } +.highlight { background: #272822; color: #f8f8f2 } +.highlight .c { color: #75715e } /* Comment */ +.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ +.highlight .k { color: #66d9ef } /* Keyword */ +.highlight .l { color: #ae81ff } /* Literal */ +.highlight .n { color: #f8f8f2 } /* Name */ +.highlight .o { color: #f92672 } /* Operator */ +.highlight .p { color: #f8f8f2 } /* Punctuation */ +.highlight .ch { color: #75715e } /* Comment.Hashbang */ +.highlight .cm { color: #75715e } /* Comment.Multiline */ +.highlight .cp { color: #75715e } /* Comment.Preproc */ +.highlight .cpf { color: #75715e } /* Comment.PreprocFile */ +.highlight .c1 { color: #75715e } /* Comment.Single */ +.highlight .cs { color: #75715e } /* Comment.Special */ +.highlight .gd { color: #f92672 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gi { color: #a6e22e } /* Generic.Inserted */ +.highlight .go { color: #66d9ef } /* Generic.Output */ +.highlight .gp { color: #f92672; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #75715e } /* Generic.Subheading */ +.highlight .kc { color: #66d9ef } /* Keyword.Constant */ +.highlight .kd { color: #66d9ef } /* Keyword.Declaration */ +.highlight .kn { color: #f92672 } /* Keyword.Namespace */ +.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ +.highlight .kr { color: #66d9ef } /* Keyword.Reserved */ +.highlight .kt { color: #66d9ef } /* Keyword.Type */ +.highlight .ld { color: #e6db74 } /* Literal.Date */ +.highlight .m { color: #ae81ff } /* Literal.Number */ +.highlight .s { color: #e6db74 } /* Literal.String */ +.highlight .na { color: #a6e22e } /* Name.Attribute */ +.highlight .nb { color: #f8f8f2 } /* Name.Builtin */ +.highlight .nc { color: #a6e22e } /* Name.Class */ +.highlight .no { color: #66d9ef } /* Name.Constant */ +.highlight .nd { color: #a6e22e } /* Name.Decorator */ +.highlight .ni { color: #f8f8f2 } /* Name.Entity */ +.highlight .ne { color: #a6e22e } /* Name.Exception */ +.highlight .nf { color: #a6e22e } /* Name.Function */ +.highlight .nl { color: #f8f8f2 } /* Name.Label */ +.highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +.highlight .nx { color: #a6e22e } /* Name.Other */ +.highlight .py { color: #f8f8f2 } /* Name.Property */ +.highlight .nt { color: #f92672 } /* Name.Tag */ +.highlight .nv { color: #f8f8f2 } /* Name.Variable */ +.highlight .ow { color: #f92672 } /* Operator.Word */ +.highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ +.highlight .mf { color: #ae81ff } /* Literal.Number.Float */ +.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ +.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ +.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ +.highlight .sa { color: #e6db74 } /* Literal.String.Affix */ +.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ +.highlight .sc { color: #e6db74 } /* Literal.String.Char */ +.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ +.highlight .sd { color: #e6db74 } /* Literal.String.Doc */ +.highlight .s2 { color: #e6db74 } /* Literal.String.Double */ +.highlight .se { color: #ae81ff } /* Literal.String.Escape */ +.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ +.highlight .si { color: #e6db74 } /* Literal.String.Interpol */ +.highlight .sx { color: #e6db74 } /* Literal.String.Other */ +.highlight .sr { color: #e6db74 } /* Literal.String.Regex */ +.highlight .s1 { color: #e6db74 } /* Literal.String.Single */ +.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ +.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #a6e22e } /* Name.Function.Magic */ +.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ +.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ +.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ +.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ +.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #49483e } +.literal-block { background: #272822; color: #f8f8f2 } +.literal-block .c { color: #75715e } /* Comment */ +.literal-block .err { color: #960050; background-color: #1e0010 } /* Error */ +.literal-block .k { color: #66d9ef } /* Keyword */ +.literal-block .l { color: #ae81ff } /* Literal */ +.literal-block .n { color: #f8f8f2 } /* Name */ +.literal-block .o { color: #f92672 } /* Operator */ +.literal-block .p { color: #f8f8f2 } /* Punctuation */ +.literal-block .ch { color: #75715e } /* Comment.Hashbang */ +.literal-block .cm { color: #75715e } /* Comment.Multiline */ +.literal-block .cp { color: #75715e } /* Comment.Preproc */ +.literal-block .cpf { color: #75715e } /* Comment.PreprocFile */ +.literal-block .c1 { color: #75715e } /* Comment.Single */ +.literal-block .cs { color: #75715e } /* Comment.Special */ +.literal-block .gd { color: #f92672 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gi { color: #a6e22e } /* Generic.Inserted */ +.literal-block .go { color: #66d9ef } /* Generic.Output */ +.literal-block .gp { color: #f92672; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #75715e } /* Generic.Subheading */ +.literal-block .kc { color: #66d9ef } /* Keyword.Constant */ +.literal-block .kd { color: #66d9ef } /* Keyword.Declaration */ +.literal-block .kn { color: #f92672 } /* Keyword.Namespace */ +.literal-block .kp { color: #66d9ef } /* Keyword.Pseudo */ +.literal-block .kr { color: #66d9ef } /* Keyword.Reserved */ +.literal-block .kt { color: #66d9ef } /* Keyword.Type */ +.literal-block .ld { color: #e6db74 } /* Literal.Date */ +.literal-block .m { color: #ae81ff } /* Literal.Number */ +.literal-block .s { color: #e6db74 } /* Literal.String */ +.literal-block .na { color: #a6e22e } /* Name.Attribute */ +.literal-block .nb { color: #f8f8f2 } /* Name.Builtin */ +.literal-block .nc { color: #a6e22e } /* Name.Class */ +.literal-block .no { color: #66d9ef } /* Name.Constant */ +.literal-block .nd { color: #a6e22e } /* Name.Decorator */ +.literal-block .ni { color: #f8f8f2 } /* Name.Entity */ +.literal-block .ne { color: #a6e22e } /* Name.Exception */ +.literal-block .nf { color: #a6e22e } /* Name.Function */ +.literal-block .nl { color: #f8f8f2 } /* Name.Label */ +.literal-block .nn { color: #f8f8f2 } /* Name.Namespace */ +.literal-block .nx { color: #a6e22e } /* Name.Other */ +.literal-block .py { color: #f8f8f2 } /* Name.Property */ +.literal-block .nt { color: #f92672 } /* Name.Tag */ +.literal-block .nv { color: #f8f8f2 } /* Name.Variable */ +.literal-block .ow { color: #f92672 } /* Operator.Word */ +.literal-block .w { color: #f8f8f2 } /* Text.Whitespace */ +.literal-block .mb { color: #ae81ff } /* Literal.Number.Bin */ +.literal-block .mf { color: #ae81ff } /* Literal.Number.Float */ +.literal-block .mh { color: #ae81ff } /* Literal.Number.Hex */ +.literal-block .mi { color: #ae81ff } /* Literal.Number.Integer */ +.literal-block .mo { color: #ae81ff } /* Literal.Number.Oct */ +.literal-block .sa { color: #e6db74 } /* Literal.String.Affix */ +.literal-block .sb { color: #e6db74 } /* Literal.String.Backtick */ +.literal-block .sc { color: #e6db74 } /* Literal.String.Char */ +.literal-block .dl { color: #e6db74 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #e6db74 } /* Literal.String.Doc */ +.literal-block .s2 { color: #e6db74 } /* Literal.String.Double */ +.literal-block .se { color: #ae81ff } /* Literal.String.Escape */ +.literal-block .sh { color: #e6db74 } /* Literal.String.Heredoc */ +.literal-block .si { color: #e6db74 } /* Literal.String.Interpol */ +.literal-block .sx { color: #e6db74 } /* Literal.String.Other */ +.literal-block .sr { color: #e6db74 } /* Literal.String.Regex */ +.literal-block .s1 { color: #e6db74 } /* Literal.String.Single */ +.literal-block .ss { color: #e6db74 } /* Literal.String.Symbol */ +.literal-block .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #a6e22e } /* Name.Function.Magic */ +.literal-block .vc { color: #f8f8f2 } /* Name.Variable.Class */ +.literal-block .vg { color: #f8f8f2 } /* Name.Variable.Global */ +.literal-block .vi { color: #f8f8f2 } /* Name.Variable.Instance */ +.literal-block .vm { color: #f8f8f2 } /* Name.Variable.Magic */ +.literal-block .il { color: #ae81ff } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/monokai.min.css b/theme/pygments/monokai.min.css new file mode 100644 index 00000000..c29088f9 --- /dev/null +++ b/theme/pygments/monokai.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#49483e}.highlight{background:#272822;color:#f8f8f2}.highlight .c{color:#75715e}.highlight .err{color:#960050;background-color:#1e0010}.highlight .k{color:#66d9ef}.highlight .l{color:#ae81ff}.highlight .n{color:#f8f8f2}.highlight .o{color:#f92672}.highlight .p{color:#f8f8f2}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#75715e}.highlight .gd{color:#f92672}.highlight .ge{font-style:italic}.highlight .gi{color:#a6e22e}.highlight .go{color:#66d9ef}.highlight .gp{color:#f92672}.highlight .gp,.highlight .gs{font-weight:700}.highlight .gu{color:#75715e}.highlight .kc,.highlight .kd{color:#66d9ef}.highlight .kn{color:#f92672}.highlight .kp,.highlight .kr,.highlight .kt{color:#66d9ef}.highlight .ld{color:#e6db74}.highlight .m{color:#ae81ff}.highlight .s{color:#e6db74}.highlight .na{color:#a6e22e}.highlight .nb{color:#f8f8f2}.highlight .nc{color:#a6e22e}.highlight .no{color:#66d9ef}.highlight .nd{color:#a6e22e}.highlight .ni{color:#f8f8f2}.highlight .ne,.highlight .nf{color:#a6e22e}.highlight .nl,.highlight .nn{color:#f8f8f2}.highlight .nx{color:#a6e22e}.highlight .py{color:#f8f8f2}.highlight .nt{color:#f92672}.highlight .nv{color:#f8f8f2}.highlight .ow{color:#f92672}.highlight .w{color:#f8f8f2}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#ae81ff}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd{color:#e6db74}.highlight .se{color:#ae81ff}.highlight .s1,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#e6db74}.highlight .bp{color:#f8f8f2}.highlight .fm{color:#a6e22e}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#f8f8f2}.highlight .il{color:#ae81ff}.literal-block .hll{background-color:#49483e}.literal-block{background:#272822;color:#f8f8f2}.literal-block .c{color:#75715e}.literal-block .err{color:#960050;background-color:#1e0010}.literal-block .k{color:#66d9ef}.literal-block .l{color:#ae81ff}.literal-block .n{color:#f8f8f2}.literal-block .o{color:#f92672}.literal-block .p{color:#f8f8f2}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#75715e}.literal-block .gd{color:#f92672}.literal-block .ge{font-style:italic}.literal-block .gi{color:#a6e22e}.literal-block .go{color:#66d9ef}.literal-block .gp{color:#f92672;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:#75715e}.literal-block .kc,.literal-block .kd{color:#66d9ef}.literal-block .kn{color:#f92672}.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#66d9ef}.literal-block .ld{color:#e6db74}.literal-block .m{color:#ae81ff}.literal-block .s{color:#e6db74}.literal-block .na{color:#a6e22e}.literal-block .nb{color:#f8f8f2}.literal-block .nc{color:#a6e22e}.literal-block .no{color:#66d9ef}.literal-block .nd{color:#a6e22e}.literal-block .ni{color:#f8f8f2}.literal-block .ne,.literal-block .nf{color:#a6e22e}.literal-block .nl,.literal-block .nn{color:#f8f8f2}.literal-block .nx{color:#a6e22e}.literal-block .py{color:#f8f8f2}.literal-block .nt{color:#f92672}.literal-block .nv{color:#f8f8f2}.literal-block .ow{color:#f92672}.literal-block .w{color:#f8f8f2}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#ae81ff}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd{color:#e6db74}.literal-block .se{color:#ae81ff}.literal-block .s1,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#e6db74}.literal-block .bp{color:#f8f8f2}.literal-block .fm{color:#a6e22e}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#f8f8f2}.literal-block .il{color:#ae81ff} \ No newline at end of file diff --git a/theme/pygments/murphy.css b/theme/pygments/murphy.css new file mode 100644 index 00000000..c58f1256 --- /dev/null +++ b/theme/pygments/murphy.css @@ -0,0 +1,138 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #666666; font-style: italic } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #228899; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #666666; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #666666; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #666666; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #666666; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #228899; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #228899; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #228899; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #0088ff; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #228899; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #6666ff; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #e0e0ff } /* Literal.String */ +.highlight .na { color: #000077 } /* Name.Attribute */ +.highlight .nb { color: #007722 } /* Name.Builtin */ +.highlight .nc { color: #ee99ee; font-weight: bold } /* Name.Class */ +.highlight .no { color: #55eedd; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000 } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #55eedd; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #003366 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #6666ff; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #e0e0ff } /* Literal.String.Affix */ +.highlight .sb { background-color: #e0e0ff } /* Literal.String.Backtick */ +.highlight .sc { color: #8888FF } /* Literal.String.Char */ +.highlight .dl { background-color: #e0e0ff } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #e0e0ff } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #e0e0ff } /* Literal.String.Escape */ +.highlight .sh { background-color: #e0e0ff } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #ff8888; background-color: #e0e0ff } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #e0e0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #e0e0ff } /* Literal.String.Single */ +.highlight .ss { color: #ffcc88 } /* Literal.String.Symbol */ +.highlight .bp { color: #007722 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #55eedd; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #ccccff } /* Name.Variable.Class */ +.highlight .vg { color: #ff8844 } /* Name.Variable.Global */ +.highlight .vi { color: #aaaaff } /* Name.Variable.Instance */ +.highlight .vm { color: #003366 } /* Name.Variable.Magic */ +.highlight .il { color: #6666ff; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #666666; font-style: italic } /* Comment */ +.literal-block .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.literal-block .k { color: #228899; font-weight: bold } /* Keyword */ +.literal-block .o { color: #333333 } /* Operator */ +.literal-block .ch { color: #666666; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #666666; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #557799 } /* Comment.Preproc */ +.literal-block .cpf { color: #666666; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #666666; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #cc0000; font-weight: bold; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #A00000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #228899; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #228899; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #228899; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #0088ff; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #228899; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #6666ff; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.literal-block .s { background-color: #e0e0ff } /* Literal.String */ +.literal-block .na { color: #000077 } /* Name.Attribute */ +.literal-block .nb { color: #007722 } /* Name.Builtin */ +.literal-block .nc { color: #ee99ee; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #55eedd; font-weight: bold } /* Name.Constant */ +.literal-block .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.literal-block .ni { color: #880000 } /* Name.Entity */ +.literal-block .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #55eedd; font-weight: bold } /* Name.Function */ +.literal-block .nl { color: #997700; font-weight: bold } /* Name.Label */ +.literal-block .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.literal-block .nt { color: #007700 } /* Name.Tag */ +.literal-block .nv { color: #003366 } /* Name.Variable */ +.literal-block .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #6666ff; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { background-color: #e0e0ff } /* Literal.String.Affix */ +.literal-block .sb { background-color: #e0e0ff } /* Literal.String.Backtick */ +.literal-block .sc { color: #8888FF } /* Literal.String.Char */ +.literal-block .dl { background-color: #e0e0ff } /* Literal.String.Delimiter */ +.literal-block .sd { color: #DD4422 } /* Literal.String.Doc */ +.literal-block .s2 { background-color: #e0e0ff } /* Literal.String.Double */ +.literal-block .se { color: #666666; font-weight: bold; background-color: #e0e0ff } /* Literal.String.Escape */ +.literal-block .sh { background-color: #e0e0ff } /* Literal.String.Heredoc */ +.literal-block .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.literal-block .sx { color: #ff8888; background-color: #e0e0ff } /* Literal.String.Other */ +.literal-block .sr { color: #000000; background-color: #e0e0ff } /* Literal.String.Regex */ +.literal-block .s1 { background-color: #e0e0ff } /* Literal.String.Single */ +.literal-block .ss { color: #ffcc88 } /* Literal.String.Symbol */ +.literal-block .bp { color: #007722 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #55eedd; font-weight: bold } /* Name.Function.Magic */ +.literal-block .vc { color: #ccccff } /* Name.Variable.Class */ +.literal-block .vg { color: #ff8844 } /* Name.Variable.Global */ +.literal-block .vi { color: #aaaaff } /* Name.Variable.Instance */ +.literal-block .vm { color: #003366 } /* Name.Variable.Magic */ +.literal-block .il { color: #6666ff; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/murphy.min.css b/theme/pygments/murphy.min.css new file mode 100644 index 00000000..c0b13fd0 --- /dev/null +++ b/theme/pygments/murphy.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#666;font-style:italic}.highlight .err{color:red;background-color:#faa}.highlight .k{color:#289;font-weight:700}.highlight .o{color:#333}.highlight .ch,.highlight .cm{color:#666;font-style:italic}.highlight .cp{color:#579}.highlight .c1,.highlight .cpf{color:#666;font-style:italic}.highlight .cs{color:#c00;font-weight:700;font-style:italic}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:#c65d09}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#04d}.highlight .kc,.highlight .kd,.highlight .kn{color:#289;font-weight:700}.highlight .kp{color:#08f;font-weight:700}.highlight .kr{color:#289;font-weight:700}.highlight .kt{color:#66f;font-weight:700}.highlight .m{color:#60e;font-weight:700}.highlight .s{background-color:#e0e0ff}.highlight .na{color:#007}.highlight .nb{color:#072}.highlight .nc{color:#e9e;font-weight:700}.highlight .no{color:#5ed;font-weight:700}.highlight .nd{color:#555;font-weight:700}.highlight .ni{color:#800}.highlight .ne{color:red;font-weight:700}.highlight .nf{color:#5ed;font-weight:700}.highlight .nl{color:#970;font-weight:700}.highlight .nn{color:#0e84b5;font-weight:700}.highlight .nt{color:#070}.highlight .nv{color:#036}.highlight .ow{color:#000;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf{color:#60e;font-weight:700}.highlight .mh{color:#058;font-weight:700}.highlight .mi{color:#66f;font-weight:700}.highlight .mo{color:#40e;font-weight:700}.highlight .sa,.highlight .sb{background-color:#e0e0ff}.highlight .sc{color:#88f}.highlight .dl{background-color:#e0e0ff}.highlight .sd{color:#d42}.highlight .s2,.highlight .se{background-color:#e0e0ff}.highlight .se{color:#666;font-weight:700}.highlight .sh{background-color:#e0e0ff}.highlight .si{background-color:#eee}.highlight .sx{color:#f88;background-color:#e0e0ff}.highlight .sr{color:#000}.highlight .s1,.highlight .sr{background-color:#e0e0ff}.highlight .ss{color:#fc8}.highlight .bp{color:#072}.highlight .fm{color:#5ed;font-weight:700}.highlight .vc{color:#ccf}.highlight .vg{color:#f84}.highlight .vi{color:#aaf}.highlight .vm{color:#036}.highlight .il{color:#66f;font-weight:700}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#666;font-style:italic}.literal-block .err{color:red;background-color:#faa}.literal-block .k{color:#289;font-weight:700}.literal-block .o{color:#333}.literal-block .ch,.literal-block .cm{color:#666;font-style:italic}.literal-block .cp{color:#579}.literal-block .c1,.literal-block .cpf{color:#666;font-style:italic}.literal-block .cs{color:#c00;font-weight:700;font-style:italic}.literal-block .gd{color:#a00000}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#888}.literal-block .gp{color:#c65d09;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#289;font-weight:700}.literal-block .kp{color:#08f;font-weight:700}.literal-block .kr{color:#289;font-weight:700}.literal-block .kt{color:#66f;font-weight:700}.literal-block .m{color:#60e;font-weight:700}.literal-block .s{background-color:#e0e0ff}.literal-block .na{color:#007}.literal-block .nb{color:#072}.literal-block .nc{color:#e9e;font-weight:700}.literal-block .no{color:#5ed;font-weight:700}.literal-block .nd{color:#555;font-weight:700}.literal-block .ni{color:#800}.literal-block .ne{color:red;font-weight:700}.literal-block .nf{color:#5ed;font-weight:700}.literal-block .nl{color:#970;font-weight:700}.literal-block .nn{color:#0e84b5;font-weight:700}.literal-block .nt{color:#070}.literal-block .nv{color:#036}.literal-block .ow{color:#000;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf{color:#60e;font-weight:700}.literal-block .mh{color:#058;font-weight:700}.literal-block .mi{color:#66f;font-weight:700}.literal-block .mo{color:#40e;font-weight:700}.literal-block .sa,.literal-block .sb{background-color:#e0e0ff}.literal-block .sc{color:#88f}.literal-block .dl{background-color:#e0e0ff}.literal-block .sd{color:#d42}.literal-block .s2,.literal-block .se{background-color:#e0e0ff}.literal-block .se{color:#666;font-weight:700}.literal-block .sh{background-color:#e0e0ff}.literal-block .si{background-color:#eee}.literal-block .sx{color:#f88;background-color:#e0e0ff}.literal-block .sr{color:#000}.literal-block .s1,.literal-block .sr{background-color:#e0e0ff}.literal-block .ss{color:#fc8}.literal-block .bp{color:#072}.literal-block .fm{color:#5ed;font-weight:700}.literal-block .vc{color:#ccf}.literal-block .vg{color:#f84}.literal-block .vi{color:#aaf}.literal-block .vm{color:#036}.literal-block .il{color:#66f;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/native.css b/theme/pygments/native.css new file mode 100644 index 00000000..70cba50c --- /dev/null +++ b/theme/pygments/native.css @@ -0,0 +1,156 @@ +.highlight .hll { background-color: #404040 } +.highlight { background: #202020; color: #d0d0d0 } +.highlight .c { color: #999999; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .esc { color: #d0d0d0 } /* Escape */ +.highlight .g { color: #d0d0d0 } /* Generic */ +.highlight .k { color: #6ab825; font-weight: bold } /* Keyword */ +.highlight .l { color: #d0d0d0 } /* Literal */ +.highlight .n { color: #d0d0d0 } /* Name */ +.highlight .o { color: #d0d0d0 } /* Operator */ +.highlight .x { color: #d0d0d0 } /* Other */ +.highlight .p { color: #d0d0d0 } /* Punctuation */ +.highlight .ch { color: #999999; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */ +.highlight .cpf { color: #999999; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +.highlight .gd { color: #d22323 } /* Generic.Deleted */ +.highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #d22323 } /* Generic.Error */ +.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #589819 } /* Generic.Inserted */ +.highlight .go { color: #cccccc } /* Generic.Output */ +.highlight .gp { color: #aaaaaa } /* Generic.Prompt */ +.highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +.highlight .gt { color: #d22323 } /* Generic.Traceback */ +.highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #6ab825 } /* Keyword.Pseudo */ +.highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #d0d0d0 } /* Literal.Date */ +.highlight .m { color: #3677a9 } /* Literal.Number */ +.highlight .s { color: #ed9d13 } /* Literal.String */ +.highlight .na { color: #bbbbbb } /* Name.Attribute */ +.highlight .nb { color: #24909d } /* Name.Builtin */ +.highlight .nc { color: #447fcf; text-decoration: underline } /* Name.Class */ +.highlight .no { color: #40ffff } /* Name.Constant */ +.highlight .nd { color: #ffa500 } /* Name.Decorator */ +.highlight .ni { color: #d0d0d0 } /* Name.Entity */ +.highlight .ne { color: #bbbbbb } /* Name.Exception */ +.highlight .nf { color: #447fcf } /* Name.Function */ +.highlight .nl { color: #d0d0d0 } /* Name.Label */ +.highlight .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */ +.highlight .nx { color: #d0d0d0 } /* Name.Other */ +.highlight .py { color: #d0d0d0 } /* Name.Property */ +.highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #40ffff } /* Name.Variable */ +.highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #666666 } /* Text.Whitespace */ +.highlight .mb { color: #3677a9 } /* Literal.Number.Bin */ +.highlight .mf { color: #3677a9 } /* Literal.Number.Float */ +.highlight .mh { color: #3677a9 } /* Literal.Number.Hex */ +.highlight .mi { color: #3677a9 } /* Literal.Number.Integer */ +.highlight .mo { color: #3677a9 } /* Literal.Number.Oct */ +.highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ +.highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ +.highlight .sc { color: #ed9d13 } /* Literal.String.Char */ +.highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ +.highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ +.highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ +.highlight .se { color: #ed9d13 } /* Literal.String.Escape */ +.highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +.highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ +.highlight .sx { color: #ffa500 } /* Literal.String.Other */ +.highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ +.highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ +.highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ +.highlight .bp { color: #24909d } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #447fcf } /* Name.Function.Magic */ +.highlight .vc { color: #40ffff } /* Name.Variable.Class */ +.highlight .vg { color: #40ffff } /* Name.Variable.Global */ +.highlight .vi { color: #40ffff } /* Name.Variable.Instance */ +.highlight .vm { color: #40ffff } /* Name.Variable.Magic */ +.highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #404040 } +.literal-block { background: #202020; color: #d0d0d0 } +.literal-block .c { color: #999999; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .esc { color: #d0d0d0 } /* Escape */ +.literal-block .g { color: #d0d0d0 } /* Generic */ +.literal-block .k { color: #6ab825; font-weight: bold } /* Keyword */ +.literal-block .l { color: #d0d0d0 } /* Literal */ +.literal-block .n { color: #d0d0d0 } /* Name */ +.literal-block .o { color: #d0d0d0 } /* Operator */ +.literal-block .x { color: #d0d0d0 } /* Other */ +.literal-block .p { color: #d0d0d0 } /* Punctuation */ +.literal-block .ch { color: #999999; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #999999; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */ +.literal-block .cpf { color: #999999; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #999999; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +.literal-block .gd { color: #d22323 } /* Generic.Deleted */ +.literal-block .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #d22323 } /* Generic.Error */ +.literal-block .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #589819 } /* Generic.Inserted */ +.literal-block .go { color: #cccccc } /* Generic.Output */ +.literal-block .gp { color: #aaaaaa } /* Generic.Prompt */ +.literal-block .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +.literal-block .gt { color: #d22323 } /* Generic.Traceback */ +.literal-block .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #6ab825 } /* Keyword.Pseudo */ +.literal-block .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */ +.literal-block .ld { color: #d0d0d0 } /* Literal.Date */ +.literal-block .m { color: #3677a9 } /* Literal.Number */ +.literal-block .s { color: #ed9d13 } /* Literal.String */ +.literal-block .na { color: #bbbbbb } /* Name.Attribute */ +.literal-block .nb { color: #24909d } /* Name.Builtin */ +.literal-block .nc { color: #447fcf; text-decoration: underline } /* Name.Class */ +.literal-block .no { color: #40ffff } /* Name.Constant */ +.literal-block .nd { color: #ffa500 } /* Name.Decorator */ +.literal-block .ni { color: #d0d0d0 } /* Name.Entity */ +.literal-block .ne { color: #bbbbbb } /* Name.Exception */ +.literal-block .nf { color: #447fcf } /* Name.Function */ +.literal-block .nl { color: #d0d0d0 } /* Name.Label */ +.literal-block .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */ +.literal-block .nx { color: #d0d0d0 } /* Name.Other */ +.literal-block .py { color: #d0d0d0 } /* Name.Property */ +.literal-block .nt { color: #6ab825; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #40ffff } /* Name.Variable */ +.literal-block .ow { color: #6ab825; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #666666 } /* Text.Whitespace */ +.literal-block .mb { color: #3677a9 } /* Literal.Number.Bin */ +.literal-block .mf { color: #3677a9 } /* Literal.Number.Float */ +.literal-block .mh { color: #3677a9 } /* Literal.Number.Hex */ +.literal-block .mi { color: #3677a9 } /* Literal.Number.Integer */ +.literal-block .mo { color: #3677a9 } /* Literal.Number.Oct */ +.literal-block .sa { color: #ed9d13 } /* Literal.String.Affix */ +.literal-block .sb { color: #ed9d13 } /* Literal.String.Backtick */ +.literal-block .sc { color: #ed9d13 } /* Literal.String.Char */ +.literal-block .dl { color: #ed9d13 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #ed9d13 } /* Literal.String.Doc */ +.literal-block .s2 { color: #ed9d13 } /* Literal.String.Double */ +.literal-block .se { color: #ed9d13 } /* Literal.String.Escape */ +.literal-block .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +.literal-block .si { color: #ed9d13 } /* Literal.String.Interpol */ +.literal-block .sx { color: #ffa500 } /* Literal.String.Other */ +.literal-block .sr { color: #ed9d13 } /* Literal.String.Regex */ +.literal-block .s1 { color: #ed9d13 } /* Literal.String.Single */ +.literal-block .ss { color: #ed9d13 } /* Literal.String.Symbol */ +.literal-block .bp { color: #24909d } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #447fcf } /* Name.Function.Magic */ +.literal-block .vc { color: #40ffff } /* Name.Variable.Class */ +.literal-block .vg { color: #40ffff } /* Name.Variable.Global */ +.literal-block .vi { color: #40ffff } /* Name.Variable.Instance */ +.literal-block .vm { color: #40ffff } /* Name.Variable.Magic */ +.literal-block .il { color: #3677a9 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/native.min.css b/theme/pygments/native.min.css new file mode 100644 index 00000000..cc83fc4e --- /dev/null +++ b/theme/pygments/native.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#404040}.highlight{background:#202020;color:#d0d0d0}.highlight .c{color:#999;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .esc,.highlight .g{color:#d0d0d0}.highlight .k{color:#6ab825;font-weight:700}.highlight .l,.highlight .n,.highlight .o,.highlight .p,.highlight .x{color:#d0d0d0}.highlight .ch,.highlight .cm{color:#999;font-style:italic}.highlight .cp{color:#cd2828;font-weight:700}.highlight .c1,.highlight .cpf{color:#999;font-style:italic}.highlight .cs{color:#e50808;font-weight:700;background-color:#520000}.highlight .gd{color:#d22323}.highlight .ge{color:#d0d0d0;font-style:italic}.highlight .gr{color:#d22323}.highlight .gh{color:#fff;font-weight:700}.highlight .gi{color:#589819}.highlight .go{color:#ccc}.highlight .gp{color:#aaa}.highlight .gs{color:#d0d0d0;font-weight:700}.highlight .gu{color:#fff;text-decoration:underline}.highlight .gt{color:#d22323}.highlight .kc,.highlight .kd,.highlight .kn{color:#6ab825;font-weight:700}.highlight .kp{color:#6ab825}.highlight .kr,.highlight .kt{color:#6ab825;font-weight:700}.highlight .ld{color:#d0d0d0}.highlight .m{color:#3677a9}.highlight .s{color:#ed9d13}.highlight .na{color:#bbb}.highlight .nb{color:#24909d}.highlight .nc{color:#447fcf;text-decoration:underline}.highlight .no{color:#40ffff}.highlight .nd{color:orange}.highlight .ni{color:#d0d0d0}.highlight .ne{color:#bbb}.highlight .nf{color:#447fcf}.highlight .nl{color:#d0d0d0}.highlight .nn{color:#447fcf;text-decoration:underline}.highlight .nx,.highlight .py{color:#d0d0d0}.highlight .nt{color:#6ab825;font-weight:700}.highlight .nv{color:#40ffff}.highlight .ow{color:#6ab825;font-weight:700}.highlight .w{color:#666}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#3677a9}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si{color:#ed9d13}.highlight .sx{color:orange}.highlight .s1,.highlight .sr,.highlight .ss{color:#ed9d13}.highlight .bp{color:#24909d}.highlight .fm{color:#447fcf}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#40ffff}.highlight .il{color:#3677a9}.literal-block .hll{background-color:#404040}.literal-block{background:#202020;color:#d0d0d0}.literal-block .c{color:#999;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .esc,.literal-block .g{color:#d0d0d0}.literal-block .k{color:#6ab825;font-weight:700}.literal-block .l,.literal-block .n,.literal-block .o,.literal-block .p,.literal-block .x{color:#d0d0d0}.literal-block .ch,.literal-block .cm{color:#999;font-style:italic}.literal-block .cp{color:#cd2828;font-weight:700}.literal-block .c1,.literal-block .cpf{color:#999;font-style:italic}.literal-block .cs{color:#e50808;font-weight:700;background-color:#520000}.literal-block .gd{color:#d22323}.literal-block .ge{color:#d0d0d0;font-style:italic}.literal-block .gr{color:#d22323}.literal-block .gh{color:#fff;font-weight:700}.literal-block .gi{color:#589819}.literal-block .go{color:#ccc}.literal-block .gp{color:#aaa}.literal-block .gs{color:#d0d0d0;font-weight:700}.literal-block .gu{color:#fff;text-decoration:underline}.literal-block .gt{color:#d22323}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#6ab825;font-weight:700}.literal-block .kp{color:#6ab825}.literal-block .kr,.literal-block .kt{color:#6ab825;font-weight:700}.literal-block .ld{color:#d0d0d0}.literal-block .m{color:#3677a9}.literal-block .s{color:#ed9d13}.literal-block .na{color:#bbb}.literal-block .nb{color:#24909d}.literal-block .nc{color:#447fcf;text-decoration:underline}.literal-block .no{color:#40ffff}.literal-block .nd{color:orange}.literal-block .ni{color:#d0d0d0}.literal-block .ne{color:#bbb}.literal-block .nf{color:#447fcf}.literal-block .nl{color:#d0d0d0}.literal-block .nn{color:#447fcf;text-decoration:underline}.literal-block .nx,.literal-block .py{color:#d0d0d0}.literal-block .nt{color:#6ab825;font-weight:700}.literal-block .nv{color:#40ffff}.literal-block .ow{color:#6ab825;font-weight:700}.literal-block .w{color:#666}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#3677a9}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si{color:#ed9d13}.literal-block .sx{color:orange}.literal-block .s1,.literal-block .sr,.literal-block .ss{color:#ed9d13}.literal-block .bp{color:#24909d}.literal-block .fm{color:#447fcf}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#40ffff}.literal-block .il{color:#3677a9} \ No newline at end of file diff --git a/theme/pygments/paraiso-dark.css b/theme/pygments/paraiso-dark.css new file mode 100644 index 00000000..87065dc9 --- /dev/null +++ b/theme/pygments/paraiso-dark.css @@ -0,0 +1,144 @@ +.highlight .hll { background-color: #4f424c } +.highlight { background: #2f1e2e; color: #e7e9db } +.highlight .c { color: #776e71 } /* Comment */ +.highlight .err { color: #ef6155 } /* Error */ +.highlight .k { color: #815ba4 } /* Keyword */ +.highlight .l { color: #f99b15 } /* Literal */ +.highlight .n { color: #e7e9db } /* Name */ +.highlight .o { color: #5bc4bf } /* Operator */ +.highlight .p { color: #e7e9db } /* Punctuation */ +.highlight .ch { color: #776e71 } /* Comment.Hashbang */ +.highlight .cm { color: #776e71 } /* Comment.Multiline */ +.highlight .cp { color: #776e71 } /* Comment.Preproc */ +.highlight .cpf { color: #776e71 } /* Comment.PreprocFile */ +.highlight .c1 { color: #776e71 } /* Comment.Single */ +.highlight .cs { color: #776e71 } /* Comment.Special */ +.highlight .gd { color: #ef6155 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gh { color: #e7e9db; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #48b685 } /* Generic.Inserted */ +.highlight .gp { color: #776e71; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #5bc4bf; font-weight: bold } /* Generic.Subheading */ +.highlight .kc { color: #815ba4 } /* Keyword.Constant */ +.highlight .kd { color: #815ba4 } /* Keyword.Declaration */ +.highlight .kn { color: #5bc4bf } /* Keyword.Namespace */ +.highlight .kp { color: #815ba4 } /* Keyword.Pseudo */ +.highlight .kr { color: #815ba4 } /* Keyword.Reserved */ +.highlight .kt { color: #fec418 } /* Keyword.Type */ +.highlight .ld { color: #48b685 } /* Literal.Date */ +.highlight .m { color: #f99b15 } /* Literal.Number */ +.highlight .s { color: #48b685 } /* Literal.String */ +.highlight .na { color: #06b6ef } /* Name.Attribute */ +.highlight .nb { color: #e7e9db } /* Name.Builtin */ +.highlight .nc { color: #fec418 } /* Name.Class */ +.highlight .no { color: #ef6155 } /* Name.Constant */ +.highlight .nd { color: #5bc4bf } /* Name.Decorator */ +.highlight .ni { color: #e7e9db } /* Name.Entity */ +.highlight .ne { color: #ef6155 } /* Name.Exception */ +.highlight .nf { color: #06b6ef } /* Name.Function */ +.highlight .nl { color: #e7e9db } /* Name.Label */ +.highlight .nn { color: #fec418 } /* Name.Namespace */ +.highlight .nx { color: #06b6ef } /* Name.Other */ +.highlight .py { color: #e7e9db } /* Name.Property */ +.highlight .nt { color: #5bc4bf } /* Name.Tag */ +.highlight .nv { color: #ef6155 } /* Name.Variable */ +.highlight .ow { color: #5bc4bf } /* Operator.Word */ +.highlight .w { color: #e7e9db } /* Text.Whitespace */ +.highlight .mb { color: #f99b15 } /* Literal.Number.Bin */ +.highlight .mf { color: #f99b15 } /* Literal.Number.Float */ +.highlight .mh { color: #f99b15 } /* Literal.Number.Hex */ +.highlight .mi { color: #f99b15 } /* Literal.Number.Integer */ +.highlight .mo { color: #f99b15 } /* Literal.Number.Oct */ +.highlight .sa { color: #48b685 } /* Literal.String.Affix */ +.highlight .sb { color: #48b685 } /* Literal.String.Backtick */ +.highlight .sc { color: #e7e9db } /* Literal.String.Char */ +.highlight .dl { color: #48b685 } /* Literal.String.Delimiter */ +.highlight .sd { color: #776e71 } /* Literal.String.Doc */ +.highlight .s2 { color: #48b685 } /* Literal.String.Double */ +.highlight .se { color: #f99b15 } /* Literal.String.Escape */ +.highlight .sh { color: #48b685 } /* Literal.String.Heredoc */ +.highlight .si { color: #f99b15 } /* Literal.String.Interpol */ +.highlight .sx { color: #48b685 } /* Literal.String.Other */ +.highlight .sr { color: #48b685 } /* Literal.String.Regex */ +.highlight .s1 { color: #48b685 } /* Literal.String.Single */ +.highlight .ss { color: #48b685 } /* Literal.String.Symbol */ +.highlight .bp { color: #e7e9db } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06b6ef } /* Name.Function.Magic */ +.highlight .vc { color: #ef6155 } /* Name.Variable.Class */ +.highlight .vg { color: #ef6155 } /* Name.Variable.Global */ +.highlight .vi { color: #ef6155 } /* Name.Variable.Instance */ +.highlight .vm { color: #ef6155 } /* Name.Variable.Magic */ +.highlight .il { color: #f99b15 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #4f424c } +.literal-block { background: #2f1e2e; color: #e7e9db } +.literal-block .c { color: #776e71 } /* Comment */ +.literal-block .err { color: #ef6155 } /* Error */ +.literal-block .k { color: #815ba4 } /* Keyword */ +.literal-block .l { color: #f99b15 } /* Literal */ +.literal-block .n { color: #e7e9db } /* Name */ +.literal-block .o { color: #5bc4bf } /* Operator */ +.literal-block .p { color: #e7e9db } /* Punctuation */ +.literal-block .ch { color: #776e71 } /* Comment.Hashbang */ +.literal-block .cm { color: #776e71 } /* Comment.Multiline */ +.literal-block .cp { color: #776e71 } /* Comment.Preproc */ +.literal-block .cpf { color: #776e71 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #776e71 } /* Comment.Single */ +.literal-block .cs { color: #776e71 } /* Comment.Special */ +.literal-block .gd { color: #ef6155 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gh { color: #e7e9db; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #48b685 } /* Generic.Inserted */ +.literal-block .gp { color: #776e71; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #5bc4bf; font-weight: bold } /* Generic.Subheading */ +.literal-block .kc { color: #815ba4 } /* Keyword.Constant */ +.literal-block .kd { color: #815ba4 } /* Keyword.Declaration */ +.literal-block .kn { color: #5bc4bf } /* Keyword.Namespace */ +.literal-block .kp { color: #815ba4 } /* Keyword.Pseudo */ +.literal-block .kr { color: #815ba4 } /* Keyword.Reserved */ +.literal-block .kt { color: #fec418 } /* Keyword.Type */ +.literal-block .ld { color: #48b685 } /* Literal.Date */ +.literal-block .m { color: #f99b15 } /* Literal.Number */ +.literal-block .s { color: #48b685 } /* Literal.String */ +.literal-block .na { color: #06b6ef } /* Name.Attribute */ +.literal-block .nb { color: #e7e9db } /* Name.Builtin */ +.literal-block .nc { color: #fec418 } /* Name.Class */ +.literal-block .no { color: #ef6155 } /* Name.Constant */ +.literal-block .nd { color: #5bc4bf } /* Name.Decorator */ +.literal-block .ni { color: #e7e9db } /* Name.Entity */ +.literal-block .ne { color: #ef6155 } /* Name.Exception */ +.literal-block .nf { color: #06b6ef } /* Name.Function */ +.literal-block .nl { color: #e7e9db } /* Name.Label */ +.literal-block .nn { color: #fec418 } /* Name.Namespace */ +.literal-block .nx { color: #06b6ef } /* Name.Other */ +.literal-block .py { color: #e7e9db } /* Name.Property */ +.literal-block .nt { color: #5bc4bf } /* Name.Tag */ +.literal-block .nv { color: #ef6155 } /* Name.Variable */ +.literal-block .ow { color: #5bc4bf } /* Operator.Word */ +.literal-block .w { color: #e7e9db } /* Text.Whitespace */ +.literal-block .mb { color: #f99b15 } /* Literal.Number.Bin */ +.literal-block .mf { color: #f99b15 } /* Literal.Number.Float */ +.literal-block .mh { color: #f99b15 } /* Literal.Number.Hex */ +.literal-block .mi { color: #f99b15 } /* Literal.Number.Integer */ +.literal-block .mo { color: #f99b15 } /* Literal.Number.Oct */ +.literal-block .sa { color: #48b685 } /* Literal.String.Affix */ +.literal-block .sb { color: #48b685 } /* Literal.String.Backtick */ +.literal-block .sc { color: #e7e9db } /* Literal.String.Char */ +.literal-block .dl { color: #48b685 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #776e71 } /* Literal.String.Doc */ +.literal-block .s2 { color: #48b685 } /* Literal.String.Double */ +.literal-block .se { color: #f99b15 } /* Literal.String.Escape */ +.literal-block .sh { color: #48b685 } /* Literal.String.Heredoc */ +.literal-block .si { color: #f99b15 } /* Literal.String.Interpol */ +.literal-block .sx { color: #48b685 } /* Literal.String.Other */ +.literal-block .sr { color: #48b685 } /* Literal.String.Regex */ +.literal-block .s1 { color: #48b685 } /* Literal.String.Single */ +.literal-block .ss { color: #48b685 } /* Literal.String.Symbol */ +.literal-block .bp { color: #e7e9db } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #06b6ef } /* Name.Function.Magic */ +.literal-block .vc { color: #ef6155 } /* Name.Variable.Class */ +.literal-block .vg { color: #ef6155 } /* Name.Variable.Global */ +.literal-block .vi { color: #ef6155 } /* Name.Variable.Instance */ +.literal-block .vm { color: #ef6155 } /* Name.Variable.Magic */ +.literal-block .il { color: #f99b15 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/paraiso-dark.min.css b/theme/pygments/paraiso-dark.min.css new file mode 100644 index 00000000..c64e7039 --- /dev/null +++ b/theme/pygments/paraiso-dark.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#4f424c}.highlight{background:#2f1e2e;color:#e7e9db}.highlight .c{color:#776e71}.highlight .err{color:#ef6155}.highlight .k{color:#815ba4}.highlight .l{color:#f99b15}.highlight .n{color:#e7e9db}.highlight .o{color:#5bc4bf}.highlight .p{color:#e7e9db}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#776e71}.highlight .gd{color:#ef6155}.highlight .ge{font-style:italic}.highlight .gh{color:#e7e9db;font-weight:700}.highlight .gi{color:#48b685}.highlight .gp{color:#776e71}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:#5bc4bf}.highlight .kc,.highlight .kd{color:#815ba4}.highlight .kn{color:#5bc4bf}.highlight .kp,.highlight .kr{color:#815ba4}.highlight .kt{color:#fec418}.highlight .ld{color:#48b685}.highlight .m{color:#f99b15}.highlight .s{color:#48b685}.highlight .na{color:#06b6ef}.highlight .nb{color:#e7e9db}.highlight .nc{color:#fec418}.highlight .no{color:#ef6155}.highlight .nd{color:#5bc4bf}.highlight .ni{color:#e7e9db}.highlight .ne{color:#ef6155}.highlight .nf{color:#06b6ef}.highlight .nl{color:#e7e9db}.highlight .nn{color:#fec418}.highlight .nx{color:#06b6ef}.highlight .py{color:#e7e9db}.highlight .nt{color:#5bc4bf}.highlight .nv{color:#ef6155}.highlight .ow{color:#5bc4bf}.highlight .w{color:#e7e9db}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#f99b15}.highlight .sa,.highlight .sb{color:#48b685}.highlight .sc{color:#e7e9db}.highlight .dl{color:#48b685}.highlight .sd{color:#776e71}.highlight .s2{color:#48b685}.highlight .se{color:#f99b15}.highlight .sh{color:#48b685}.highlight .si{color:#f99b15}.highlight .s1,.highlight .sr,.highlight .ss,.highlight .sx{color:#48b685}.highlight .bp{color:#e7e9db}.highlight .fm{color:#06b6ef}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#ef6155}.highlight .il{color:#f99b15}.literal-block .hll{background-color:#4f424c}.literal-block{background:#2f1e2e;color:#e7e9db}.literal-block .c{color:#776e71}.literal-block .err{color:#ef6155}.literal-block .k{color:#815ba4}.literal-block .l{color:#f99b15}.literal-block .n{color:#e7e9db}.literal-block .o{color:#5bc4bf}.literal-block .p{color:#e7e9db}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#776e71}.literal-block .gd{color:#ef6155}.literal-block .ge{font-style:italic}.literal-block .gh{color:#e7e9db;font-weight:700}.literal-block .gi{color:#48b685}.literal-block .gp{color:#776e71;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:#5bc4bf;font-weight:700}.literal-block .kc,.literal-block .kd{color:#815ba4}.literal-block .kn{color:#5bc4bf}.literal-block .kp,.literal-block .kr{color:#815ba4}.literal-block .kt{color:#fec418}.literal-block .ld{color:#48b685}.literal-block .m{color:#f99b15}.literal-block .s{color:#48b685}.literal-block .na{color:#06b6ef}.literal-block .nb{color:#e7e9db}.literal-block .nc{color:#fec418}.literal-block .no{color:#ef6155}.literal-block .nd{color:#5bc4bf}.literal-block .ni{color:#e7e9db}.literal-block .ne{color:#ef6155}.literal-block .nf{color:#06b6ef}.literal-block .nl{color:#e7e9db}.literal-block .nn{color:#fec418}.literal-block .nx{color:#06b6ef}.literal-block .py{color:#e7e9db}.literal-block .nt{color:#5bc4bf}.literal-block .nv{color:#ef6155}.literal-block .ow{color:#5bc4bf}.literal-block .w{color:#e7e9db}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#f99b15}.literal-block .sa,.literal-block .sb{color:#48b685}.literal-block .sc{color:#e7e9db}.literal-block .dl{color:#48b685}.literal-block .sd{color:#776e71}.literal-block .s2{color:#48b685}.literal-block .se{color:#f99b15}.literal-block .sh{color:#48b685}.literal-block .si{color:#f99b15}.literal-block .s1,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#48b685}.literal-block .bp{color:#e7e9db}.literal-block .fm{color:#06b6ef}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#ef6155}.literal-block .il{color:#f99b15} \ No newline at end of file diff --git a/theme/pygments/paraiso-light.css b/theme/pygments/paraiso-light.css new file mode 100644 index 00000000..39b1e6e1 --- /dev/null +++ b/theme/pygments/paraiso-light.css @@ -0,0 +1,144 @@ +.highlight .hll { background-color: #a39e9b } +.highlight { background: #e7e9db; color: #2f1e2e } +.highlight .c { color: #8d8687 } /* Comment */ +.highlight .err { color: #ef6155 } /* Error */ +.highlight .k { color: #815ba4 } /* Keyword */ +.highlight .l { color: #f99b15 } /* Literal */ +.highlight .n { color: #2f1e2e } /* Name */ +.highlight .o { color: #5bc4bf } /* Operator */ +.highlight .p { color: #2f1e2e } /* Punctuation */ +.highlight .ch { color: #8d8687 } /* Comment.Hashbang */ +.highlight .cm { color: #8d8687 } /* Comment.Multiline */ +.highlight .cp { color: #8d8687 } /* Comment.Preproc */ +.highlight .cpf { color: #8d8687 } /* Comment.PreprocFile */ +.highlight .c1 { color: #8d8687 } /* Comment.Single */ +.highlight .cs { color: #8d8687 } /* Comment.Special */ +.highlight .gd { color: #ef6155 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gh { color: #2f1e2e; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #48b685 } /* Generic.Inserted */ +.highlight .gp { color: #8d8687; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #5bc4bf; font-weight: bold } /* Generic.Subheading */ +.highlight .kc { color: #815ba4 } /* Keyword.Constant */ +.highlight .kd { color: #815ba4 } /* Keyword.Declaration */ +.highlight .kn { color: #5bc4bf } /* Keyword.Namespace */ +.highlight .kp { color: #815ba4 } /* Keyword.Pseudo */ +.highlight .kr { color: #815ba4 } /* Keyword.Reserved */ +.highlight .kt { color: #fec418 } /* Keyword.Type */ +.highlight .ld { color: #48b685 } /* Literal.Date */ +.highlight .m { color: #f99b15 } /* Literal.Number */ +.highlight .s { color: #48b685 } /* Literal.String */ +.highlight .na { color: #06b6ef } /* Name.Attribute */ +.highlight .nb { color: #2f1e2e } /* Name.Builtin */ +.highlight .nc { color: #fec418 } /* Name.Class */ +.highlight .no { color: #ef6155 } /* Name.Constant */ +.highlight .nd { color: #5bc4bf } /* Name.Decorator */ +.highlight .ni { color: #2f1e2e } /* Name.Entity */ +.highlight .ne { color: #ef6155 } /* Name.Exception */ +.highlight .nf { color: #06b6ef } /* Name.Function */ +.highlight .nl { color: #2f1e2e } /* Name.Label */ +.highlight .nn { color: #fec418 } /* Name.Namespace */ +.highlight .nx { color: #06b6ef } /* Name.Other */ +.highlight .py { color: #2f1e2e } /* Name.Property */ +.highlight .nt { color: #5bc4bf } /* Name.Tag */ +.highlight .nv { color: #ef6155 } /* Name.Variable */ +.highlight .ow { color: #5bc4bf } /* Operator.Word */ +.highlight .w { color: #2f1e2e } /* Text.Whitespace */ +.highlight .mb { color: #f99b15 } /* Literal.Number.Bin */ +.highlight .mf { color: #f99b15 } /* Literal.Number.Float */ +.highlight .mh { color: #f99b15 } /* Literal.Number.Hex */ +.highlight .mi { color: #f99b15 } /* Literal.Number.Integer */ +.highlight .mo { color: #f99b15 } /* Literal.Number.Oct */ +.highlight .sa { color: #48b685 } /* Literal.String.Affix */ +.highlight .sb { color: #48b685 } /* Literal.String.Backtick */ +.highlight .sc { color: #2f1e2e } /* Literal.String.Char */ +.highlight .dl { color: #48b685 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8d8687 } /* Literal.String.Doc */ +.highlight .s2 { color: #48b685 } /* Literal.String.Double */ +.highlight .se { color: #f99b15 } /* Literal.String.Escape */ +.highlight .sh { color: #48b685 } /* Literal.String.Heredoc */ +.highlight .si { color: #f99b15 } /* Literal.String.Interpol */ +.highlight .sx { color: #48b685 } /* Literal.String.Other */ +.highlight .sr { color: #48b685 } /* Literal.String.Regex */ +.highlight .s1 { color: #48b685 } /* Literal.String.Single */ +.highlight .ss { color: #48b685 } /* Literal.String.Symbol */ +.highlight .bp { color: #2f1e2e } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06b6ef } /* Name.Function.Magic */ +.highlight .vc { color: #ef6155 } /* Name.Variable.Class */ +.highlight .vg { color: #ef6155 } /* Name.Variable.Global */ +.highlight .vi { color: #ef6155 } /* Name.Variable.Instance */ +.highlight .vm { color: #ef6155 } /* Name.Variable.Magic */ +.highlight .il { color: #f99b15 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #a39e9b } +.literal-block { background: #e7e9db; color: #2f1e2e } +.literal-block .c { color: #8d8687 } /* Comment */ +.literal-block .err { color: #ef6155 } /* Error */ +.literal-block .k { color: #815ba4 } /* Keyword */ +.literal-block .l { color: #f99b15 } /* Literal */ +.literal-block .n { color: #2f1e2e } /* Name */ +.literal-block .o { color: #5bc4bf } /* Operator */ +.literal-block .p { color: #2f1e2e } /* Punctuation */ +.literal-block .ch { color: #8d8687 } /* Comment.Hashbang */ +.literal-block .cm { color: #8d8687 } /* Comment.Multiline */ +.literal-block .cp { color: #8d8687 } /* Comment.Preproc */ +.literal-block .cpf { color: #8d8687 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #8d8687 } /* Comment.Single */ +.literal-block .cs { color: #8d8687 } /* Comment.Special */ +.literal-block .gd { color: #ef6155 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gh { color: #2f1e2e; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #48b685 } /* Generic.Inserted */ +.literal-block .gp { color: #8d8687; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #5bc4bf; font-weight: bold } /* Generic.Subheading */ +.literal-block .kc { color: #815ba4 } /* Keyword.Constant */ +.literal-block .kd { color: #815ba4 } /* Keyword.Declaration */ +.literal-block .kn { color: #5bc4bf } /* Keyword.Namespace */ +.literal-block .kp { color: #815ba4 } /* Keyword.Pseudo */ +.literal-block .kr { color: #815ba4 } /* Keyword.Reserved */ +.literal-block .kt { color: #fec418 } /* Keyword.Type */ +.literal-block .ld { color: #48b685 } /* Literal.Date */ +.literal-block .m { color: #f99b15 } /* Literal.Number */ +.literal-block .s { color: #48b685 } /* Literal.String */ +.literal-block .na { color: #06b6ef } /* Name.Attribute */ +.literal-block .nb { color: #2f1e2e } /* Name.Builtin */ +.literal-block .nc { color: #fec418 } /* Name.Class */ +.literal-block .no { color: #ef6155 } /* Name.Constant */ +.literal-block .nd { color: #5bc4bf } /* Name.Decorator */ +.literal-block .ni { color: #2f1e2e } /* Name.Entity */ +.literal-block .ne { color: #ef6155 } /* Name.Exception */ +.literal-block .nf { color: #06b6ef } /* Name.Function */ +.literal-block .nl { color: #2f1e2e } /* Name.Label */ +.literal-block .nn { color: #fec418 } /* Name.Namespace */ +.literal-block .nx { color: #06b6ef } /* Name.Other */ +.literal-block .py { color: #2f1e2e } /* Name.Property */ +.literal-block .nt { color: #5bc4bf } /* Name.Tag */ +.literal-block .nv { color: #ef6155 } /* Name.Variable */ +.literal-block .ow { color: #5bc4bf } /* Operator.Word */ +.literal-block .w { color: #2f1e2e } /* Text.Whitespace */ +.literal-block .mb { color: #f99b15 } /* Literal.Number.Bin */ +.literal-block .mf { color: #f99b15 } /* Literal.Number.Float */ +.literal-block .mh { color: #f99b15 } /* Literal.Number.Hex */ +.literal-block .mi { color: #f99b15 } /* Literal.Number.Integer */ +.literal-block .mo { color: #f99b15 } /* Literal.Number.Oct */ +.literal-block .sa { color: #48b685 } /* Literal.String.Affix */ +.literal-block .sb { color: #48b685 } /* Literal.String.Backtick */ +.literal-block .sc { color: #2f1e2e } /* Literal.String.Char */ +.literal-block .dl { color: #48b685 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #8d8687 } /* Literal.String.Doc */ +.literal-block .s2 { color: #48b685 } /* Literal.String.Double */ +.literal-block .se { color: #f99b15 } /* Literal.String.Escape */ +.literal-block .sh { color: #48b685 } /* Literal.String.Heredoc */ +.literal-block .si { color: #f99b15 } /* Literal.String.Interpol */ +.literal-block .sx { color: #48b685 } /* Literal.String.Other */ +.literal-block .sr { color: #48b685 } /* Literal.String.Regex */ +.literal-block .s1 { color: #48b685 } /* Literal.String.Single */ +.literal-block .ss { color: #48b685 } /* Literal.String.Symbol */ +.literal-block .bp { color: #2f1e2e } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #06b6ef } /* Name.Function.Magic */ +.literal-block .vc { color: #ef6155 } /* Name.Variable.Class */ +.literal-block .vg { color: #ef6155 } /* Name.Variable.Global */ +.literal-block .vi { color: #ef6155 } /* Name.Variable.Instance */ +.literal-block .vm { color: #ef6155 } /* Name.Variable.Magic */ +.literal-block .il { color: #f99b15 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/paraiso-light.min.css b/theme/pygments/paraiso-light.min.css new file mode 100644 index 00000000..4ad09c46 --- /dev/null +++ b/theme/pygments/paraiso-light.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#a39e9b}.highlight{background:#e7e9db;color:#2f1e2e}.highlight .c{color:#8d8687}.highlight .err{color:#ef6155}.highlight .k{color:#815ba4}.highlight .l{color:#f99b15}.highlight .n{color:#2f1e2e}.highlight .o{color:#5bc4bf}.highlight .p{color:#2f1e2e}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#8d8687}.highlight .gd{color:#ef6155}.highlight .ge{font-style:italic}.highlight .gh{color:#2f1e2e;font-weight:700}.highlight .gi{color:#48b685}.highlight .gp{color:#8d8687}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:#5bc4bf}.highlight .kc,.highlight .kd{color:#815ba4}.highlight .kn{color:#5bc4bf}.highlight .kp,.highlight .kr{color:#815ba4}.highlight .kt{color:#fec418}.highlight .ld{color:#48b685}.highlight .m{color:#f99b15}.highlight .s{color:#48b685}.highlight .na{color:#06b6ef}.highlight .nb{color:#2f1e2e}.highlight .nc{color:#fec418}.highlight .no{color:#ef6155}.highlight .nd{color:#5bc4bf}.highlight .ni{color:#2f1e2e}.highlight .ne{color:#ef6155}.highlight .nf{color:#06b6ef}.highlight .nl{color:#2f1e2e}.highlight .nn{color:#fec418}.highlight .nx{color:#06b6ef}.highlight .py{color:#2f1e2e}.highlight .nt{color:#5bc4bf}.highlight .nv{color:#ef6155}.highlight .ow{color:#5bc4bf}.highlight .w{color:#2f1e2e}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#f99b15}.highlight .sa,.highlight .sb{color:#48b685}.highlight .sc{color:#2f1e2e}.highlight .dl{color:#48b685}.highlight .sd{color:#8d8687}.highlight .s2{color:#48b685}.highlight .se{color:#f99b15}.highlight .sh{color:#48b685}.highlight .si{color:#f99b15}.highlight .s1,.highlight .sr,.highlight .ss,.highlight .sx{color:#48b685}.highlight .bp{color:#2f1e2e}.highlight .fm{color:#06b6ef}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#ef6155}.highlight .il{color:#f99b15}.literal-block .hll{background-color:#a39e9b}.literal-block{background:#e7e9db;color:#2f1e2e}.literal-block .c{color:#8d8687}.literal-block .err{color:#ef6155}.literal-block .k{color:#815ba4}.literal-block .l{color:#f99b15}.literal-block .n{color:#2f1e2e}.literal-block .o{color:#5bc4bf}.literal-block .p{color:#2f1e2e}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#8d8687}.literal-block .gd{color:#ef6155}.literal-block .ge{font-style:italic}.literal-block .gh{color:#2f1e2e;font-weight:700}.literal-block .gi{color:#48b685}.literal-block .gp{color:#8d8687;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:#5bc4bf;font-weight:700}.literal-block .kc,.literal-block .kd{color:#815ba4}.literal-block .kn{color:#5bc4bf}.literal-block .kp,.literal-block .kr{color:#815ba4}.literal-block .kt{color:#fec418}.literal-block .ld{color:#48b685}.literal-block .m{color:#f99b15}.literal-block .s{color:#48b685}.literal-block .na{color:#06b6ef}.literal-block .nb{color:#2f1e2e}.literal-block .nc{color:#fec418}.literal-block .no{color:#ef6155}.literal-block .nd{color:#5bc4bf}.literal-block .ni{color:#2f1e2e}.literal-block .ne{color:#ef6155}.literal-block .nf{color:#06b6ef}.literal-block .nl{color:#2f1e2e}.literal-block .nn{color:#fec418}.literal-block .nx{color:#06b6ef}.literal-block .py{color:#2f1e2e}.literal-block .nt{color:#5bc4bf}.literal-block .nv{color:#ef6155}.literal-block .ow{color:#5bc4bf}.literal-block .w{color:#2f1e2e}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#f99b15}.literal-block .sa,.literal-block .sb{color:#48b685}.literal-block .sc{color:#2f1e2e}.literal-block .dl{color:#48b685}.literal-block .sd{color:#8d8687}.literal-block .s2{color:#48b685}.literal-block .se{color:#f99b15}.literal-block .sh{color:#48b685}.literal-block .si{color:#f99b15}.literal-block .s1,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#48b685}.literal-block .bp{color:#2f1e2e}.literal-block .fm{color:#06b6ef}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#ef6155}.literal-block .il{color:#f99b15} \ No newline at end of file diff --git a/theme/pygments/pastie.css b/theme/pygments/pastie.css new file mode 100644 index 00000000..8e9374ed --- /dev/null +++ b/theme/pygments/pastie.css @@ -0,0 +1,136 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #333333 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #666666 } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008800 } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #336699 } /* Name.Attribute */ +.highlight .nb { color: #003388 } /* Name.Builtin */ +.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555 } /* Name.Decorator */ +.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #336699; font-style: italic } /* Name.Label */ +.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ +.highlight .py { color: #336699; font-weight: bold } /* Name.Property */ +.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #336699 } /* Name.Variable */ +.highlight .ow { color: #008800 } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ +.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ +.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ +.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ +.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ +.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700 } /* Name.Variable.Global */ +.highlight .vi { color: #3333bb } /* Name.Variable.Instance */ +.highlight .vm { color: #336699 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #888888 } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #008800; font-weight: bold } /* Keyword */ +.literal-block .ch { color: #888888 } /* Comment.Hashbang */ +.literal-block .cm { color: #888888 } /* Comment.Multiline */ +.literal-block .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ +.literal-block .cpf { color: #888888 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #888888 } /* Comment.Single */ +.literal-block .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ +.literal-block .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #aa0000 } /* Generic.Error */ +.literal-block .gh { color: #333333 } /* Generic.Heading */ +.literal-block .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #555555 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #666666 } /* Generic.Subheading */ +.literal-block .gt { color: #aa0000 } /* Generic.Traceback */ +.literal-block .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #008800 } /* Keyword.Pseudo */ +.literal-block .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #888888; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #0000DD; font-weight: bold } /* Literal.Number */ +.literal-block .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ +.literal-block .na { color: #336699 } /* Name.Attribute */ +.literal-block .nb { color: #003388 } /* Name.Builtin */ +.literal-block .nc { color: #bb0066; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #003366; font-weight: bold } /* Name.Constant */ +.literal-block .nd { color: #555555 } /* Name.Decorator */ +.literal-block .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #0066bb; font-weight: bold } /* Name.Function */ +.literal-block .nl { color: #336699; font-style: italic } /* Name.Label */ +.literal-block .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ +.literal-block .py { color: #336699; font-weight: bold } /* Name.Property */ +.literal-block .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #336699 } /* Name.Variable */ +.literal-block .ow { color: #008800 } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ +.literal-block .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ +.literal-block .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ +.literal-block .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ +.literal-block .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ +.literal-block .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ +.literal-block .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ +.literal-block .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ +.literal-block .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ +.literal-block .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ +.literal-block .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ +.literal-block .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ +.literal-block .bp { color: #003388 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ +.literal-block .vc { color: #336699 } /* Name.Variable.Class */ +.literal-block .vg { color: #dd7700 } /* Name.Variable.Global */ +.literal-block .vi { color: #3333bb } /* Name.Variable.Instance */ +.literal-block .vm { color: #336699 } /* Name.Variable.Magic */ +.literal-block .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/pastie.min.css b/theme/pygments/pastie.min.css new file mode 100644 index 00000000..a274bfcb --- /dev/null +++ b/theme/pygments/pastie.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#888}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:#080;font-weight:700}.highlight .ch,.highlight .cm{color:#888}.highlight .cp{color:#c00;font-weight:700}.highlight .c1,.highlight .cpf{color:#888}.highlight .cs{color:#c00;font-weight:700;background-color:#fff0f0}.highlight .gd{color:#000;background-color:#fdd}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#333}.highlight .gi{color:#000;background-color:#dfd}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:700}.highlight .gu{color:#666}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn{color:#080;font-weight:700}.highlight .kp{color:#080}.highlight .kr{color:#080;font-weight:700}.highlight .kt{color:#888;font-weight:700}.highlight .m{color:#00d;font-weight:700}.highlight .s{color:#d20;background-color:#fff0f0}.highlight .na{color:#369}.highlight .nb{color:#038}.highlight .nc{color:#b06;font-weight:700}.highlight .no{color:#036;font-weight:700}.highlight .nd{color:#555}.highlight .ne{color:#b06;font-weight:700}.highlight .nf{color:#06b;font-weight:700}.highlight .nl{color:#369;font-style:italic}.highlight .nn{color:#b06;font-weight:700}.highlight .py{color:#369;font-weight:700}.highlight .nt{color:#b06;font-weight:700}.highlight .nv{color:#369}.highlight .ow{color:#080}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#00d;font-weight:700}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd{color:#d20;background-color:#fff0f0}.highlight .se{color:#04d;background-color:#fff0f0}.highlight .sh{color:#d20;background-color:#fff0f0}.highlight .si{color:#33b;background-color:#fff0f0}.highlight .sx{color:#2b2;background-color:#f0fff0}.highlight .sr{color:#080;background-color:#fff0ff}.highlight .s1{color:#d20;background-color:#fff0f0}.highlight .ss{color:#a60;background-color:#fff0f0}.highlight .bp{color:#038}.highlight .fm{color:#06b;font-weight:700}.highlight .vc{color:#369}.highlight .vg{color:#d70}.highlight .vi{color:#33b}.highlight .vm{color:#369}.highlight .il{color:#00d;font-weight:700}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#888}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k{color:#080;font-weight:700}.literal-block .ch,.literal-block .cm{color:#888}.literal-block .cp{color:#c00;font-weight:700}.literal-block .c1,.literal-block .cpf{color:#888}.literal-block .cs{color:#c00;font-weight:700;background-color:#fff0f0}.literal-block .gd{color:#000;background-color:#fdd}.literal-block .ge{font-style:italic}.literal-block .gr{color:#a00}.literal-block .gh{color:#333}.literal-block .gi{color:#000;background-color:#dfd}.literal-block .go{color:#888}.literal-block .gp{color:#555}.literal-block .gs{font-weight:700}.literal-block .gu{color:#666}.literal-block .gt{color:#a00}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#080;font-weight:700}.literal-block .kp{color:#080}.literal-block .kr{color:#080;font-weight:700}.literal-block .kt{color:#888;font-weight:700}.literal-block .m{color:#00d;font-weight:700}.literal-block .s{color:#d20;background-color:#fff0f0}.literal-block .na{color:#369}.literal-block .nb{color:#038}.literal-block .nc{color:#b06;font-weight:700}.literal-block .no{color:#036;font-weight:700}.literal-block .nd{color:#555}.literal-block .ne{color:#b06;font-weight:700}.literal-block .nf{color:#06b;font-weight:700}.literal-block .nl{color:#369;font-style:italic}.literal-block .nn{color:#b06;font-weight:700}.literal-block .py{color:#369;font-weight:700}.literal-block .nt{color:#b06;font-weight:700}.literal-block .nv{color:#369}.literal-block .ow{color:#080}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#00d;font-weight:700}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd{color:#d20;background-color:#fff0f0}.literal-block .se{color:#04d;background-color:#fff0f0}.literal-block .sh{color:#d20;background-color:#fff0f0}.literal-block .si{color:#33b;background-color:#fff0f0}.literal-block .sx{color:#2b2;background-color:#f0fff0}.literal-block .sr{color:#080;background-color:#fff0ff}.literal-block .s1{color:#d20;background-color:#fff0f0}.literal-block .ss{color:#a60;background-color:#fff0f0}.literal-block .bp{color:#038}.literal-block .fm{color:#06b;font-weight:700}.literal-block .vc{color:#369}.literal-block .vg{color:#d70}.literal-block .vi{color:#33b}.literal-block .vm{color:#369}.literal-block .il{color:#00d;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/perldoc.css b/theme/pygments/perldoc.css new file mode 100644 index 00000000..3fc5a5b0 --- /dev/null +++ b/theme/pygments/perldoc.css @@ -0,0 +1,132 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeeedd; } +.highlight .c { color: #228B22 } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #8B008B; font-weight: bold } /* Keyword */ +.highlight .ch { color: #228B22 } /* Comment.Hashbang */ +.highlight .cm { color: #228B22 } /* Comment.Multiline */ +.highlight .cp { color: #1e889b } /* Comment.Preproc */ +.highlight .cpf { color: #228B22 } /* Comment.PreprocFile */ +.highlight .c1 { color: #228B22 } /* Comment.Single */ +.highlight .cs { color: #8B008B; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #aa0000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00aa00 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #8B008B; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #8B008B; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #8B008B; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #8B008B; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #8B008B; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #00688B; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #B452CD } /* Literal.Number */ +.highlight .s { color: #CD5555 } /* Literal.String */ +.highlight .na { color: #658b00 } /* Name.Attribute */ +.highlight .nb { color: #658b00 } /* Name.Builtin */ +.highlight .nc { color: #008b45; font-weight: bold } /* Name.Class */ +.highlight .no { color: #00688B } /* Name.Constant */ +.highlight .nd { color: #707a7c } /* Name.Decorator */ +.highlight .ne { color: #008b45; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #008b45 } /* Name.Function */ +.highlight .nn { color: #008b45; text-decoration: underline } /* Name.Namespace */ +.highlight .nt { color: #8B008B; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #00688B } /* Name.Variable */ +.highlight .ow { color: #8B008B } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #B452CD } /* Literal.Number.Bin */ +.highlight .mf { color: #B452CD } /* Literal.Number.Float */ +.highlight .mh { color: #B452CD } /* Literal.Number.Hex */ +.highlight .mi { color: #B452CD } /* Literal.Number.Integer */ +.highlight .mo { color: #B452CD } /* Literal.Number.Oct */ +.highlight .sa { color: #CD5555 } /* Literal.String.Affix */ +.highlight .sb { color: #CD5555 } /* Literal.String.Backtick */ +.highlight .sc { color: #CD5555 } /* Literal.String.Char */ +.highlight .dl { color: #CD5555 } /* Literal.String.Delimiter */ +.highlight .sd { color: #CD5555 } /* Literal.String.Doc */ +.highlight .s2 { color: #CD5555 } /* Literal.String.Double */ +.highlight .se { color: #CD5555 } /* Literal.String.Escape */ +.highlight .sh { color: #1c7e71; font-style: italic } /* Literal.String.Heredoc */ +.highlight .si { color: #CD5555 } /* Literal.String.Interpol */ +.highlight .sx { color: #cb6c20 } /* Literal.String.Other */ +.highlight .sr { color: #1c7e71 } /* Literal.String.Regex */ +.highlight .s1 { color: #CD5555 } /* Literal.String.Single */ +.highlight .ss { color: #CD5555 } /* Literal.String.Symbol */ +.highlight .bp { color: #658b00 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #008b45 } /* Name.Function.Magic */ +.highlight .vc { color: #00688B } /* Name.Variable.Class */ +.highlight .vg { color: #00688B } /* Name.Variable.Global */ +.highlight .vi { color: #00688B } /* Name.Variable.Instance */ +.highlight .vm { color: #00688B } /* Name.Variable.Magic */ +.highlight .il { color: #B452CD } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #eeeedd; } +.literal-block .c { color: #228B22 } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #8B008B; font-weight: bold } /* Keyword */ +.literal-block .ch { color: #228B22 } /* Comment.Hashbang */ +.literal-block .cm { color: #228B22 } /* Comment.Multiline */ +.literal-block .cp { color: #1e889b } /* Comment.Preproc */ +.literal-block .cpf { color: #228B22 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #228B22 } /* Comment.Single */ +.literal-block .cs { color: #8B008B; font-weight: bold } /* Comment.Special */ +.literal-block .gd { color: #aa0000 } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #aa0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00aa00 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #555555 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #aa0000 } /* Generic.Traceback */ +.literal-block .kc { color: #8B008B; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #8B008B; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #8B008B; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #8B008B; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #8B008B; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #00688B; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #B452CD } /* Literal.Number */ +.literal-block .s { color: #CD5555 } /* Literal.String */ +.literal-block .na { color: #658b00 } /* Name.Attribute */ +.literal-block .nb { color: #658b00 } /* Name.Builtin */ +.literal-block .nc { color: #008b45; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #00688B } /* Name.Constant */ +.literal-block .nd { color: #707a7c } /* Name.Decorator */ +.literal-block .ne { color: #008b45; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #008b45 } /* Name.Function */ +.literal-block .nn { color: #008b45; text-decoration: underline } /* Name.Namespace */ +.literal-block .nt { color: #8B008B; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #00688B } /* Name.Variable */ +.literal-block .ow { color: #8B008B } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #B452CD } /* Literal.Number.Bin */ +.literal-block .mf { color: #B452CD } /* Literal.Number.Float */ +.literal-block .mh { color: #B452CD } /* Literal.Number.Hex */ +.literal-block .mi { color: #B452CD } /* Literal.Number.Integer */ +.literal-block .mo { color: #B452CD } /* Literal.Number.Oct */ +.literal-block .sa { color: #CD5555 } /* Literal.String.Affix */ +.literal-block .sb { color: #CD5555 } /* Literal.String.Backtick */ +.literal-block .sc { color: #CD5555 } /* Literal.String.Char */ +.literal-block .dl { color: #CD5555 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #CD5555 } /* Literal.String.Doc */ +.literal-block .s2 { color: #CD5555 } /* Literal.String.Double */ +.literal-block .se { color: #CD5555 } /* Literal.String.Escape */ +.literal-block .sh { color: #1c7e71; font-style: italic } /* Literal.String.Heredoc */ +.literal-block .si { color: #CD5555 } /* Literal.String.Interpol */ +.literal-block .sx { color: #cb6c20 } /* Literal.String.Other */ +.literal-block .sr { color: #1c7e71 } /* Literal.String.Regex */ +.literal-block .s1 { color: #CD5555 } /* Literal.String.Single */ +.literal-block .ss { color: #CD5555 } /* Literal.String.Symbol */ +.literal-block .bp { color: #658b00 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #008b45 } /* Name.Function.Magic */ +.literal-block .vc { color: #00688B } /* Name.Variable.Class */ +.literal-block .vg { color: #00688B } /* Name.Variable.Global */ +.literal-block .vi { color: #00688B } /* Name.Variable.Instance */ +.literal-block .vm { color: #00688B } /* Name.Variable.Magic */ +.literal-block .il { color: #B452CD } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/perldoc.min.css b/theme/pygments/perldoc.min.css new file mode 100644 index 00000000..269a0e82 --- /dev/null +++ b/theme/pygments/perldoc.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#eed}.highlight .c{color:#228b22}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:#8b008b;font-weight:700}.highlight .ch,.highlight .cm{color:#228b22}.highlight .cp{color:#1e889b}.highlight .c1,.highlight .cpf{color:#228b22}.highlight .cs{color:#8b008b;font-weight:700}.highlight .gd{color:#a00}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#0a0}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:purple}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{color:#8b008b;font-weight:700}.highlight .kt{color:#00688b;font-weight:700}.highlight .m{color:#b452cd}.highlight .s{color:#cd5555}.highlight .na,.highlight .nb{color:#658b00}.highlight .nc{color:#008b45;font-weight:700}.highlight .no{color:#00688b}.highlight .nd{color:#707a7c}.highlight .ne{color:#008b45;font-weight:700}.highlight .nf{color:#008b45}.highlight .nn{color:#008b45;text-decoration:underline}.highlight .nt{color:#8b008b;font-weight:700}.highlight .nv{color:#00688b}.highlight .ow{color:#8b008b}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#b452cd}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se{color:#cd5555}.highlight .sh{color:#1c7e71;font-style:italic}.highlight .si{color:#cd5555}.highlight .sx{color:#cb6c20}.highlight .sr{color:#1c7e71}.highlight .s1,.highlight .ss{color:#cd5555}.highlight .bp{color:#658b00}.highlight .fm{color:#008b45}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#00688b}.highlight .il{color:#b452cd}.literal-block .hll{background-color:#ffc}.literal-block{background:#eed}.literal-block .c{color:#228b22}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k{color:#8b008b;font-weight:700}.literal-block .ch,.literal-block .cm{color:#228b22}.literal-block .cp{color:#1e889b}.literal-block .c1,.literal-block .cpf{color:#228b22}.literal-block .cs{color:#8b008b;font-weight:700}.literal-block .gd{color:#a00}.literal-block .ge{font-style:italic}.literal-block .gr{color:#a00}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#0a0}.literal-block .go{color:#888}.literal-block .gp{color:#555}.literal-block .gs{font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#a00}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{color:#8b008b;font-weight:700}.literal-block .kt{color:#00688b;font-weight:700}.literal-block .m{color:#b452cd}.literal-block .s{color:#cd5555}.literal-block .na,.literal-block .nb{color:#658b00}.literal-block .nc{color:#008b45;font-weight:700}.literal-block .no{color:#00688b}.literal-block .nd{color:#707a7c}.literal-block .ne{color:#008b45;font-weight:700}.literal-block .nf{color:#008b45}.literal-block .nn{color:#008b45;text-decoration:underline}.literal-block .nt{color:#8b008b;font-weight:700}.literal-block .nv{color:#00688b}.literal-block .ow{color:#8b008b}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#b452cd}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se{color:#cd5555}.literal-block .sh{color:#1c7e71;font-style:italic}.literal-block .si{color:#cd5555}.literal-block .sx{color:#cb6c20}.literal-block .sr{color:#1c7e71}.literal-block .s1,.literal-block .ss{color:#cd5555}.literal-block .bp{color:#658b00}.literal-block .fm{color:#008b45}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#00688b}.literal-block .il{color:#b452cd} \ No newline at end of file diff --git a/theme/pygments/rainbow_dash.css b/theme/pygments/rainbow_dash.css new file mode 100644 index 00000000..472392de --- /dev/null +++ b/theme/pygments/rainbow_dash.css @@ -0,0 +1,124 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; color: #4d4d4d } +.highlight .c { color: #0080ff; font-style: italic } /* Comment */ +.highlight .err { color: #ffffff; background-color: #cc0000 } /* Error */ +.highlight .k { color: #2c5dcd; font-weight: bold } /* Keyword */ +.highlight .o { color: #2c5dcd } /* Operator */ +.highlight .ch { color: #0080ff; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #0080ff; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #0080ff } /* Comment.Preproc */ +.highlight .cpf { color: #0080ff; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #0080ff; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #0080ff; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { background-color: #ffcccc; border: 1px solid #c5060b } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #ff0000 } /* Generic.Error */ +.highlight .gh { color: #2c5dcd; font-weight: bold } /* Generic.Heading */ +.highlight .gi { background-color: #ccffcc; border: 1px solid #00cc00 } /* Generic.Inserted */ +.highlight .go { color: #aaaaaa } /* Generic.Output */ +.highlight .gp { color: #2c5dcd; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #2c5dcd; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #c5060b } /* Generic.Traceback */ +.highlight .kc { color: #2c5dcd; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #2c5dcd; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #2c5dcd; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #2c5dcd } /* Keyword.Pseudo */ +.highlight .kr { color: #2c5dcd; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #5918bb; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #5918bb; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #00cc66 } /* Literal.String */ +.highlight .na { color: #2c5dcd; font-style: italic } /* Name.Attribute */ +.highlight .nb { color: #5918bb; font-weight: bold } /* Name.Builtin */ +.highlight .nc { text-decoration: underline } /* Name.Class */ +.highlight .no { color: #318495 } /* Name.Constant */ +.highlight .nd { color: #ff8000; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #5918bb; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #5918bb; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #ff8000; font-weight: bold } /* Name.Function */ +.highlight .nt { color: #2c5dcd; font-weight: bold } /* Name.Tag */ +.highlight .ow { color: #2c5dcd; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #cbcbcb } /* Text.Whitespace */ +.highlight .mb { color: #5918bb; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #5918bb; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #5918bb; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #5918bb; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #5918bb; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #00cc66 } /* Literal.String.Affix */ +.highlight .sb { color: #00cc66 } /* Literal.String.Backtick */ +.highlight .sc { color: #00cc66 } /* Literal.String.Char */ +.highlight .dl { color: #00cc66 } /* Literal.String.Delimiter */ +.highlight .sd { color: #00cc66; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #00cc66 } /* Literal.String.Double */ +.highlight .se { color: #c5060b; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #00cc66 } /* Literal.String.Heredoc */ +.highlight .si { color: #00cc66 } /* Literal.String.Interpol */ +.highlight .sx { color: #318495 } /* Literal.String.Other */ +.highlight .sr { color: #00cc66 } /* Literal.String.Regex */ +.highlight .s1 { color: #00cc66 } /* Literal.String.Single */ +.highlight .ss { color: #c5060b; font-weight: bold } /* Literal.String.Symbol */ +.highlight .bp { color: #5918bb; font-weight: bold } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #ff8000; font-weight: bold } /* Name.Function.Magic */ +.highlight .il { color: #5918bb; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; color: #4d4d4d } +.literal-block .c { color: #0080ff; font-style: italic } /* Comment */ +.literal-block .err { color: #ffffff; background-color: #cc0000 } /* Error */ +.literal-block .k { color: #2c5dcd; font-weight: bold } /* Keyword */ +.literal-block .o { color: #2c5dcd } /* Operator */ +.literal-block .ch { color: #0080ff; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #0080ff; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #0080ff } /* Comment.Preproc */ +.literal-block .cpf { color: #0080ff; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #0080ff; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #0080ff; font-weight: bold; font-style: italic } /* Comment.Special */ +.literal-block .gd { background-color: #ffcccc; border: 1px solid #c5060b } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #ff0000 } /* Generic.Error */ +.literal-block .gh { color: #2c5dcd; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { background-color: #ccffcc; border: 1px solid #00cc00 } /* Generic.Inserted */ +.literal-block .go { color: #aaaaaa } /* Generic.Output */ +.literal-block .gp { color: #2c5dcd; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #2c5dcd; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #c5060b } /* Generic.Traceback */ +.literal-block .kc { color: #2c5dcd; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #2c5dcd; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #2c5dcd; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #2c5dcd } /* Keyword.Pseudo */ +.literal-block .kr { color: #2c5dcd; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #5918bb; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #5918bb; font-weight: bold } /* Literal.Number */ +.literal-block .s { color: #00cc66 } /* Literal.String */ +.literal-block .na { color: #2c5dcd; font-style: italic } /* Name.Attribute */ +.literal-block .nb { color: #5918bb; font-weight: bold } /* Name.Builtin */ +.literal-block .nc { text-decoration: underline } /* Name.Class */ +.literal-block .no { color: #318495 } /* Name.Constant */ +.literal-block .nd { color: #ff8000; font-weight: bold } /* Name.Decorator */ +.literal-block .ni { color: #5918bb; font-weight: bold } /* Name.Entity */ +.literal-block .ne { color: #5918bb; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #ff8000; font-weight: bold } /* Name.Function */ +.literal-block .nt { color: #2c5dcd; font-weight: bold } /* Name.Tag */ +.literal-block .ow { color: #2c5dcd; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #cbcbcb } /* Text.Whitespace */ +.literal-block .mb { color: #5918bb; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #5918bb; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #5918bb; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #5918bb; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #5918bb; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { color: #00cc66 } /* Literal.String.Affix */ +.literal-block .sb { color: #00cc66 } /* Literal.String.Backtick */ +.literal-block .sc { color: #00cc66 } /* Literal.String.Char */ +.literal-block .dl { color: #00cc66 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #00cc66; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #00cc66 } /* Literal.String.Double */ +.literal-block .se { color: #c5060b; font-weight: bold } /* Literal.String.Escape */ +.literal-block .sh { color: #00cc66 } /* Literal.String.Heredoc */ +.literal-block .si { color: #00cc66 } /* Literal.String.Interpol */ +.literal-block .sx { color: #318495 } /* Literal.String.Other */ +.literal-block .sr { color: #00cc66 } /* Literal.String.Regex */ +.literal-block .s1 { color: #00cc66 } /* Literal.String.Single */ +.literal-block .ss { color: #c5060b; font-weight: bold } /* Literal.String.Symbol */ +.literal-block .bp { color: #5918bb; font-weight: bold } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #ff8000; font-weight: bold } /* Name.Function.Magic */ +.literal-block .il { color: #5918bb; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/rainbow_dash.min.css b/theme/pygments/rainbow_dash.min.css new file mode 100644 index 00000000..0413bdbc --- /dev/null +++ b/theme/pygments/rainbow_dash.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff;color:#4d4d4d}.highlight .c{color:#0080ff;font-style:italic}.highlight .err{color:#fff;background-color:#c00}.highlight .k{color:#2c5dcd;font-weight:700}.highlight .o{color:#2c5dcd}.highlight .ch,.highlight .cm{color:#0080ff;font-style:italic}.highlight .cp{color:#0080ff}.highlight .c1,.highlight .cpf,.highlight .cs{color:#0080ff;font-style:italic}.highlight .cs{font-weight:700}.highlight .gd{background-color:#fcc;border:1px solid #c5060b}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:#2c5dcd;font-weight:700}.highlight .gi{background-color:#cfc;border:1px solid #0c0}.highlight .go{color:#aaa}.highlight .gp{color:#2c5dcd}.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .gu{color:#2c5dcd}.highlight .gt{color:#c5060b}.highlight .kc,.highlight .kd,.highlight .kn{color:#2c5dcd;font-weight:700}.highlight .kp{color:#2c5dcd}.highlight .kr{color:#2c5dcd;font-weight:700}.highlight .kt,.highlight .m{color:#5918bb;font-weight:700}.highlight .s{color:#0c6}.highlight .na{color:#2c5dcd;font-style:italic}.highlight .nb{color:#5918bb;font-weight:700}.highlight .nc{text-decoration:underline}.highlight .no{color:#318495}.highlight .nd{color:#ff8000;font-weight:700}.highlight .ne,.highlight .ni{color:#5918bb;font-weight:700}.highlight .nf{color:#ff8000;font-weight:700}.highlight .nt,.highlight .ow{color:#2c5dcd;font-weight:700}.highlight .w{color:#cbcbcb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#5918bb;font-weight:700}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#0c6}.highlight .sd{color:#0c6;font-style:italic}.highlight .s2{color:#0c6}.highlight .se{color:#c5060b;font-weight:700}.highlight .sh,.highlight .si{color:#0c6}.highlight .sx{color:#318495}.highlight .s1,.highlight .sr{color:#0c6}.highlight .ss{color:#c5060b;font-weight:700}.highlight .bp{color:#5918bb;font-weight:700}.highlight .fm{color:#ff8000;font-weight:700}.highlight .il{color:#5918bb;font-weight:700}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff;color:#4d4d4d}.literal-block .c{color:#0080ff;font-style:italic}.literal-block .err{color:#fff;background-color:#c00}.literal-block .k{color:#2c5dcd;font-weight:700}.literal-block .o{color:#2c5dcd}.literal-block .ch,.literal-block .cm{color:#0080ff;font-style:italic}.literal-block .cp{color:#0080ff}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#0080ff;font-style:italic}.literal-block .cs{font-weight:700}.literal-block .gd{background-color:#fcc;border:1px solid #c5060b}.literal-block .ge{font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:#2c5dcd;font-weight:700}.literal-block .gi{background-color:#cfc;border:1px solid #0c0}.literal-block .go{color:#aaa}.literal-block .gp{color:#2c5dcd;font-weight:700}.literal-block .gs{font-weight:700}.literal-block .gu{color:#2c5dcd;font-weight:700}.literal-block .gt{color:#c5060b}.literal-block .kc,.literal-block .kd,.literal-block .kn{color:#2c5dcd;font-weight:700}.literal-block .kp{color:#2c5dcd}.literal-block .kr{color:#2c5dcd;font-weight:700}.literal-block .kt,.literal-block .m{color:#5918bb;font-weight:700}.literal-block .s{color:#0c6}.literal-block .na{color:#2c5dcd;font-style:italic}.literal-block .nb{color:#5918bb;font-weight:700}.literal-block .nc{text-decoration:underline}.literal-block .no{color:#318495}.literal-block .nd{color:#ff8000;font-weight:700}.literal-block .ne,.literal-block .ni{color:#5918bb;font-weight:700}.literal-block .nf{color:#ff8000;font-weight:700}.literal-block .nt,.literal-block .ow{color:#2c5dcd;font-weight:700}.literal-block .w{color:#cbcbcb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#5918bb;font-weight:700}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#0c6}.literal-block .sd{color:#0c6;font-style:italic}.literal-block .s2{color:#0c6}.literal-block .se{color:#c5060b;font-weight:700}.literal-block .sh,.literal-block .si{color:#0c6}.literal-block .sx{color:#318495}.literal-block .s1,.literal-block .sr{color:#0c6}.literal-block .ss{color:#c5060b;font-weight:700}.literal-block .bp{color:#5918bb;font-weight:700}.literal-block .fm{color:#ff8000;font-weight:700}.literal-block .il{color:#5918bb;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/rrt.css b/theme/pygments/rrt.css new file mode 100644 index 00000000..88bb32e2 --- /dev/null +++ b/theme/pygments/rrt.css @@ -0,0 +1,76 @@ +.highlight .hll { background-color: #0000ff } +.highlight { background: #000000; } +.highlight .c { color: #00ff00 } /* Comment */ +.highlight .k { color: #ff0000 } /* Keyword */ +.highlight .ch { color: #00ff00 } /* Comment.Hashbang */ +.highlight .cm { color: #00ff00 } /* Comment.Multiline */ +.highlight .cp { color: #e5e5e5 } /* Comment.Preproc */ +.highlight .cpf { color: #00ff00 } /* Comment.PreprocFile */ +.highlight .c1 { color: #00ff00 } /* Comment.Single */ +.highlight .cs { color: #00ff00 } /* Comment.Special */ +.highlight .kc { color: #ff0000 } /* Keyword.Constant */ +.highlight .kd { color: #ff0000 } /* Keyword.Declaration */ +.highlight .kn { color: #ff0000 } /* Keyword.Namespace */ +.highlight .kp { color: #ff0000 } /* Keyword.Pseudo */ +.highlight .kr { color: #ff0000 } /* Keyword.Reserved */ +.highlight .kt { color: #ee82ee } /* Keyword.Type */ +.highlight .s { color: #87ceeb } /* Literal.String */ +.highlight .no { color: #7fffd4 } /* Name.Constant */ +.highlight .nf { color: #ffff00 } /* Name.Function */ +.highlight .nv { color: #eedd82 } /* Name.Variable */ +.highlight .sa { color: #87ceeb } /* Literal.String.Affix */ +.highlight .sb { color: #87ceeb } /* Literal.String.Backtick */ +.highlight .sc { color: #87ceeb } /* Literal.String.Char */ +.highlight .dl { color: #87ceeb } /* Literal.String.Delimiter */ +.highlight .sd { color: #87ceeb } /* Literal.String.Doc */ +.highlight .s2 { color: #87ceeb } /* Literal.String.Double */ +.highlight .se { color: #87ceeb } /* Literal.String.Escape */ +.highlight .sh { color: #87ceeb } /* Literal.String.Heredoc */ +.highlight .si { color: #87ceeb } /* Literal.String.Interpol */ +.highlight .sx { color: #87ceeb } /* Literal.String.Other */ +.highlight .sr { color: #87ceeb } /* Literal.String.Regex */ +.highlight .s1 { color: #87ceeb } /* Literal.String.Single */ +.highlight .ss { color: #87ceeb } /* Literal.String.Symbol */ +.highlight .fm { color: #ffff00 } /* Name.Function.Magic */ +.highlight .vc { color: #eedd82 } /* Name.Variable.Class */ +.highlight .vg { color: #eedd82 } /* Name.Variable.Global */ +.highlight .vi { color: #eedd82 } /* Name.Variable.Instance */ +.highlight .vm { color: #eedd82 } /* Name.Variable.Magic */ +.literal-block .hll { background-color: #0000ff } +.literal-block { background: #000000; } +.literal-block .c { color: #00ff00 } /* Comment */ +.literal-block .k { color: #ff0000 } /* Keyword */ +.literal-block .ch { color: #00ff00 } /* Comment.Hashbang */ +.literal-block .cm { color: #00ff00 } /* Comment.Multiline */ +.literal-block .cp { color: #e5e5e5 } /* Comment.Preproc */ +.literal-block .cpf { color: #00ff00 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #00ff00 } /* Comment.Single */ +.literal-block .cs { color: #00ff00 } /* Comment.Special */ +.literal-block .kc { color: #ff0000 } /* Keyword.Constant */ +.literal-block .kd { color: #ff0000 } /* Keyword.Declaration */ +.literal-block .kn { color: #ff0000 } /* Keyword.Namespace */ +.literal-block .kp { color: #ff0000 } /* Keyword.Pseudo */ +.literal-block .kr { color: #ff0000 } /* Keyword.Reserved */ +.literal-block .kt { color: #ee82ee } /* Keyword.Type */ +.literal-block .s { color: #87ceeb } /* Literal.String */ +.literal-block .no { color: #7fffd4 } /* Name.Constant */ +.literal-block .nf { color: #ffff00 } /* Name.Function */ +.literal-block .nv { color: #eedd82 } /* Name.Variable */ +.literal-block .sa { color: #87ceeb } /* Literal.String.Affix */ +.literal-block .sb { color: #87ceeb } /* Literal.String.Backtick */ +.literal-block .sc { color: #87ceeb } /* Literal.String.Char */ +.literal-block .dl { color: #87ceeb } /* Literal.String.Delimiter */ +.literal-block .sd { color: #87ceeb } /* Literal.String.Doc */ +.literal-block .s2 { color: #87ceeb } /* Literal.String.Double */ +.literal-block .se { color: #87ceeb } /* Literal.String.Escape */ +.literal-block .sh { color: #87ceeb } /* Literal.String.Heredoc */ +.literal-block .si { color: #87ceeb } /* Literal.String.Interpol */ +.literal-block .sx { color: #87ceeb } /* Literal.String.Other */ +.literal-block .sr { color: #87ceeb } /* Literal.String.Regex */ +.literal-block .s1 { color: #87ceeb } /* Literal.String.Single */ +.literal-block .ss { color: #87ceeb } /* Literal.String.Symbol */ +.literal-block .fm { color: #ffff00 } /* Name.Function.Magic */ +.literal-block .vc { color: #eedd82 } /* Name.Variable.Class */ +.literal-block .vg { color: #eedd82 } /* Name.Variable.Global */ +.literal-block .vi { color: #eedd82 } /* Name.Variable.Instance */ +.literal-block .vm { color: #eedd82 } /* Name.Variable.Magic */ \ No newline at end of file diff --git a/theme/pygments/rrt.min.css b/theme/pygments/rrt.min.css new file mode 100644 index 00000000..8f6faf5b --- /dev/null +++ b/theme/pygments/rrt.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#00f}.highlight{background:#000}.highlight .c{color:#0f0}.highlight .k{color:red}.highlight .ch,.highlight .cm{color:#0f0}.highlight .cp{color:#e5e5e5}.highlight .c1,.highlight .cpf,.highlight .cs{color:#0f0}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{color:red}.highlight .kt{color:violet}.highlight .s{color:#87ceeb}.highlight .no{color:#7fffd4}.highlight .nf{color:#ff0}.highlight .nv{color:#eedd82}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#87ceeb}.highlight .fm{color:#ff0}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#eedd82}.literal-block .hll{background-color:#00f}.literal-block{background:#000}.literal-block .c{color:#0f0}.literal-block .k{color:red}.literal-block .ch,.literal-block .cm{color:#0f0}.literal-block .cp{color:#e5e5e5}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#0f0}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{color:red}.literal-block .kt{color:violet}.literal-block .s{color:#87ceeb}.literal-block .no{color:#7fffd4}.literal-block .nf{color:#ff0}.literal-block .nv{color:#eedd82}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#87ceeb}.literal-block .fm{color:#ff0}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#eedd82} \ No newline at end of file diff --git a/theme/pygments/sas.css b/theme/pygments/sas.css new file mode 100644 index 00000000..1749342e --- /dev/null +++ b/theme/pygments/sas.css @@ -0,0 +1,120 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .g { color: #2c2cff } /* Generic */ +.highlight .k { color: #2c2cff } /* Keyword */ +.highlight .x { background-color: #ffffe0 } /* Other */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008800; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #2c2cff } /* Generic.Deleted */ +.highlight .ge { color: #008800 } /* Generic.Emph */ +.highlight .gr { color: #d30202 } /* Generic.Error */ +.highlight .gh { color: #2c2cff } /* Generic.Heading */ +.highlight .gi { color: #2c2cff } /* Generic.Inserted */ +.highlight .go { color: #2c2cff } /* Generic.Output */ +.highlight .gp { color: #2c2cff } /* Generic.Prompt */ +.highlight .gs { color: #2c2cff } /* Generic.Strong */ +.highlight .gu { color: #2c2cff } /* Generic.Subheading */ +.highlight .gt { color: #2c2cff } /* Generic.Traceback */ +.highlight .kc { color: #2c2cff; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #2c2cff } /* Keyword.Declaration */ +.highlight .kn { color: #2c2cff } /* Keyword.Namespace */ +.highlight .kp { color: #2c2cff } /* Keyword.Pseudo */ +.highlight .kr { color: #353580; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #2c2cff } /* Keyword.Type */ +.highlight .m { color: #2e8b57; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #800080 } /* Literal.String */ +.highlight .nb { color: #2c2cff } /* Name.Builtin */ +.highlight .nf { font-weight: bold; font-style: italic } /* Name.Function */ +.highlight .nv { color: #2c2cff; font-weight: bold } /* Name.Variable */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #2e8b57; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #2e8b57; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #2e8b57; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #2e8b57; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #2e8b57; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #800080 } /* Literal.String.Affix */ +.highlight .sb { color: #800080 } /* Literal.String.Backtick */ +.highlight .sc { color: #800080 } /* Literal.String.Char */ +.highlight .dl { color: #800080 } /* Literal.String.Delimiter */ +.highlight .sd { color: #800080 } /* Literal.String.Doc */ +.highlight .s2 { color: #800080 } /* Literal.String.Double */ +.highlight .se { color: #800080 } /* Literal.String.Escape */ +.highlight .sh { color: #800080 } /* Literal.String.Heredoc */ +.highlight .si { color: #800080 } /* Literal.String.Interpol */ +.highlight .sx { color: #800080 } /* Literal.String.Other */ +.highlight .sr { color: #800080 } /* Literal.String.Regex */ +.highlight .s1 { color: #800080 } /* Literal.String.Single */ +.highlight .ss { color: #800080 } /* Literal.String.Symbol */ +.highlight .bp { color: #2c2cff } /* Name.Builtin.Pseudo */ +.highlight .fm { font-weight: bold; font-style: italic } /* Name.Function.Magic */ +.highlight .vc { color: #2c2cff; font-weight: bold } /* Name.Variable.Class */ +.highlight .vg { color: #2c2cff; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #2c2cff; font-weight: bold } /* Name.Variable.Instance */ +.highlight .vm { color: #2c2cff; font-weight: bold } /* Name.Variable.Magic */ +.highlight .il { color: #2e8b57; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #008800; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .g { color: #2c2cff } /* Generic */ +.literal-block .k { color: #2c2cff } /* Keyword */ +.literal-block .x { background-color: #ffffe0 } /* Other */ +.literal-block .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #008800; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #008800; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #2c2cff } /* Generic.Deleted */ +.literal-block .ge { color: #008800 } /* Generic.Emph */ +.literal-block .gr { color: #d30202 } /* Generic.Error */ +.literal-block .gh { color: #2c2cff } /* Generic.Heading */ +.literal-block .gi { color: #2c2cff } /* Generic.Inserted */ +.literal-block .go { color: #2c2cff } /* Generic.Output */ +.literal-block .gp { color: #2c2cff } /* Generic.Prompt */ +.literal-block .gs { color: #2c2cff } /* Generic.Strong */ +.literal-block .gu { color: #2c2cff } /* Generic.Subheading */ +.literal-block .gt { color: #2c2cff } /* Generic.Traceback */ +.literal-block .kc { color: #2c2cff; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #2c2cff } /* Keyword.Declaration */ +.literal-block .kn { color: #2c2cff } /* Keyword.Namespace */ +.literal-block .kp { color: #2c2cff } /* Keyword.Pseudo */ +.literal-block .kr { color: #353580; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #2c2cff } /* Keyword.Type */ +.literal-block .m { color: #2e8b57; font-weight: bold } /* Literal.Number */ +.literal-block .s { color: #800080 } /* Literal.String */ +.literal-block .nb { color: #2c2cff } /* Name.Builtin */ +.literal-block .nf { font-weight: bold; font-style: italic } /* Name.Function */ +.literal-block .nv { color: #2c2cff; font-weight: bold } /* Name.Variable */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #2e8b57; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #2e8b57; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #2e8b57; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #2e8b57; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #2e8b57; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { color: #800080 } /* Literal.String.Affix */ +.literal-block .sb { color: #800080 } /* Literal.String.Backtick */ +.literal-block .sc { color: #800080 } /* Literal.String.Char */ +.literal-block .dl { color: #800080 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #800080 } /* Literal.String.Doc */ +.literal-block .s2 { color: #800080 } /* Literal.String.Double */ +.literal-block .se { color: #800080 } /* Literal.String.Escape */ +.literal-block .sh { color: #800080 } /* Literal.String.Heredoc */ +.literal-block .si { color: #800080 } /* Literal.String.Interpol */ +.literal-block .sx { color: #800080 } /* Literal.String.Other */ +.literal-block .sr { color: #800080 } /* Literal.String.Regex */ +.literal-block .s1 { color: #800080 } /* Literal.String.Single */ +.literal-block .ss { color: #800080 } /* Literal.String.Symbol */ +.literal-block .bp { color: #2c2cff } /* Name.Builtin.Pseudo */ +.literal-block .fm { font-weight: bold; font-style: italic } /* Name.Function.Magic */ +.literal-block .vc { color: #2c2cff; font-weight: bold } /* Name.Variable.Class */ +.literal-block .vg { color: #2c2cff; font-weight: bold } /* Name.Variable.Global */ +.literal-block .vi { color: #2c2cff; font-weight: bold } /* Name.Variable.Instance */ +.literal-block .vm { color: #2c2cff; font-weight: bold } /* Name.Variable.Magic */ +.literal-block .il { color: #2e8b57; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/sas.min.css b/theme/pygments/sas.min.css new file mode 100644 index 00000000..3a4151a1 --- /dev/null +++ b/theme/pygments/sas.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#080;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .g,.highlight .k{color:#2c2cff}.highlight .x{background-color:#ffffe0}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#080;font-style:italic}.highlight .gd{color:#2c2cff}.highlight .ge{color:#080}.highlight .gr{color:#d30202}.highlight .gh,.highlight .gi,.highlight .go,.highlight .gp,.highlight .gs,.highlight .gt,.highlight .gu{color:#2c2cff}.highlight .kc{color:#2c2cff;font-weight:700}.highlight .kd,.highlight .kn,.highlight .kp{color:#2c2cff}.highlight .kr{color:#353580;font-weight:700}.highlight .kt{color:#2c2cff}.highlight .m{color:#2e8b57;font-weight:700}.highlight .s{color:purple}.highlight .nb{color:#2c2cff}.highlight .nf{font-weight:700;font-style:italic}.highlight .nv{color:#2c2cff;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#2e8b57;font-weight:700}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:purple}.highlight .bp{color:#2c2cff}.highlight .fm{font-weight:700;font-style:italic}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#2c2cff;font-weight:700}.highlight .il{color:#2e8b57;font-weight:700}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#080;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .g,.literal-block .k{color:#2c2cff}.literal-block .x{background-color:#ffffe0}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#080;font-style:italic}.literal-block .gd{color:#2c2cff}.literal-block .ge{color:#080}.literal-block .gr{color:#d30202}.literal-block .gh,.literal-block .gi,.literal-block .go,.literal-block .gp,.literal-block .gs,.literal-block .gt,.literal-block .gu{color:#2c2cff}.literal-block .kc{color:#2c2cff;font-weight:700}.literal-block .kd,.literal-block .kn,.literal-block .kp{color:#2c2cff}.literal-block .kr{color:#353580;font-weight:700}.literal-block .kt{color:#2c2cff}.literal-block .m{color:#2e8b57;font-weight:700}.literal-block .s{color:purple}.literal-block .nb{color:#2c2cff}.literal-block .nf{font-weight:700;font-style:italic}.literal-block .nv{color:#2c2cff;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#2e8b57;font-weight:700}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:purple}.literal-block .bp{color:#2c2cff}.literal-block .fm{font-weight:700;font-style:italic}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#2c2cff;font-weight:700}.literal-block .il{color:#2e8b57;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/solarized-dark.css b/theme/pygments/solarized-dark.css new file mode 100644 index 00000000..6aaa9a2b --- /dev/null +++ b/theme/pygments/solarized-dark.css @@ -0,0 +1,156 @@ +.highlight .hll { background-color: #073642 } +.highlight { background: #002b36; color: #839496 } +.highlight .c { color: #586e75; font-style: italic } /* Comment */ +.highlight .err { color: #839496; background-color: #dc322f } /* Error */ +.highlight .esc { color: #839496 } /* Escape */ +.highlight .g { color: #839496 } /* Generic */ +.highlight .k { color: #859900 } /* Keyword */ +.highlight .l { color: #839496 } /* Literal */ +.highlight .n { color: #839496 } /* Name */ +.highlight .o { color: #586e75 } /* Operator */ +.highlight .x { color: #839496 } /* Other */ +.highlight .p { color: #839496 } /* Punctuation */ +.highlight .ch { color: #586e75; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #586e75; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #d33682 } /* Comment.Preproc */ +.highlight .cpf { color: #586e75 } /* Comment.PreprocFile */ +.highlight .c1 { color: #586e75; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #586e75; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #dc322f } /* Generic.Deleted */ +.highlight .ge { color: #839496; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #dc322f } /* Generic.Error */ +.highlight .gh { color: #839496; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #859900 } /* Generic.Inserted */ +.highlight .go { color: #839496 } /* Generic.Output */ +.highlight .gp { color: #839496 } /* Generic.Prompt */ +.highlight .gs { color: #839496; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #839496; text-decoration: underline } /* Generic.Subheading */ +.highlight .gt { color: #268bd2 } /* Generic.Traceback */ +.highlight .kc { color: #2aa198 } /* Keyword.Constant */ +.highlight .kd { color: #2aa198 } /* Keyword.Declaration */ +.highlight .kn { color: #cb4b16 } /* Keyword.Namespace */ +.highlight .kp { color: #859900 } /* Keyword.Pseudo */ +.highlight .kr { color: #859900 } /* Keyword.Reserved */ +.highlight .kt { color: #b58900 } /* Keyword.Type */ +.highlight .ld { color: #839496 } /* Literal.Date */ +.highlight .m { color: #2aa198 } /* Literal.Number */ +.highlight .s { color: #2aa198 } /* Literal.String */ +.highlight .na { color: #839496 } /* Name.Attribute */ +.highlight .nb { color: #268bd2 } /* Name.Builtin */ +.highlight .nc { color: #268bd2 } /* Name.Class */ +.highlight .no { color: #268bd2 } /* Name.Constant */ +.highlight .nd { color: #268bd2 } /* Name.Decorator */ +.highlight .ni { color: #268bd2 } /* Name.Entity */ +.highlight .ne { color: #268bd2 } /* Name.Exception */ +.highlight .nf { color: #268bd2 } /* Name.Function */ +.highlight .nl { color: #268bd2 } /* Name.Label */ +.highlight .nn { color: #268bd2 } /* Name.Namespace */ +.highlight .nx { color: #839496 } /* Name.Other */ +.highlight .py { color: #839496 } /* Name.Property */ +.highlight .nt { color: #268bd2 } /* Name.Tag */ +.highlight .nv { color: #268bd2 } /* Name.Variable */ +.highlight .ow { color: #859900 } /* Operator.Word */ +.highlight .w { color: #839496 } /* Text.Whitespace */ +.highlight .mb { color: #2aa198 } /* Literal.Number.Bin */ +.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ +.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ +.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ +.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ +.highlight .sa { color: #2aa198 } /* Literal.String.Affix */ +.highlight .sb { color: #2aa198 } /* Literal.String.Backtick */ +.highlight .sc { color: #2aa198 } /* Literal.String.Char */ +.highlight .dl { color: #2aa198 } /* Literal.String.Delimiter */ +.highlight .sd { color: #586e75 } /* Literal.String.Doc */ +.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ +.highlight .se { color: #2aa198 } /* Literal.String.Escape */ +.highlight .sh { color: #2aa198 } /* Literal.String.Heredoc */ +.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ +.highlight .sx { color: #2aa198 } /* Literal.String.Other */ +.highlight .sr { color: #cb4b16 } /* Literal.String.Regex */ +.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ +.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ +.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #268bd2 } /* Name.Function.Magic */ +.highlight .vc { color: #268bd2 } /* Name.Variable.Class */ +.highlight .vg { color: #268bd2 } /* Name.Variable.Global */ +.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ +.highlight .vm { color: #268bd2 } /* Name.Variable.Magic */ +.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #073642 } +.literal-block { background: #002b36; color: #839496 } +.literal-block .c { color: #586e75; font-style: italic } /* Comment */ +.literal-block .err { color: #839496; background-color: #dc322f } /* Error */ +.literal-block .esc { color: #839496 } /* Escape */ +.literal-block .g { color: #839496 } /* Generic */ +.literal-block .k { color: #859900 } /* Keyword */ +.literal-block .l { color: #839496 } /* Literal */ +.literal-block .n { color: #839496 } /* Name */ +.literal-block .o { color: #586e75 } /* Operator */ +.literal-block .x { color: #839496 } /* Other */ +.literal-block .p { color: #839496 } /* Punctuation */ +.literal-block .ch { color: #586e75; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #586e75; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #d33682 } /* Comment.Preproc */ +.literal-block .cpf { color: #586e75 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #586e75; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #586e75; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #dc322f } /* Generic.Deleted */ +.literal-block .ge { color: #839496; font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #dc322f } /* Generic.Error */ +.literal-block .gh { color: #839496; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #859900 } /* Generic.Inserted */ +.literal-block .go { color: #839496 } /* Generic.Output */ +.literal-block .gp { color: #839496 } /* Generic.Prompt */ +.literal-block .gs { color: #839496; font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #839496; text-decoration: underline } /* Generic.Subheading */ +.literal-block .gt { color: #268bd2 } /* Generic.Traceback */ +.literal-block .kc { color: #2aa198 } /* Keyword.Constant */ +.literal-block .kd { color: #2aa198 } /* Keyword.Declaration */ +.literal-block .kn { color: #cb4b16 } /* Keyword.Namespace */ +.literal-block .kp { color: #859900 } /* Keyword.Pseudo */ +.literal-block .kr { color: #859900 } /* Keyword.Reserved */ +.literal-block .kt { color: #b58900 } /* Keyword.Type */ +.literal-block .ld { color: #839496 } /* Literal.Date */ +.literal-block .m { color: #2aa198 } /* Literal.Number */ +.literal-block .s { color: #2aa198 } /* Literal.String */ +.literal-block .na { color: #839496 } /* Name.Attribute */ +.literal-block .nb { color: #268bd2 } /* Name.Builtin */ +.literal-block .nc { color: #268bd2 } /* Name.Class */ +.literal-block .no { color: #268bd2 } /* Name.Constant */ +.literal-block .nd { color: #268bd2 } /* Name.Decorator */ +.literal-block .ni { color: #268bd2 } /* Name.Entity */ +.literal-block .ne { color: #268bd2 } /* Name.Exception */ +.literal-block .nf { color: #268bd2 } /* Name.Function */ +.literal-block .nl { color: #268bd2 } /* Name.Label */ +.literal-block .nn { color: #268bd2 } /* Name.Namespace */ +.literal-block .nx { color: #839496 } /* Name.Other */ +.literal-block .py { color: #839496 } /* Name.Property */ +.literal-block .nt { color: #268bd2 } /* Name.Tag */ +.literal-block .nv { color: #268bd2 } /* Name.Variable */ +.literal-block .ow { color: #859900 } /* Operator.Word */ +.literal-block .w { color: #839496 } /* Text.Whitespace */ +.literal-block .mb { color: #2aa198 } /* Literal.Number.Bin */ +.literal-block .mf { color: #2aa198 } /* Literal.Number.Float */ +.literal-block .mh { color: #2aa198 } /* Literal.Number.Hex */ +.literal-block .mi { color: #2aa198 } /* Literal.Number.Integer */ +.literal-block .mo { color: #2aa198 } /* Literal.Number.Oct */ +.literal-block .sa { color: #2aa198 } /* Literal.String.Affix */ +.literal-block .sb { color: #2aa198 } /* Literal.String.Backtick */ +.literal-block .sc { color: #2aa198 } /* Literal.String.Char */ +.literal-block .dl { color: #2aa198 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #586e75 } /* Literal.String.Doc */ +.literal-block .s2 { color: #2aa198 } /* Literal.String.Double */ +.literal-block .se { color: #2aa198 } /* Literal.String.Escape */ +.literal-block .sh { color: #2aa198 } /* Literal.String.Heredoc */ +.literal-block .si { color: #2aa198 } /* Literal.String.Interpol */ +.literal-block .sx { color: #2aa198 } /* Literal.String.Other */ +.literal-block .sr { color: #cb4b16 } /* Literal.String.Regex */ +.literal-block .s1 { color: #2aa198 } /* Literal.String.Single */ +.literal-block .ss { color: #2aa198 } /* Literal.String.Symbol */ +.literal-block .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #268bd2 } /* Name.Function.Magic */ +.literal-block .vc { color: #268bd2 } /* Name.Variable.Class */ +.literal-block .vg { color: #268bd2 } /* Name.Variable.Global */ +.literal-block .vi { color: #268bd2 } /* Name.Variable.Instance */ +.literal-block .vm { color: #268bd2 } /* Name.Variable.Magic */ +.literal-block .il { color: #2aa198 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/solarized-dark.min.css b/theme/pygments/solarized-dark.min.css new file mode 100644 index 00000000..a90efa53 --- /dev/null +++ b/theme/pygments/solarized-dark.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#073642}.highlight{background:#002b36;color:#839496}.highlight .c{color:#586e75;font-style:italic}.highlight .err{color:#839496;background-color:#dc322f}.highlight .esc,.highlight .g{color:#839496}.highlight .k{color:#859900}.highlight .l,.highlight .n{color:#839496}.highlight .o{color:#586e75}.highlight .p,.highlight .x{color:#839496}.highlight .ch,.highlight .cm{color:#586e75;font-style:italic}.highlight .cp{color:#d33682}.highlight .cpf{color:#586e75}.highlight .c1,.highlight .cs{color:#586e75;font-style:italic}.highlight .gd{color:#dc322f}.highlight .ge{color:#839496;font-style:italic}.highlight .gr{color:#dc322f}.highlight .gh{color:#839496;font-weight:700}.highlight .gi{color:#859900}.highlight .go,.highlight .gp{color:#839496}.highlight .gs{color:#839496;font-weight:700}.highlight .gu{color:#839496;text-decoration:underline}.highlight .gt{color:#268bd2}.highlight .kc,.highlight .kd{color:#2aa198}.highlight .kn{color:#cb4b16}.highlight .kp,.highlight .kr{color:#859900}.highlight .kt{color:#b58900}.highlight .ld{color:#839496}.highlight .m,.highlight .s{color:#2aa198}.highlight .na{color:#839496}.highlight .nb,.highlight .nc,.highlight .nd,.highlight .ne,.highlight .nf,.highlight .ni,.highlight .nl,.highlight .nn,.highlight .no{color:#268bd2}.highlight .nx,.highlight .py{color:#839496}.highlight .nt,.highlight .nv{color:#268bd2}.highlight .ow{color:#859900}.highlight .w{color:#839496}.highlight .dl,.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo,.highlight .sa,.highlight .sb,.highlight .sc{color:#2aa198}.highlight .sd{color:#586e75}.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#2aa198}.highlight .sr{color:#cb4b16}.highlight .s1,.highlight .ss{color:#2aa198}.highlight .bp,.highlight .fm,.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#268bd2}.highlight .il{color:#2aa198}.literal-block .hll{background-color:#073642}.literal-block{background:#002b36;color:#839496}.literal-block .c{color:#586e75;font-style:italic}.literal-block .err{color:#839496;background-color:#dc322f}.literal-block .esc,.literal-block .g{color:#839496}.literal-block .k{color:#859900}.literal-block .l,.literal-block .n{color:#839496}.literal-block .o{color:#586e75}.literal-block .p,.literal-block .x{color:#839496}.literal-block .ch,.literal-block .cm{color:#586e75;font-style:italic}.literal-block .cp{color:#d33682}.literal-block .cpf{color:#586e75}.literal-block .c1,.literal-block .cs{color:#586e75;font-style:italic}.literal-block .gd{color:#dc322f}.literal-block .ge{color:#839496;font-style:italic}.literal-block .gr{color:#dc322f}.literal-block .gh{color:#839496;font-weight:700}.literal-block .gi{color:#859900}.literal-block .go,.literal-block .gp{color:#839496}.literal-block .gs{color:#839496;font-weight:700}.literal-block .gu{color:#839496;text-decoration:underline}.literal-block .gt{color:#268bd2}.literal-block .kc,.literal-block .kd{color:#2aa198}.literal-block .kn{color:#cb4b16}.literal-block .kp,.literal-block .kr{color:#859900}.literal-block .kt{color:#b58900}.literal-block .ld{color:#839496}.literal-block .m,.literal-block .s{color:#2aa198}.literal-block .na{color:#839496}.literal-block .nb,.literal-block .nc,.literal-block .nd,.literal-block .ne,.literal-block .nf,.literal-block .ni,.literal-block .nl,.literal-block .nn,.literal-block .no{color:#268bd2}.literal-block .nx,.literal-block .py{color:#839496}.literal-block .nt,.literal-block .nv{color:#268bd2}.literal-block .ow{color:#859900}.literal-block .w{color:#839496}.literal-block .dl,.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#2aa198}.literal-block .sd{color:#586e75}.literal-block .s2,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sx{color:#2aa198}.literal-block .sr{color:#cb4b16}.literal-block .s1,.literal-block .ss{color:#2aa198}.literal-block .bp,.literal-block .fm,.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#268bd2}.literal-block .il{color:#2aa198} \ No newline at end of file diff --git a/theme/pygments/solarized-light.css b/theme/pygments/solarized-light.css new file mode 100644 index 00000000..9b18a22a --- /dev/null +++ b/theme/pygments/solarized-light.css @@ -0,0 +1,156 @@ +.highlight .hll { background-color: #eee8d5 } +.highlight { background: #fdf6e3; color: #657b83 } +.highlight .c { color: #93a1a1; font-style: italic } /* Comment */ +.highlight .err { color: #657b83; background-color: #dc322f } /* Error */ +.highlight .esc { color: #657b83 } /* Escape */ +.highlight .g { color: #657b83 } /* Generic */ +.highlight .k { color: #859900 } /* Keyword */ +.highlight .l { color: #657b83 } /* Literal */ +.highlight .n { color: #657b83 } /* Name */ +.highlight .o { color: #93a1a1 } /* Operator */ +.highlight .x { color: #657b83 } /* Other */ +.highlight .p { color: #657b83 } /* Punctuation */ +.highlight .ch { color: #93a1a1; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #93a1a1; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #d33682 } /* Comment.Preproc */ +.highlight .cpf { color: #93a1a1 } /* Comment.PreprocFile */ +.highlight .c1 { color: #93a1a1; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #93a1a1; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #dc322f } /* Generic.Deleted */ +.highlight .ge { color: #657b83; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #dc322f } /* Generic.Error */ +.highlight .gh { color: #657b83; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #859900 } /* Generic.Inserted */ +.highlight .go { color: #657b83 } /* Generic.Output */ +.highlight .gp { color: #657b83 } /* Generic.Prompt */ +.highlight .gs { color: #657b83; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #657b83; text-decoration: underline } /* Generic.Subheading */ +.highlight .gt { color: #268bd2 } /* Generic.Traceback */ +.highlight .kc { color: #2aa198 } /* Keyword.Constant */ +.highlight .kd { color: #2aa198 } /* Keyword.Declaration */ +.highlight .kn { color: #cb4b16 } /* Keyword.Namespace */ +.highlight .kp { color: #859900 } /* Keyword.Pseudo */ +.highlight .kr { color: #859900 } /* Keyword.Reserved */ +.highlight .kt { color: #b58900 } /* Keyword.Type */ +.highlight .ld { color: #657b83 } /* Literal.Date */ +.highlight .m { color: #2aa198 } /* Literal.Number */ +.highlight .s { color: #2aa198 } /* Literal.String */ +.highlight .na { color: #657b83 } /* Name.Attribute */ +.highlight .nb { color: #268bd2 } /* Name.Builtin */ +.highlight .nc { color: #268bd2 } /* Name.Class */ +.highlight .no { color: #268bd2 } /* Name.Constant */ +.highlight .nd { color: #268bd2 } /* Name.Decorator */ +.highlight .ni { color: #268bd2 } /* Name.Entity */ +.highlight .ne { color: #268bd2 } /* Name.Exception */ +.highlight .nf { color: #268bd2 } /* Name.Function */ +.highlight .nl { color: #268bd2 } /* Name.Label */ +.highlight .nn { color: #268bd2 } /* Name.Namespace */ +.highlight .nx { color: #657b83 } /* Name.Other */ +.highlight .py { color: #657b83 } /* Name.Property */ +.highlight .nt { color: #268bd2 } /* Name.Tag */ +.highlight .nv { color: #268bd2 } /* Name.Variable */ +.highlight .ow { color: #859900 } /* Operator.Word */ +.highlight .w { color: #657b83 } /* Text.Whitespace */ +.highlight .mb { color: #2aa198 } /* Literal.Number.Bin */ +.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ +.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ +.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ +.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ +.highlight .sa { color: #2aa198 } /* Literal.String.Affix */ +.highlight .sb { color: #2aa198 } /* Literal.String.Backtick */ +.highlight .sc { color: #2aa198 } /* Literal.String.Char */ +.highlight .dl { color: #2aa198 } /* Literal.String.Delimiter */ +.highlight .sd { color: #93a1a1 } /* Literal.String.Doc */ +.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ +.highlight .se { color: #2aa198 } /* Literal.String.Escape */ +.highlight .sh { color: #2aa198 } /* Literal.String.Heredoc */ +.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ +.highlight .sx { color: #2aa198 } /* Literal.String.Other */ +.highlight .sr { color: #cb4b16 } /* Literal.String.Regex */ +.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ +.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ +.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #268bd2 } /* Name.Function.Magic */ +.highlight .vc { color: #268bd2 } /* Name.Variable.Class */ +.highlight .vg { color: #268bd2 } /* Name.Variable.Global */ +.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ +.highlight .vm { color: #268bd2 } /* Name.Variable.Magic */ +.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #eee8d5 } +.literal-block { background: #fdf6e3; color: #657b83 } +.literal-block .c { color: #93a1a1; font-style: italic } /* Comment */ +.literal-block .err { color: #657b83; background-color: #dc322f } /* Error */ +.literal-block .esc { color: #657b83 } /* Escape */ +.literal-block .g { color: #657b83 } /* Generic */ +.literal-block .k { color: #859900 } /* Keyword */ +.literal-block .l { color: #657b83 } /* Literal */ +.literal-block .n { color: #657b83 } /* Name */ +.literal-block .o { color: #93a1a1 } /* Operator */ +.literal-block .x { color: #657b83 } /* Other */ +.literal-block .p { color: #657b83 } /* Punctuation */ +.literal-block .ch { color: #93a1a1; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #93a1a1; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #d33682 } /* Comment.Preproc */ +.literal-block .cpf { color: #93a1a1 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #93a1a1; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #93a1a1; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #dc322f } /* Generic.Deleted */ +.literal-block .ge { color: #657b83; font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #dc322f } /* Generic.Error */ +.literal-block .gh { color: #657b83; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #859900 } /* Generic.Inserted */ +.literal-block .go { color: #657b83 } /* Generic.Output */ +.literal-block .gp { color: #657b83 } /* Generic.Prompt */ +.literal-block .gs { color: #657b83; font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #657b83; text-decoration: underline } /* Generic.Subheading */ +.literal-block .gt { color: #268bd2 } /* Generic.Traceback */ +.literal-block .kc { color: #2aa198 } /* Keyword.Constant */ +.literal-block .kd { color: #2aa198 } /* Keyword.Declaration */ +.literal-block .kn { color: #cb4b16 } /* Keyword.Namespace */ +.literal-block .kp { color: #859900 } /* Keyword.Pseudo */ +.literal-block .kr { color: #859900 } /* Keyword.Reserved */ +.literal-block .kt { color: #b58900 } /* Keyword.Type */ +.literal-block .ld { color: #657b83 } /* Literal.Date */ +.literal-block .m { color: #2aa198 } /* Literal.Number */ +.literal-block .s { color: #2aa198 } /* Literal.String */ +.literal-block .na { color: #657b83 } /* Name.Attribute */ +.literal-block .nb { color: #268bd2 } /* Name.Builtin */ +.literal-block .nc { color: #268bd2 } /* Name.Class */ +.literal-block .no { color: #268bd2 } /* Name.Constant */ +.literal-block .nd { color: #268bd2 } /* Name.Decorator */ +.literal-block .ni { color: #268bd2 } /* Name.Entity */ +.literal-block .ne { color: #268bd2 } /* Name.Exception */ +.literal-block .nf { color: #268bd2 } /* Name.Function */ +.literal-block .nl { color: #268bd2 } /* Name.Label */ +.literal-block .nn { color: #268bd2 } /* Name.Namespace */ +.literal-block .nx { color: #657b83 } /* Name.Other */ +.literal-block .py { color: #657b83 } /* Name.Property */ +.literal-block .nt { color: #268bd2 } /* Name.Tag */ +.literal-block .nv { color: #268bd2 } /* Name.Variable */ +.literal-block .ow { color: #859900 } /* Operator.Word */ +.literal-block .w { color: #657b83 } /* Text.Whitespace */ +.literal-block .mb { color: #2aa198 } /* Literal.Number.Bin */ +.literal-block .mf { color: #2aa198 } /* Literal.Number.Float */ +.literal-block .mh { color: #2aa198 } /* Literal.Number.Hex */ +.literal-block .mi { color: #2aa198 } /* Literal.Number.Integer */ +.literal-block .mo { color: #2aa198 } /* Literal.Number.Oct */ +.literal-block .sa { color: #2aa198 } /* Literal.String.Affix */ +.literal-block .sb { color: #2aa198 } /* Literal.String.Backtick */ +.literal-block .sc { color: #2aa198 } /* Literal.String.Char */ +.literal-block .dl { color: #2aa198 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #93a1a1 } /* Literal.String.Doc */ +.literal-block .s2 { color: #2aa198 } /* Literal.String.Double */ +.literal-block .se { color: #2aa198 } /* Literal.String.Escape */ +.literal-block .sh { color: #2aa198 } /* Literal.String.Heredoc */ +.literal-block .si { color: #2aa198 } /* Literal.String.Interpol */ +.literal-block .sx { color: #2aa198 } /* Literal.String.Other */ +.literal-block .sr { color: #cb4b16 } /* Literal.String.Regex */ +.literal-block .s1 { color: #2aa198 } /* Literal.String.Single */ +.literal-block .ss { color: #2aa198 } /* Literal.String.Symbol */ +.literal-block .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #268bd2 } /* Name.Function.Magic */ +.literal-block .vc { color: #268bd2 } /* Name.Variable.Class */ +.literal-block .vg { color: #268bd2 } /* Name.Variable.Global */ +.literal-block .vi { color: #268bd2 } /* Name.Variable.Instance */ +.literal-block .vm { color: #268bd2 } /* Name.Variable.Magic */ +.literal-block .il { color: #2aa198 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/solarized-light.min.css b/theme/pygments/solarized-light.min.css new file mode 100644 index 00000000..acf617d1 --- /dev/null +++ b/theme/pygments/solarized-light.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#eee8d5}.highlight{background:#fdf6e3;color:#657b83}.highlight .c{color:#93a1a1;font-style:italic}.highlight .err{color:#657b83;background-color:#dc322f}.highlight .esc,.highlight .g{color:#657b83}.highlight .k{color:#859900}.highlight .l,.highlight .n{color:#657b83}.highlight .o{color:#93a1a1}.highlight .p,.highlight .x{color:#657b83}.highlight .ch,.highlight .cm{color:#93a1a1;font-style:italic}.highlight .cp{color:#d33682}.highlight .cpf{color:#93a1a1}.highlight .c1,.highlight .cs{color:#93a1a1;font-style:italic}.highlight .gd{color:#dc322f}.highlight .ge{color:#657b83;font-style:italic}.highlight .gr{color:#dc322f}.highlight .gh{color:#657b83;font-weight:700}.highlight .gi{color:#859900}.highlight .go,.highlight .gp{color:#657b83}.highlight .gs{color:#657b83;font-weight:700}.highlight .gu{color:#657b83;text-decoration:underline}.highlight .gt{color:#268bd2}.highlight .kc,.highlight .kd{color:#2aa198}.highlight .kn{color:#cb4b16}.highlight .kp,.highlight .kr{color:#859900}.highlight .kt{color:#b58900}.highlight .ld{color:#657b83}.highlight .m,.highlight .s{color:#2aa198}.highlight .na{color:#657b83}.highlight .nb,.highlight .nc,.highlight .nd,.highlight .ne,.highlight .nf,.highlight .ni,.highlight .nl,.highlight .nn,.highlight .no{color:#268bd2}.highlight .nx,.highlight .py{color:#657b83}.highlight .nt,.highlight .nv{color:#268bd2}.highlight .ow{color:#859900}.highlight .w{color:#657b83}.highlight .dl,.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo,.highlight .sa,.highlight .sb,.highlight .sc{color:#2aa198}.highlight .sd{color:#93a1a1}.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#2aa198}.highlight .sr{color:#cb4b16}.highlight .s1,.highlight .ss{color:#2aa198}.highlight .bp,.highlight .fm,.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#268bd2}.highlight .il{color:#2aa198}.literal-block .hll{background-color:#eee8d5}.literal-block{background:#fdf6e3;color:#657b83}.literal-block .c{color:#93a1a1;font-style:italic}.literal-block .err{color:#657b83;background-color:#dc322f}.literal-block .esc,.literal-block .g{color:#657b83}.literal-block .k{color:#859900}.literal-block .l,.literal-block .n{color:#657b83}.literal-block .o{color:#93a1a1}.literal-block .p,.literal-block .x{color:#657b83}.literal-block .ch,.literal-block .cm{color:#93a1a1;font-style:italic}.literal-block .cp{color:#d33682}.literal-block .cpf{color:#93a1a1}.literal-block .c1,.literal-block .cs{color:#93a1a1;font-style:italic}.literal-block .gd{color:#dc322f}.literal-block .ge{color:#657b83;font-style:italic}.literal-block .gr{color:#dc322f}.literal-block .gh{color:#657b83;font-weight:700}.literal-block .gi{color:#859900}.literal-block .go,.literal-block .gp{color:#657b83}.literal-block .gs{color:#657b83;font-weight:700}.literal-block .gu{color:#657b83;text-decoration:underline}.literal-block .gt{color:#268bd2}.literal-block .kc,.literal-block .kd{color:#2aa198}.literal-block .kn{color:#cb4b16}.literal-block .kp,.literal-block .kr{color:#859900}.literal-block .kt{color:#b58900}.literal-block .ld{color:#657b83}.literal-block .m,.literal-block .s{color:#2aa198}.literal-block .na{color:#657b83}.literal-block .nb,.literal-block .nc,.literal-block .nd,.literal-block .ne,.literal-block .nf,.literal-block .ni,.literal-block .nl,.literal-block .nn,.literal-block .no{color:#268bd2}.literal-block .nx,.literal-block .py{color:#657b83}.literal-block .nt,.literal-block .nv{color:#268bd2}.literal-block .ow{color:#859900}.literal-block .w{color:#657b83}.literal-block .dl,.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#2aa198}.literal-block .sd{color:#93a1a1}.literal-block .s2,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sx{color:#2aa198}.literal-block .sr{color:#cb4b16}.literal-block .s1,.literal-block .ss{color:#2aa198}.literal-block .bp,.literal-block .fm,.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#268bd2}.literal-block .il{color:#2aa198} \ No newline at end of file diff --git a/theme/pygments/stata-dark.css b/theme/pygments/stata-dark.css new file mode 100644 index 00000000..969e7303 --- /dev/null +++ b/theme/pygments/stata-dark.css @@ -0,0 +1,96 @@ +.highlight .hll { background-color: #49483e } +.highlight { background: #232629; color: #cccccc } +.highlight .c { color: #777777; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #7686bb; font-weight: bold } /* Keyword */ +.highlight .ch { color: #777777; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #777777; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #777777; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #777777; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #777777; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #777777; font-style: italic } /* Comment.Special */ +.highlight .gp { color: #ffffff } /* Generic.Prompt */ +.highlight .kc { color: #7686bb; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #7686bb; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #7686bb; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #7686bb; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #7686bb; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #7686bb; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #4FB8CC } /* Literal.Number */ +.highlight .s { color: #51cc99 } /* Literal.String */ +.highlight .nf { color: #6a6aff } /* Name.Function */ +.highlight .nx { color: #e2828e } /* Name.Other */ +.highlight .nv { color: #7AB4DB; font-weight: bold } /* Name.Variable */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #4FB8CC } /* Literal.Number.Bin */ +.highlight .mf { color: #4FB8CC } /* Literal.Number.Float */ +.highlight .mh { color: #4FB8CC } /* Literal.Number.Hex */ +.highlight .mi { color: #4FB8CC } /* Literal.Number.Integer */ +.highlight .mo { color: #4FB8CC } /* Literal.Number.Oct */ +.highlight .sa { color: #51cc99 } /* Literal.String.Affix */ +.highlight .sb { color: #51cc99 } /* Literal.String.Backtick */ +.highlight .sc { color: #51cc99 } /* Literal.String.Char */ +.highlight .dl { color: #51cc99 } /* Literal.String.Delimiter */ +.highlight .sd { color: #51cc99 } /* Literal.String.Doc */ +.highlight .s2 { color: #51cc99 } /* Literal.String.Double */ +.highlight .se { color: #51cc99 } /* Literal.String.Escape */ +.highlight .sh { color: #51cc99 } /* Literal.String.Heredoc */ +.highlight .si { color: #51cc99 } /* Literal.String.Interpol */ +.highlight .sx { color: #51cc99 } /* Literal.String.Other */ +.highlight .sr { color: #51cc99 } /* Literal.String.Regex */ +.highlight .s1 { color: #51cc99 } /* Literal.String.Single */ +.highlight .ss { color: #51cc99 } /* Literal.String.Symbol */ +.highlight .fm { color: #6a6aff } /* Name.Function.Magic */ +.highlight .vc { color: #7AB4DB; font-weight: bold } /* Name.Variable.Class */ +.highlight .vg { color: #BE646C; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #7AB4DB; font-weight: bold } /* Name.Variable.Instance */ +.highlight .vm { color: #7AB4DB; font-weight: bold } /* Name.Variable.Magic */ +.highlight .il { color: #4FB8CC } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #49483e } +.literal-block { background: #232629; color: #cccccc } +.literal-block .c { color: #777777; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #7686bb; font-weight: bold } /* Keyword */ +.literal-block .ch { color: #777777; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #777777; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #777777; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #777777; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #777777; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #777777; font-style: italic } /* Comment.Special */ +.literal-block .gp { color: #ffffff } /* Generic.Prompt */ +.literal-block .kc { color: #7686bb; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #7686bb; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #7686bb; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #7686bb; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #7686bb; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #7686bb; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #4FB8CC } /* Literal.Number */ +.literal-block .s { color: #51cc99 } /* Literal.String */ +.literal-block .nf { color: #6a6aff } /* Name.Function */ +.literal-block .nx { color: #e2828e } /* Name.Other */ +.literal-block .nv { color: #7AB4DB; font-weight: bold } /* Name.Variable */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #4FB8CC } /* Literal.Number.Bin */ +.literal-block .mf { color: #4FB8CC } /* Literal.Number.Float */ +.literal-block .mh { color: #4FB8CC } /* Literal.Number.Hex */ +.literal-block .mi { color: #4FB8CC } /* Literal.Number.Integer */ +.literal-block .mo { color: #4FB8CC } /* Literal.Number.Oct */ +.literal-block .sa { color: #51cc99 } /* Literal.String.Affix */ +.literal-block .sb { color: #51cc99 } /* Literal.String.Backtick */ +.literal-block .sc { color: #51cc99 } /* Literal.String.Char */ +.literal-block .dl { color: #51cc99 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #51cc99 } /* Literal.String.Doc */ +.literal-block .s2 { color: #51cc99 } /* Literal.String.Double */ +.literal-block .se { color: #51cc99 } /* Literal.String.Escape */ +.literal-block .sh { color: #51cc99 } /* Literal.String.Heredoc */ +.literal-block .si { color: #51cc99 } /* Literal.String.Interpol */ +.literal-block .sx { color: #51cc99 } /* Literal.String.Other */ +.literal-block .sr { color: #51cc99 } /* Literal.String.Regex */ +.literal-block .s1 { color: #51cc99 } /* Literal.String.Single */ +.literal-block .ss { color: #51cc99 } /* Literal.String.Symbol */ +.literal-block .fm { color: #6a6aff } /* Name.Function.Magic */ +.literal-block .vc { color: #7AB4DB; font-weight: bold } /* Name.Variable.Class */ +.literal-block .vg { color: #BE646C; font-weight: bold } /* Name.Variable.Global */ +.literal-block .vi { color: #7AB4DB; font-weight: bold } /* Name.Variable.Instance */ +.literal-block .vm { color: #7AB4DB; font-weight: bold } /* Name.Variable.Magic */ +.literal-block .il { color: #4FB8CC } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/stata-dark.min.css b/theme/pygments/stata-dark.min.css new file mode 100644 index 00000000..4e3ba958 --- /dev/null +++ b/theme/pygments/stata-dark.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#49483e}.highlight{background:#232629;color:#ccc}.highlight .c{color:#777;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:#7686bb;font-weight:700}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#777;font-style:italic}.highlight .gp{color:#fff}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#7686bb;font-weight:700}.highlight .m{color:#4fb8cc}.highlight .s{color:#51cc99}.highlight .nf{color:#6a6aff}.highlight .nx{color:#e2828e}.highlight .nv{color:#7ab4db;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#4fb8cc}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#51cc99}.highlight .fm{color:#6a6aff}.highlight .vc{color:#7ab4db;font-weight:700}.highlight .vg{color:#be646c;font-weight:700}.highlight .vi,.highlight .vm{color:#7ab4db;font-weight:700}.highlight .il{color:#4fb8cc}.literal-block .hll{background-color:#49483e}.literal-block{background:#232629;color:#ccc}.literal-block .c{color:#777;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k{color:#7686bb;font-weight:700}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#777;font-style:italic}.literal-block .gp{color:#fff}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#7686bb;font-weight:700}.literal-block .m{color:#4fb8cc}.literal-block .s{color:#51cc99}.literal-block .nf{color:#6a6aff}.literal-block .nx{color:#e2828e}.literal-block .nv{color:#7ab4db;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#4fb8cc}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#51cc99}.literal-block .fm{color:#6a6aff}.literal-block .vc{color:#7ab4db;font-weight:700}.literal-block .vg{color:#be646c;font-weight:700}.literal-block .vi,.literal-block .vm{color:#7ab4db;font-weight:700}.literal-block .il{color:#4fb8cc} \ No newline at end of file diff --git a/theme/pygments/stata-light.css b/theme/pygments/stata-light.css new file mode 100644 index 00000000..fe90e7e3 --- /dev/null +++ b/theme/pygments/stata-light.css @@ -0,0 +1,94 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; color: #111111 } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #353580; font-weight: bold } /* Keyword */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008800; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-style: italic } /* Comment.Special */ +.highlight .kc { color: #353580; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #353580; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #353580; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #353580; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #353580; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #353580; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #2c2cff } /* Literal.Number */ +.highlight .s { color: #7a2424 } /* Literal.String */ +.highlight .nf { color: #2c2cff } /* Name.Function */ +.highlight .nx { color: #be646c } /* Name.Other */ +.highlight .nv { color: #35baba; font-weight: bold } /* Name.Variable */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #2c2cff } /* Literal.Number.Bin */ +.highlight .mf { color: #2c2cff } /* Literal.Number.Float */ +.highlight .mh { color: #2c2cff } /* Literal.Number.Hex */ +.highlight .mi { color: #2c2cff } /* Literal.Number.Integer */ +.highlight .mo { color: #2c2cff } /* Literal.Number.Oct */ +.highlight .sa { color: #7a2424 } /* Literal.String.Affix */ +.highlight .sb { color: #7a2424 } /* Literal.String.Backtick */ +.highlight .sc { color: #7a2424 } /* Literal.String.Char */ +.highlight .dl { color: #7a2424 } /* Literal.String.Delimiter */ +.highlight .sd { color: #7a2424 } /* Literal.String.Doc */ +.highlight .s2 { color: #7a2424 } /* Literal.String.Double */ +.highlight .se { color: #7a2424 } /* Literal.String.Escape */ +.highlight .sh { color: #7a2424 } /* Literal.String.Heredoc */ +.highlight .si { color: #7a2424 } /* Literal.String.Interpol */ +.highlight .sx { color: #7a2424 } /* Literal.String.Other */ +.highlight .sr { color: #7a2424 } /* Literal.String.Regex */ +.highlight .s1 { color: #7a2424 } /* Literal.String.Single */ +.highlight .ss { color: #7a2424 } /* Literal.String.Symbol */ +.highlight .fm { color: #2c2cff } /* Name.Function.Magic */ +.highlight .vc { color: #35baba; font-weight: bold } /* Name.Variable.Class */ +.highlight .vg { color: #b5565e; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #35baba; font-weight: bold } /* Name.Variable.Instance */ +.highlight .vm { color: #35baba; font-weight: bold } /* Name.Variable.Magic */ +.highlight .il { color: #2c2cff } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; color: #111111 } +.literal-block .c { color: #008800; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #353580; font-weight: bold } /* Keyword */ +.literal-block .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #008800; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #008800; font-style: italic } /* Comment.Special */ +.literal-block .kc { color: #353580; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #353580; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #353580; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #353580; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #353580; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #353580; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #2c2cff } /* Literal.Number */ +.literal-block .s { color: #7a2424 } /* Literal.String */ +.literal-block .nf { color: #2c2cff } /* Name.Function */ +.literal-block .nx { color: #be646c } /* Name.Other */ +.literal-block .nv { color: #35baba; font-weight: bold } /* Name.Variable */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #2c2cff } /* Literal.Number.Bin */ +.literal-block .mf { color: #2c2cff } /* Literal.Number.Float */ +.literal-block .mh { color: #2c2cff } /* Literal.Number.Hex */ +.literal-block .mi { color: #2c2cff } /* Literal.Number.Integer */ +.literal-block .mo { color: #2c2cff } /* Literal.Number.Oct */ +.literal-block .sa { color: #7a2424 } /* Literal.String.Affix */ +.literal-block .sb { color: #7a2424 } /* Literal.String.Backtick */ +.literal-block .sc { color: #7a2424 } /* Literal.String.Char */ +.literal-block .dl { color: #7a2424 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #7a2424 } /* Literal.String.Doc */ +.literal-block .s2 { color: #7a2424 } /* Literal.String.Double */ +.literal-block .se { color: #7a2424 } /* Literal.String.Escape */ +.literal-block .sh { color: #7a2424 } /* Literal.String.Heredoc */ +.literal-block .si { color: #7a2424 } /* Literal.String.Interpol */ +.literal-block .sx { color: #7a2424 } /* Literal.String.Other */ +.literal-block .sr { color: #7a2424 } /* Literal.String.Regex */ +.literal-block .s1 { color: #7a2424 } /* Literal.String.Single */ +.literal-block .ss { color: #7a2424 } /* Literal.String.Symbol */ +.literal-block .fm { color: #2c2cff } /* Name.Function.Magic */ +.literal-block .vc { color: #35baba; font-weight: bold } /* Name.Variable.Class */ +.literal-block .vg { color: #b5565e; font-weight: bold } /* Name.Variable.Global */ +.literal-block .vi { color: #35baba; font-weight: bold } /* Name.Variable.Instance */ +.literal-block .vm { color: #35baba; font-weight: bold } /* Name.Variable.Magic */ +.literal-block .il { color: #2c2cff } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/stata-light.min.css b/theme/pygments/stata-light.min.css new file mode 100644 index 00000000..bc0b9ff2 --- /dev/null +++ b/theme/pygments/stata-light.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff;color:#111}.highlight .c{color:#080;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:#353580;font-weight:700}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#080;font-style:italic}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#353580;font-weight:700}.highlight .m{color:#2c2cff}.highlight .s{color:#7a2424}.highlight .nf{color:#2c2cff}.highlight .nx{color:#be646c}.highlight .nv{color:#35baba;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#2c2cff}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#7a2424}.highlight .fm{color:#2c2cff}.highlight .vc{color:#35baba;font-weight:700}.highlight .vg{color:#b5565e;font-weight:700}.highlight .vi,.highlight .vm{color:#35baba;font-weight:700}.highlight .il{color:#2c2cff}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff;color:#111}.literal-block .c{color:#080;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k{color:#353580;font-weight:700}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#080;font-style:italic}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#353580;font-weight:700}.literal-block .m{color:#2c2cff}.literal-block .s{color:#7a2424}.literal-block .nf{color:#2c2cff}.literal-block .nx{color:#be646c}.literal-block .nv{color:#35baba;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#2c2cff}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#7a2424}.literal-block .fm{color:#2c2cff}.literal-block .vc{color:#35baba;font-weight:700}.literal-block .vg{color:#b5565e;font-weight:700}.literal-block .vi,.literal-block .vm{color:#35baba;font-weight:700}.literal-block .il{color:#2c2cff} \ No newline at end of file diff --git a/theme/pygments/stata.css b/theme/pygments/stata.css new file mode 100644 index 00000000..fe90e7e3 --- /dev/null +++ b/theme/pygments/stata.css @@ -0,0 +1,94 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; color: #111111 } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #353580; font-weight: bold } /* Keyword */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008800; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-style: italic } /* Comment.Special */ +.highlight .kc { color: #353580; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #353580; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #353580; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #353580; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #353580; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #353580; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #2c2cff } /* Literal.Number */ +.highlight .s { color: #7a2424 } /* Literal.String */ +.highlight .nf { color: #2c2cff } /* Name.Function */ +.highlight .nx { color: #be646c } /* Name.Other */ +.highlight .nv { color: #35baba; font-weight: bold } /* Name.Variable */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #2c2cff } /* Literal.Number.Bin */ +.highlight .mf { color: #2c2cff } /* Literal.Number.Float */ +.highlight .mh { color: #2c2cff } /* Literal.Number.Hex */ +.highlight .mi { color: #2c2cff } /* Literal.Number.Integer */ +.highlight .mo { color: #2c2cff } /* Literal.Number.Oct */ +.highlight .sa { color: #7a2424 } /* Literal.String.Affix */ +.highlight .sb { color: #7a2424 } /* Literal.String.Backtick */ +.highlight .sc { color: #7a2424 } /* Literal.String.Char */ +.highlight .dl { color: #7a2424 } /* Literal.String.Delimiter */ +.highlight .sd { color: #7a2424 } /* Literal.String.Doc */ +.highlight .s2 { color: #7a2424 } /* Literal.String.Double */ +.highlight .se { color: #7a2424 } /* Literal.String.Escape */ +.highlight .sh { color: #7a2424 } /* Literal.String.Heredoc */ +.highlight .si { color: #7a2424 } /* Literal.String.Interpol */ +.highlight .sx { color: #7a2424 } /* Literal.String.Other */ +.highlight .sr { color: #7a2424 } /* Literal.String.Regex */ +.highlight .s1 { color: #7a2424 } /* Literal.String.Single */ +.highlight .ss { color: #7a2424 } /* Literal.String.Symbol */ +.highlight .fm { color: #2c2cff } /* Name.Function.Magic */ +.highlight .vc { color: #35baba; font-weight: bold } /* Name.Variable.Class */ +.highlight .vg { color: #b5565e; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #35baba; font-weight: bold } /* Name.Variable.Instance */ +.highlight .vm { color: #35baba; font-weight: bold } /* Name.Variable.Magic */ +.highlight .il { color: #2c2cff } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; color: #111111 } +.literal-block .c { color: #008800; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { color: #353580; font-weight: bold } /* Keyword */ +.literal-block .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #008800; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #008800; font-style: italic } /* Comment.Special */ +.literal-block .kc { color: #353580; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #353580; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #353580; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #353580; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #353580; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #353580; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #2c2cff } /* Literal.Number */ +.literal-block .s { color: #7a2424 } /* Literal.String */ +.literal-block .nf { color: #2c2cff } /* Name.Function */ +.literal-block .nx { color: #be646c } /* Name.Other */ +.literal-block .nv { color: #35baba; font-weight: bold } /* Name.Variable */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #2c2cff } /* Literal.Number.Bin */ +.literal-block .mf { color: #2c2cff } /* Literal.Number.Float */ +.literal-block .mh { color: #2c2cff } /* Literal.Number.Hex */ +.literal-block .mi { color: #2c2cff } /* Literal.Number.Integer */ +.literal-block .mo { color: #2c2cff } /* Literal.Number.Oct */ +.literal-block .sa { color: #7a2424 } /* Literal.String.Affix */ +.literal-block .sb { color: #7a2424 } /* Literal.String.Backtick */ +.literal-block .sc { color: #7a2424 } /* Literal.String.Char */ +.literal-block .dl { color: #7a2424 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #7a2424 } /* Literal.String.Doc */ +.literal-block .s2 { color: #7a2424 } /* Literal.String.Double */ +.literal-block .se { color: #7a2424 } /* Literal.String.Escape */ +.literal-block .sh { color: #7a2424 } /* Literal.String.Heredoc */ +.literal-block .si { color: #7a2424 } /* Literal.String.Interpol */ +.literal-block .sx { color: #7a2424 } /* Literal.String.Other */ +.literal-block .sr { color: #7a2424 } /* Literal.String.Regex */ +.literal-block .s1 { color: #7a2424 } /* Literal.String.Single */ +.literal-block .ss { color: #7a2424 } /* Literal.String.Symbol */ +.literal-block .fm { color: #2c2cff } /* Name.Function.Magic */ +.literal-block .vc { color: #35baba; font-weight: bold } /* Name.Variable.Class */ +.literal-block .vg { color: #b5565e; font-weight: bold } /* Name.Variable.Global */ +.literal-block .vi { color: #35baba; font-weight: bold } /* Name.Variable.Instance */ +.literal-block .vm { color: #35baba; font-weight: bold } /* Name.Variable.Magic */ +.literal-block .il { color: #2c2cff } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/stata.min.css b/theme/pygments/stata.min.css new file mode 100644 index 00000000..bc0b9ff2 --- /dev/null +++ b/theme/pygments/stata.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff;color:#111}.highlight .c{color:#080;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:#353580;font-weight:700}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#080;font-style:italic}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#353580;font-weight:700}.highlight .m{color:#2c2cff}.highlight .s{color:#7a2424}.highlight .nf{color:#2c2cff}.highlight .nx{color:#be646c}.highlight .nv{color:#35baba;font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#2c2cff}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#7a2424}.highlight .fm{color:#2c2cff}.highlight .vc{color:#35baba;font-weight:700}.highlight .vg{color:#b5565e;font-weight:700}.highlight .vi,.highlight .vm{color:#35baba;font-weight:700}.highlight .il{color:#2c2cff}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff;color:#111}.literal-block .c{color:#080;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k{color:#353580;font-weight:700}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#080;font-style:italic}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#353580;font-weight:700}.literal-block .m{color:#2c2cff}.literal-block .s{color:#7a2424}.literal-block .nf{color:#2c2cff}.literal-block .nx{color:#be646c}.literal-block .nv{color:#35baba;font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#2c2cff}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#7a2424}.literal-block .fm{color:#2c2cff}.literal-block .vc{color:#35baba;font-weight:700}.literal-block .vg{color:#b5565e;font-weight:700}.literal-block .vi,.literal-block .vm{color:#35baba;font-weight:700}.literal-block .il{color:#2c2cff} \ No newline at end of file diff --git a/theme/pygments/tango.css b/theme/pygments/tango.css new file mode 100644 index 00000000..5266b07b --- /dev/null +++ b/theme/pygments/tango.css @@ -0,0 +1,154 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8f5902 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #204a87 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ +.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #f8f8f8; } +.literal-block .c { color: #8f5902; font-style: italic } /* Comment */ +.literal-block .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.literal-block .g { color: #000000 } /* Generic */ +.literal-block .k { color: #204a87; font-weight: bold } /* Keyword */ +.literal-block .l { color: #000000 } /* Literal */ +.literal-block .n { color: #000000 } /* Name */ +.literal-block .o { color: #ce5c00; font-weight: bold } /* Operator */ +.literal-block .x { color: #000000 } /* Other */ +.literal-block .p { color: #000000; font-weight: bold } /* Punctuation */ +.literal-block .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.literal-block .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #a40000 } /* Generic.Deleted */ +.literal-block .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #ef2929 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00A000 } /* Generic.Inserted */ +.literal-block .go { color: #000000; font-style: italic } /* Generic.Output */ +.literal-block .gp { color: #8f5902 } /* Generic.Prompt */ +.literal-block .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.literal-block .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.literal-block .ld { color: #000000 } /* Literal.Date */ +.literal-block .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.literal-block .s { color: #4e9a06 } /* Literal.String */ +.literal-block .na { color: #c4a000 } /* Name.Attribute */ +.literal-block .nb { color: #204a87 } /* Name.Builtin */ +.literal-block .nc { color: #000000 } /* Name.Class */ +.literal-block .no { color: #000000 } /* Name.Constant */ +.literal-block .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.literal-block .ni { color: #ce5c00 } /* Name.Entity */ +.literal-block .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #000000 } /* Name.Function */ +.literal-block .nl { color: #f57900 } /* Name.Label */ +.literal-block .nn { color: #000000 } /* Name.Namespace */ +.literal-block .nx { color: #000000 } /* Name.Other */ +.literal-block .py { color: #000000 } /* Name.Property */ +.literal-block .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.literal-block .nv { color: #000000 } /* Name.Variable */ +.literal-block .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ +.literal-block .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ +.literal-block .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.literal-block .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.literal-block .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.literal-block .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.literal-block .sa { color: #4e9a06 } /* Literal.String.Affix */ +.literal-block .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.literal-block .sc { color: #4e9a06 } /* Literal.String.Char */ +.literal-block .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.literal-block .s2 { color: #4e9a06 } /* Literal.String.Double */ +.literal-block .se { color: #4e9a06 } /* Literal.String.Escape */ +.literal-block .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.literal-block .si { color: #4e9a06 } /* Literal.String.Interpol */ +.literal-block .sx { color: #4e9a06 } /* Literal.String.Other */ +.literal-block .sr { color: #4e9a06 } /* Literal.String.Regex */ +.literal-block .s1 { color: #4e9a06 } /* Literal.String.Single */ +.literal-block .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.literal-block .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #000000 } /* Name.Function.Magic */ +.literal-block .vc { color: #000000 } /* Name.Variable.Class */ +.literal-block .vg { color: #000000 } /* Name.Variable.Global */ +.literal-block .vi { color: #000000 } /* Name.Variable.Instance */ +.literal-block .vm { color: #000000 } /* Name.Variable.Magic */ +.literal-block .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/tango.min.css b/theme/pygments/tango.min.css new file mode 100644 index 00000000..0ba26909 --- /dev/null +++ b/theme/pygments/tango.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#8f5902;font-style:italic}.highlight .err{color:#a40000;border:1px solid #ef2929}.highlight .g{color:#000}.highlight .k{color:#204a87;font-weight:700}.highlight .l,.highlight .n{color:#000}.highlight .o{color:#ce5c00;font-weight:700}.highlight .x{color:#000}.highlight .p{color:#000;font-weight:700}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf,.highlight .cs{color:#8f5902;font-style:italic}.highlight .gd{color:#a40000}.highlight .ge{color:#000;font-style:italic}.highlight .gr{color:#ef2929}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#000;font-style:italic}.highlight .gp{color:#8f5902}.highlight .gs{color:#000;font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#a40000;font-weight:700}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#204a87;font-weight:700}.highlight .ld{color:#000}.highlight .m{color:#0000cf;font-weight:700}.highlight .s{color:#4e9a06}.highlight .na{color:#c4a000}.highlight .nb{color:#204a87}.highlight .nc,.highlight .no{color:#000}.highlight .nd{color:#5c35cc;font-weight:700}.highlight .ni{color:#ce5c00}.highlight .ne{color:#c00;font-weight:700}.highlight .nf{color:#000}.highlight .nl{color:#f57900}.highlight .nn,.highlight .nx,.highlight .py{color:#000}.highlight .nt{color:#204a87;font-weight:700}.highlight .nv{color:#000}.highlight .ow{color:#204a87;font-weight:700}.highlight .w{color:#f8f8f8;text-decoration:underline}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#0000cf;font-weight:700}.highlight .dl,.highlight .sa,.highlight .sb,.highlight .sc{color:#4e9a06}.highlight .sd{color:#8f5902;font-style:italic}.highlight .s1,.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#4e9a06}.highlight .bp{color:#3465a4}.highlight .fm,.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#000}.highlight .il{color:#0000cf;font-weight:700}.literal-block .hll{background-color:#ffc}.literal-block{background:#f8f8f8}.literal-block .c{color:#8f5902;font-style:italic}.literal-block .err{color:#a40000;border:1px solid #ef2929}.literal-block .g{color:#000}.literal-block .k{color:#204a87;font-weight:700}.literal-block .l,.literal-block .n{color:#000}.literal-block .o{color:#ce5c00;font-weight:700}.literal-block .x{color:#000}.literal-block .p{color:#000;font-weight:700}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf,.literal-block .cs{color:#8f5902;font-style:italic}.literal-block .gd{color:#a40000}.literal-block .ge{color:#000;font-style:italic}.literal-block .gr{color:#ef2929}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00a000}.literal-block .go{color:#000;font-style:italic}.literal-block .gp{color:#8f5902}.literal-block .gs{color:#000;font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#a40000;font-weight:700}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#204a87;font-weight:700}.literal-block .ld{color:#000}.literal-block .m{color:#0000cf;font-weight:700}.literal-block .s{color:#4e9a06}.literal-block .na{color:#c4a000}.literal-block .nb{color:#204a87}.literal-block .nc,.literal-block .no{color:#000}.literal-block .nd{color:#5c35cc;font-weight:700}.literal-block .ni{color:#ce5c00}.literal-block .ne{color:#c00;font-weight:700}.literal-block .nf{color:#000}.literal-block .nl{color:#f57900}.literal-block .nn,.literal-block .nx,.literal-block .py{color:#000}.literal-block .nt{color:#204a87;font-weight:700}.literal-block .nv{color:#000}.literal-block .ow{color:#204a87;font-weight:700}.literal-block .w{color:#f8f8f8;text-decoration:underline}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#0000cf;font-weight:700}.literal-block .dl,.literal-block .sa,.literal-block .sb,.literal-block .sc{color:#4e9a06}.literal-block .sd{color:#8f5902;font-style:italic}.literal-block .s1,.literal-block .s2,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#4e9a06}.literal-block .bp{color:#3465a4}.literal-block .fm,.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#000}.literal-block .il{color:#0000cf;font-weight:700} \ No newline at end of file diff --git a/theme/pygments/trac.css b/theme/pygments/trac.css new file mode 100644 index 00000000..331e62bb --- /dev/null +++ b/theme/pygments/trac.css @@ -0,0 +1,134 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .ch { color: #999988; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .cpf { color: #999988; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #bb8844 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #999999 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #009999 } /* Literal.Number.Bin */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sa { color: #bb8844 } /* Literal.String.Affix */ +.highlight .sb { color: #bb8844 } /* Literal.String.Backtick */ +.highlight .sc { color: #bb8844 } /* Literal.String.Char */ +.highlight .dl { color: #bb8844 } /* Literal.String.Delimiter */ +.highlight .sd { color: #bb8844 } /* Literal.String.Doc */ +.highlight .s2 { color: #bb8844 } /* Literal.String.Double */ +.highlight .se { color: #bb8844 } /* Literal.String.Escape */ +.highlight .sh { color: #bb8844 } /* Literal.String.Heredoc */ +.highlight .si { color: #bb8844 } /* Literal.String.Interpol */ +.highlight .sx { color: #bb8844 } /* Literal.String.Other */ +.highlight .sr { color: #808000 } /* Literal.String.Regex */ +.highlight .s1 { color: #bb8844 } /* Literal.String.Single */ +.highlight .ss { color: #bb8844 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #990000; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .vm { color: #008080 } /* Name.Variable.Magic */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #999988; font-style: italic } /* Comment */ +.literal-block .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.literal-block .k { font-weight: bold } /* Keyword */ +.literal-block .o { font-weight: bold } /* Operator */ +.literal-block .ch { color: #999988; font-style: italic } /* Comment.Hashbang */ +.literal-block .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.literal-block .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.literal-block .cpf { color: #999988; font-style: italic } /* Comment.PreprocFile */ +.literal-block .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.literal-block .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.literal-block .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #aa0000 } /* Generic.Error */ +.literal-block .gh { color: #999999 } /* Generic.Heading */ +.literal-block .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #555555 } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #aaaaaa } /* Generic.Subheading */ +.literal-block .gt { color: #aa0000 } /* Generic.Traceback */ +.literal-block .kc { font-weight: bold } /* Keyword.Constant */ +.literal-block .kd { font-weight: bold } /* Keyword.Declaration */ +.literal-block .kn { font-weight: bold } /* Keyword.Namespace */ +.literal-block .kp { font-weight: bold } /* Keyword.Pseudo */ +.literal-block .kr { font-weight: bold } /* Keyword.Reserved */ +.literal-block .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.literal-block .m { color: #009999 } /* Literal.Number */ +.literal-block .s { color: #bb8844 } /* Literal.String */ +.literal-block .na { color: #008080 } /* Name.Attribute */ +.literal-block .nb { color: #999999 } /* Name.Builtin */ +.literal-block .nc { color: #445588; font-weight: bold } /* Name.Class */ +.literal-block .no { color: #008080 } /* Name.Constant */ +.literal-block .ni { color: #800080 } /* Name.Entity */ +.literal-block .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #990000; font-weight: bold } /* Name.Function */ +.literal-block .nn { color: #555555 } /* Name.Namespace */ +.literal-block .nt { color: #000080 } /* Name.Tag */ +.literal-block .nv { color: #008080 } /* Name.Variable */ +.literal-block .ow { font-weight: bold } /* Operator.Word */ +.literal-block .w { color: #bbbbbb } /* Text.Whitespace */ +.literal-block .mb { color: #009999 } /* Literal.Number.Bin */ +.literal-block .mf { color: #009999 } /* Literal.Number.Float */ +.literal-block .mh { color: #009999 } /* Literal.Number.Hex */ +.literal-block .mi { color: #009999 } /* Literal.Number.Integer */ +.literal-block .mo { color: #009999 } /* Literal.Number.Oct */ +.literal-block .sa { color: #bb8844 } /* Literal.String.Affix */ +.literal-block .sb { color: #bb8844 } /* Literal.String.Backtick */ +.literal-block .sc { color: #bb8844 } /* Literal.String.Char */ +.literal-block .dl { color: #bb8844 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #bb8844 } /* Literal.String.Doc */ +.literal-block .s2 { color: #bb8844 } /* Literal.String.Double */ +.literal-block .se { color: #bb8844 } /* Literal.String.Escape */ +.literal-block .sh { color: #bb8844 } /* Literal.String.Heredoc */ +.literal-block .si { color: #bb8844 } /* Literal.String.Interpol */ +.literal-block .sx { color: #bb8844 } /* Literal.String.Other */ +.literal-block .sr { color: #808000 } /* Literal.String.Regex */ +.literal-block .s1 { color: #bb8844 } /* Literal.String.Single */ +.literal-block .ss { color: #bb8844 } /* Literal.String.Symbol */ +.literal-block .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #990000; font-weight: bold } /* Name.Function.Magic */ +.literal-block .vc { color: #008080 } /* Name.Variable.Class */ +.literal-block .vg { color: #008080 } /* Name.Variable.Global */ +.literal-block .vi { color: #008080 } /* Name.Variable.Instance */ +.literal-block .vm { color: #008080 } /* Name.Variable.Magic */ +.literal-block .il { color: #009999 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/trac.min.css b/theme/pygments/trac.min.css new file mode 100644 index 00000000..3c78f124 --- /dev/null +++ b/theme/pygments/trac.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#998;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k,.highlight .o{font-weight:700}.highlight .ch,.highlight .cm{color:#998;font-style:italic}.highlight .cp{color:#999;font-weight:700}.highlight .c1,.highlight .cpf{color:#998;font-style:italic}.highlight .cs{color:#999;font-weight:700;font-style:italic}.highlight .gd{color:#000;background-color:#fdd}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:700}.highlight .gu{color:#aaa}.highlight .gt{color:#a00}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{font-weight:700}.highlight .kt{color:#458}.highlight .m{color:#099}.highlight .s{color:#b84}.highlight .na{color:teal}.highlight .nb{color:#999}.highlight .nc{color:#458;font-weight:700}.highlight .no{color:teal}.highlight .ni{color:purple}.highlight .ne,.highlight .nf{color:#900;font-weight:700}.highlight .nn{color:#555}.highlight .nt{color:navy}.highlight .nv{color:teal}.highlight .ow{font-weight:700}.highlight .w{color:#bbb}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#099}.highlight .dl,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#b84}.highlight .sr{color:olive}.highlight .s1,.highlight .ss{color:#b84}.highlight .bp{color:#999}.highlight .fm{color:#900;font-weight:700}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:teal}.highlight .il{color:#099}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#998;font-style:italic}.literal-block .err{color:#a61717;background-color:#e3d2d2}.literal-block .k,.literal-block .o{font-weight:700}.literal-block .ch,.literal-block .cm{color:#998;font-style:italic}.literal-block .cp{color:#999;font-weight:700}.literal-block .c1,.literal-block .cpf{color:#998;font-style:italic}.literal-block .cs{color:#999;font-weight:700;font-style:italic}.literal-block .gd{color:#000;background-color:#fdd}.literal-block .ge{font-style:italic}.literal-block .gr{color:#a00}.literal-block .gh{color:#999}.literal-block .gi{color:#000;background-color:#dfd}.literal-block .go{color:#888}.literal-block .gp{color:#555}.literal-block .gs{font-weight:700}.literal-block .gu{color:#aaa}.literal-block .gt{color:#a00}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{font-weight:700}.literal-block .kt{color:#458;font-weight:700}.literal-block .m{color:#099}.literal-block .s{color:#b84}.literal-block .na{color:teal}.literal-block .nb{color:#999}.literal-block .nc{color:#458;font-weight:700}.literal-block .no{color:teal}.literal-block .ni{color:purple}.literal-block .ne,.literal-block .nf{color:#900;font-weight:700}.literal-block .nn{color:#555}.literal-block .nt{color:navy}.literal-block .nv{color:teal}.literal-block .ow{font-weight:700}.literal-block .w{color:#bbb}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#099}.literal-block .dl,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sx{color:#b84}.literal-block .sr{color:olive}.literal-block .s1,.literal-block .ss{color:#b84}.literal-block .bp{color:#999}.literal-block .fm{color:#900;font-weight:700}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:teal}.literal-block .il{color:#099} \ No newline at end of file diff --git a/theme/pygments/vim.css b/theme/pygments/vim.css new file mode 100644 index 00000000..d6eb195e --- /dev/null +++ b/theme/pygments/vim.css @@ -0,0 +1,156 @@ +.highlight .hll { background-color: #222222 } +.highlight { background: #000000; color: #cccccc } +.highlight .c { color: #000080 } /* Comment */ +.highlight .err { color: #cccccc; border: 1px solid #FF0000 } /* Error */ +.highlight .esc { color: #cccccc } /* Escape */ +.highlight .g { color: #cccccc } /* Generic */ +.highlight .k { color: #cdcd00 } /* Keyword */ +.highlight .l { color: #cccccc } /* Literal */ +.highlight .n { color: #cccccc } /* Name */ +.highlight .o { color: #3399cc } /* Operator */ +.highlight .x { color: #cccccc } /* Other */ +.highlight .p { color: #cccccc } /* Punctuation */ +.highlight .ch { color: #000080 } /* Comment.Hashbang */ +.highlight .cm { color: #000080 } /* Comment.Multiline */ +.highlight .cp { color: #000080 } /* Comment.Preproc */ +.highlight .cpf { color: #000080 } /* Comment.PreprocFile */ +.highlight .c1 { color: #000080 } /* Comment.Single */ +.highlight .cs { color: #cd0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #cd0000 } /* Generic.Deleted */ +.highlight .ge { color: #cccccc; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00cd00 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { color: #cccccc; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #cdcd00 } /* Keyword.Constant */ +.highlight .kd { color: #00cd00 } /* Keyword.Declaration */ +.highlight .kn { color: #cd00cd } /* Keyword.Namespace */ +.highlight .kp { color: #cdcd00 } /* Keyword.Pseudo */ +.highlight .kr { color: #cdcd00 } /* Keyword.Reserved */ +.highlight .kt { color: #00cd00 } /* Keyword.Type */ +.highlight .ld { color: #cccccc } /* Literal.Date */ +.highlight .m { color: #cd00cd } /* Literal.Number */ +.highlight .s { color: #cd0000 } /* Literal.String */ +.highlight .na { color: #cccccc } /* Name.Attribute */ +.highlight .nb { color: #cd00cd } /* Name.Builtin */ +.highlight .nc { color: #00cdcd } /* Name.Class */ +.highlight .no { color: #cccccc } /* Name.Constant */ +.highlight .nd { color: #cccccc } /* Name.Decorator */ +.highlight .ni { color: #cccccc } /* Name.Entity */ +.highlight .ne { color: #666699; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #cccccc } /* Name.Function */ +.highlight .nl { color: #cccccc } /* Name.Label */ +.highlight .nn { color: #cccccc } /* Name.Namespace */ +.highlight .nx { color: #cccccc } /* Name.Other */ +.highlight .py { color: #cccccc } /* Name.Property */ +.highlight .nt { color: #cccccc } /* Name.Tag */ +.highlight .nv { color: #00cdcd } /* Name.Variable */ +.highlight .ow { color: #cdcd00 } /* Operator.Word */ +.highlight .w { color: #cccccc } /* Text.Whitespace */ +.highlight .mb { color: #cd00cd } /* Literal.Number.Bin */ +.highlight .mf { color: #cd00cd } /* Literal.Number.Float */ +.highlight .mh { color: #cd00cd } /* Literal.Number.Hex */ +.highlight .mi { color: #cd00cd } /* Literal.Number.Integer */ +.highlight .mo { color: #cd00cd } /* Literal.Number.Oct */ +.highlight .sa { color: #cd0000 } /* Literal.String.Affix */ +.highlight .sb { color: #cd0000 } /* Literal.String.Backtick */ +.highlight .sc { color: #cd0000 } /* Literal.String.Char */ +.highlight .dl { color: #cd0000 } /* Literal.String.Delimiter */ +.highlight .sd { color: #cd0000 } /* Literal.String.Doc */ +.highlight .s2 { color: #cd0000 } /* Literal.String.Double */ +.highlight .se { color: #cd0000 } /* Literal.String.Escape */ +.highlight .sh { color: #cd0000 } /* Literal.String.Heredoc */ +.highlight .si { color: #cd0000 } /* Literal.String.Interpol */ +.highlight .sx { color: #cd0000 } /* Literal.String.Other */ +.highlight .sr { color: #cd0000 } /* Literal.String.Regex */ +.highlight .s1 { color: #cd0000 } /* Literal.String.Single */ +.highlight .ss { color: #cd0000 } /* Literal.String.Symbol */ +.highlight .bp { color: #cd00cd } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #cccccc } /* Name.Function.Magic */ +.highlight .vc { color: #00cdcd } /* Name.Variable.Class */ +.highlight .vg { color: #00cdcd } /* Name.Variable.Global */ +.highlight .vi { color: #00cdcd } /* Name.Variable.Instance */ +.highlight .vm { color: #00cdcd } /* Name.Variable.Magic */ +.highlight .il { color: #cd00cd } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #222222 } +.literal-block { background: #000000; color: #cccccc } +.literal-block .c { color: #000080 } /* Comment */ +.literal-block .err { color: #cccccc; border: 1px solid #FF0000 } /* Error */ +.literal-block .esc { color: #cccccc } /* Escape */ +.literal-block .g { color: #cccccc } /* Generic */ +.literal-block .k { color: #cdcd00 } /* Keyword */ +.literal-block .l { color: #cccccc } /* Literal */ +.literal-block .n { color: #cccccc } /* Name */ +.literal-block .o { color: #3399cc } /* Operator */ +.literal-block .x { color: #cccccc } /* Other */ +.literal-block .p { color: #cccccc } /* Punctuation */ +.literal-block .ch { color: #000080 } /* Comment.Hashbang */ +.literal-block .cm { color: #000080 } /* Comment.Multiline */ +.literal-block .cp { color: #000080 } /* Comment.Preproc */ +.literal-block .cpf { color: #000080 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #000080 } /* Comment.Single */ +.literal-block .cs { color: #cd0000; font-weight: bold } /* Comment.Special */ +.literal-block .gd { color: #cd0000 } /* Generic.Deleted */ +.literal-block .ge { color: #cccccc; font-style: italic } /* Generic.Emph */ +.literal-block .gr { color: #FF0000 } /* Generic.Error */ +.literal-block .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.literal-block .gi { color: #00cd00 } /* Generic.Inserted */ +.literal-block .go { color: #888888 } /* Generic.Output */ +.literal-block .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { color: #cccccc; font-weight: bold } /* Generic.Strong */ +.literal-block .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.literal-block .gt { color: #0044DD } /* Generic.Traceback */ +.literal-block .kc { color: #cdcd00 } /* Keyword.Constant */ +.literal-block .kd { color: #00cd00 } /* Keyword.Declaration */ +.literal-block .kn { color: #cd00cd } /* Keyword.Namespace */ +.literal-block .kp { color: #cdcd00 } /* Keyword.Pseudo */ +.literal-block .kr { color: #cdcd00 } /* Keyword.Reserved */ +.literal-block .kt { color: #00cd00 } /* Keyword.Type */ +.literal-block .ld { color: #cccccc } /* Literal.Date */ +.literal-block .m { color: #cd00cd } /* Literal.Number */ +.literal-block .s { color: #cd0000 } /* Literal.String */ +.literal-block .na { color: #cccccc } /* Name.Attribute */ +.literal-block .nb { color: #cd00cd } /* Name.Builtin */ +.literal-block .nc { color: #00cdcd } /* Name.Class */ +.literal-block .no { color: #cccccc } /* Name.Constant */ +.literal-block .nd { color: #cccccc } /* Name.Decorator */ +.literal-block .ni { color: #cccccc } /* Name.Entity */ +.literal-block .ne { color: #666699; font-weight: bold } /* Name.Exception */ +.literal-block .nf { color: #cccccc } /* Name.Function */ +.literal-block .nl { color: #cccccc } /* Name.Label */ +.literal-block .nn { color: #cccccc } /* Name.Namespace */ +.literal-block .nx { color: #cccccc } /* Name.Other */ +.literal-block .py { color: #cccccc } /* Name.Property */ +.literal-block .nt { color: #cccccc } /* Name.Tag */ +.literal-block .nv { color: #00cdcd } /* Name.Variable */ +.literal-block .ow { color: #cdcd00 } /* Operator.Word */ +.literal-block .w { color: #cccccc } /* Text.Whitespace */ +.literal-block .mb { color: #cd00cd } /* Literal.Number.Bin */ +.literal-block .mf { color: #cd00cd } /* Literal.Number.Float */ +.literal-block .mh { color: #cd00cd } /* Literal.Number.Hex */ +.literal-block .mi { color: #cd00cd } /* Literal.Number.Integer */ +.literal-block .mo { color: #cd00cd } /* Literal.Number.Oct */ +.literal-block .sa { color: #cd0000 } /* Literal.String.Affix */ +.literal-block .sb { color: #cd0000 } /* Literal.String.Backtick */ +.literal-block .sc { color: #cd0000 } /* Literal.String.Char */ +.literal-block .dl { color: #cd0000 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #cd0000 } /* Literal.String.Doc */ +.literal-block .s2 { color: #cd0000 } /* Literal.String.Double */ +.literal-block .se { color: #cd0000 } /* Literal.String.Escape */ +.literal-block .sh { color: #cd0000 } /* Literal.String.Heredoc */ +.literal-block .si { color: #cd0000 } /* Literal.String.Interpol */ +.literal-block .sx { color: #cd0000 } /* Literal.String.Other */ +.literal-block .sr { color: #cd0000 } /* Literal.String.Regex */ +.literal-block .s1 { color: #cd0000 } /* Literal.String.Single */ +.literal-block .ss { color: #cd0000 } /* Literal.String.Symbol */ +.literal-block .bp { color: #cd00cd } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #cccccc } /* Name.Function.Magic */ +.literal-block .vc { color: #00cdcd } /* Name.Variable.Class */ +.literal-block .vg { color: #00cdcd } /* Name.Variable.Global */ +.literal-block .vi { color: #00cdcd } /* Name.Variable.Instance */ +.literal-block .vm { color: #00cdcd } /* Name.Variable.Magic */ +.literal-block .il { color: #cd00cd } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/vim.min.css b/theme/pygments/vim.min.css new file mode 100644 index 00000000..bf0f8b93 --- /dev/null +++ b/theme/pygments/vim.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#222}.highlight{background:#000;color:#ccc}.highlight .c{color:navy}.highlight .err{color:#ccc;border:1px solid red}.highlight .esc,.highlight .g{color:#ccc}.highlight .k{color:#cdcd00}.highlight .l,.highlight .n{color:#ccc}.highlight .o{color:#39c}.highlight .p,.highlight .x{color:#ccc}.highlight .c1,.highlight .ch,.highlight .cm,.highlight .cp,.highlight .cpf{color:navy}.highlight .cs{color:#cd0000;font-weight:700}.highlight .gd{color:#cd0000}.highlight .ge{color:#ccc;font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00cd00}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{color:#ccc;font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04d}.highlight .kc{color:#cdcd00}.highlight .kd{color:#00cd00}.highlight .kn{color:#cd00cd}.highlight .kp,.highlight .kr{color:#cdcd00}.highlight .kt{color:#00cd00}.highlight .ld{color:#ccc}.highlight .m{color:#cd00cd}.highlight .s{color:#cd0000}.highlight .na{color:#ccc}.highlight .nb{color:#cd00cd}.highlight .nc{color:#00cdcd}.highlight .nd,.highlight .ni,.highlight .no{color:#ccc}.highlight .ne{color:#669;font-weight:700}.highlight .nf,.highlight .nl,.highlight .nn,.highlight .nt,.highlight .nx,.highlight .py{color:#ccc}.highlight .nv{color:#00cdcd}.highlight .ow{color:#cdcd00}.highlight .w{color:#ccc}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#cd00cd}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#cd0000}.highlight .bp{color:#cd00cd}.highlight .fm{color:#ccc}.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#00cdcd}.highlight .il{color:#cd00cd}.literal-block .hll{background-color:#222}.literal-block{background:#000;color:#ccc}.literal-block .c{color:navy}.literal-block .err{color:#ccc;border:1px solid red}.literal-block .esc,.literal-block .g{color:#ccc}.literal-block .k{color:#cdcd00}.literal-block .l,.literal-block .n{color:#ccc}.literal-block .o{color:#39c}.literal-block .p,.literal-block .x{color:#ccc}.literal-block .c1,.literal-block .ch,.literal-block .cm,.literal-block .cp,.literal-block .cpf{color:navy}.literal-block .cs{color:#cd0000;font-weight:700}.literal-block .gd{color:#cd0000}.literal-block .ge{color:#ccc;font-style:italic}.literal-block .gr{color:red}.literal-block .gh{color:navy;font-weight:700}.literal-block .gi{color:#00cd00}.literal-block .go{color:#888}.literal-block .gp{color:navy;font-weight:700}.literal-block .gs{color:#ccc;font-weight:700}.literal-block .gu{color:purple;font-weight:700}.literal-block .gt{color:#04d}.literal-block .kc{color:#cdcd00}.literal-block .kd{color:#00cd00}.literal-block .kn{color:#cd00cd}.literal-block .kp,.literal-block .kr{color:#cdcd00}.literal-block .kt{color:#00cd00}.literal-block .ld{color:#ccc}.literal-block .m{color:#cd00cd}.literal-block .s{color:#cd0000}.literal-block .na{color:#ccc}.literal-block .nb{color:#cd00cd}.literal-block .nc{color:#00cdcd}.literal-block .nd,.literal-block .ni,.literal-block .no{color:#ccc}.literal-block .ne{color:#669;font-weight:700}.literal-block .nf,.literal-block .nl,.literal-block .nn,.literal-block .nt,.literal-block .nx,.literal-block .py{color:#ccc}.literal-block .nv{color:#00cdcd}.literal-block .ow{color:#cdcd00}.literal-block .w{color:#ccc}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#cd00cd}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#cd0000}.literal-block .bp{color:#cd00cd}.literal-block .fm{color:#ccc}.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#00cdcd}.literal-block .il{color:#cd00cd} \ No newline at end of file diff --git a/theme/pygments/vs.css b/theme/pygments/vs.css new file mode 100644 index 00000000..8fa844dd --- /dev/null +++ b/theme/pygments/vs.css @@ -0,0 +1,76 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #008000 } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #0000ff } /* Keyword */ +.highlight .ch { color: #008000 } /* Comment.Hashbang */ +.highlight .cm { color: #008000 } /* Comment.Multiline */ +.highlight .cp { color: #0000ff } /* Comment.Preproc */ +.highlight .cpf { color: #008000 } /* Comment.PreprocFile */ +.highlight .c1 { color: #008000 } /* Comment.Single */ +.highlight .cs { color: #008000 } /* Comment.Special */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gh { font-weight: bold } /* Generic.Heading */ +.highlight .gp { font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { font-weight: bold } /* Generic.Subheading */ +.highlight .kc { color: #0000ff } /* Keyword.Constant */ +.highlight .kd { color: #0000ff } /* Keyword.Declaration */ +.highlight .kn { color: #0000ff } /* Keyword.Namespace */ +.highlight .kp { color: #0000ff } /* Keyword.Pseudo */ +.highlight .kr { color: #0000ff } /* Keyword.Reserved */ +.highlight .kt { color: #2b91af } /* Keyword.Type */ +.highlight .s { color: #a31515 } /* Literal.String */ +.highlight .nc { color: #2b91af } /* Name.Class */ +.highlight .ow { color: #0000ff } /* Operator.Word */ +.highlight .sa { color: #a31515 } /* Literal.String.Affix */ +.highlight .sb { color: #a31515 } /* Literal.String.Backtick */ +.highlight .sc { color: #a31515 } /* Literal.String.Char */ +.highlight .dl { color: #a31515 } /* Literal.String.Delimiter */ +.highlight .sd { color: #a31515 } /* Literal.String.Doc */ +.highlight .s2 { color: #a31515 } /* Literal.String.Double */ +.highlight .se { color: #a31515 } /* Literal.String.Escape */ +.highlight .sh { color: #a31515 } /* Literal.String.Heredoc */ +.highlight .si { color: #a31515 } /* Literal.String.Interpol */ +.highlight .sx { color: #a31515 } /* Literal.String.Other */ +.highlight .sr { color: #a31515 } /* Literal.String.Regex */ +.highlight .s1 { color: #a31515 } /* Literal.String.Single */ +.highlight .ss { color: #a31515 } /* Literal.String.Symbol */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #008000 } /* Comment */ +.literal-block .err { border: 1px solid #FF0000 } /* Error */ +.literal-block .k { color: #0000ff } /* Keyword */ +.literal-block .ch { color: #008000 } /* Comment.Hashbang */ +.literal-block .cm { color: #008000 } /* Comment.Multiline */ +.literal-block .cp { color: #0000ff } /* Comment.Preproc */ +.literal-block .cpf { color: #008000 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #008000 } /* Comment.Single */ +.literal-block .cs { color: #008000 } /* Comment.Special */ +.literal-block .ge { font-style: italic } /* Generic.Emph */ +.literal-block .gh { font-weight: bold } /* Generic.Heading */ +.literal-block .gp { font-weight: bold } /* Generic.Prompt */ +.literal-block .gs { font-weight: bold } /* Generic.Strong */ +.literal-block .gu { font-weight: bold } /* Generic.Subheading */ +.literal-block .kc { color: #0000ff } /* Keyword.Constant */ +.literal-block .kd { color: #0000ff } /* Keyword.Declaration */ +.literal-block .kn { color: #0000ff } /* Keyword.Namespace */ +.literal-block .kp { color: #0000ff } /* Keyword.Pseudo */ +.literal-block .kr { color: #0000ff } /* Keyword.Reserved */ +.literal-block .kt { color: #2b91af } /* Keyword.Type */ +.literal-block .s { color: #a31515 } /* Literal.String */ +.literal-block .nc { color: #2b91af } /* Name.Class */ +.literal-block .ow { color: #0000ff } /* Operator.Word */ +.literal-block .sa { color: #a31515 } /* Literal.String.Affix */ +.literal-block .sb { color: #a31515 } /* Literal.String.Backtick */ +.literal-block .sc { color: #a31515 } /* Literal.String.Char */ +.literal-block .dl { color: #a31515 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #a31515 } /* Literal.String.Doc */ +.literal-block .s2 { color: #a31515 } /* Literal.String.Double */ +.literal-block .se { color: #a31515 } /* Literal.String.Escape */ +.literal-block .sh { color: #a31515 } /* Literal.String.Heredoc */ +.literal-block .si { color: #a31515 } /* Literal.String.Interpol */ +.literal-block .sx { color: #a31515 } /* Literal.String.Other */ +.literal-block .sr { color: #a31515 } /* Literal.String.Regex */ +.literal-block .s1 { color: #a31515 } /* Literal.String.Single */ +.literal-block .ss { color: #a31515 } /* Literal.String.Symbol */ \ No newline at end of file diff --git a/theme/pygments/vs.min.css b/theme/pygments/vs.min.css new file mode 100644 index 00000000..d32018e3 --- /dev/null +++ b/theme/pygments/vs.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:green}.highlight .err{border:1px solid red}.highlight .k{color:#00f}.highlight .ch,.highlight .cm{color:green}.highlight .cp{color:#00f}.highlight .c1,.highlight .cpf,.highlight .cs{color:green}.highlight .ge{font-style:italic}.highlight .gh,.highlight .gp,.highlight .gs,.highlight .gu{font-weight:700}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr{color:#00f}.highlight .kt{color:#2b91af}.highlight .s{color:#a31515}.highlight .nc{color:#2b91af}.highlight .ow{color:#00f}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sa,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#a31515}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:green}.literal-block .err{border:1px solid red}.literal-block .k{color:#00f}.literal-block .ch,.literal-block .cm{color:green}.literal-block .cp{color:#00f}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:green}.literal-block .ge{font-style:italic}.literal-block .gh,.literal-block .gp,.literal-block .gs,.literal-block .gu{font-weight:700}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr{color:#00f}.literal-block .kt{color:#2b91af}.literal-block .s{color:#a31515}.literal-block .nc{color:#2b91af}.literal-block .ow{color:#00f}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sa,.literal-block .sb,.literal-block .sc,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#a31515} \ No newline at end of file diff --git a/theme/pygments/xcode.css b/theme/pygments/xcode.css new file mode 100644 index 00000000..856ad1bf --- /dev/null +++ b/theme/pygments/xcode.css @@ -0,0 +1,126 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #177500 } /* Comment */ +.highlight .err { color: #000000 } /* Error */ +.highlight .k { color: #A90D91 } /* Keyword */ +.highlight .l { color: #1C01CE } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #000000 } /* Operator */ +.highlight .ch { color: #177500 } /* Comment.Hashbang */ +.highlight .cm { color: #177500 } /* Comment.Multiline */ +.highlight .cp { color: #633820 } /* Comment.Preproc */ +.highlight .cpf { color: #177500 } /* Comment.PreprocFile */ +.highlight .c1 { color: #177500 } /* Comment.Single */ +.highlight .cs { color: #177500 } /* Comment.Special */ +.highlight .kc { color: #A90D91 } /* Keyword.Constant */ +.highlight .kd { color: #A90D91 } /* Keyword.Declaration */ +.highlight .kn { color: #A90D91 } /* Keyword.Namespace */ +.highlight .kp { color: #A90D91 } /* Keyword.Pseudo */ +.highlight .kr { color: #A90D91 } /* Keyword.Reserved */ +.highlight .kt { color: #A90D91 } /* Keyword.Type */ +.highlight .ld { color: #1C01CE } /* Literal.Date */ +.highlight .m { color: #1C01CE } /* Literal.Number */ +.highlight .s { color: #C41A16 } /* Literal.String */ +.highlight .na { color: #836C28 } /* Name.Attribute */ +.highlight .nb { color: #A90D91 } /* Name.Builtin */ +.highlight .nc { color: #3F6E75 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #000000 } /* Name.Decorator */ +.highlight .ni { color: #000000 } /* Name.Entity */ +.highlight .ne { color: #000000 } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #000000 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #000000 } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #000000 } /* Operator.Word */ +.highlight .mb { color: #1C01CE } /* Literal.Number.Bin */ +.highlight .mf { color: #1C01CE } /* Literal.Number.Float */ +.highlight .mh { color: #1C01CE } /* Literal.Number.Hex */ +.highlight .mi { color: #1C01CE } /* Literal.Number.Integer */ +.highlight .mo { color: #1C01CE } /* Literal.Number.Oct */ +.highlight .sa { color: #C41A16 } /* Literal.String.Affix */ +.highlight .sb { color: #C41A16 } /* Literal.String.Backtick */ +.highlight .sc { color: #2300CE } /* Literal.String.Char */ +.highlight .dl { color: #C41A16 } /* Literal.String.Delimiter */ +.highlight .sd { color: #C41A16 } /* Literal.String.Doc */ +.highlight .s2 { color: #C41A16 } /* Literal.String.Double */ +.highlight .se { color: #C41A16 } /* Literal.String.Escape */ +.highlight .sh { color: #C41A16 } /* Literal.String.Heredoc */ +.highlight .si { color: #C41A16 } /* Literal.String.Interpol */ +.highlight .sx { color: #C41A16 } /* Literal.String.Other */ +.highlight .sr { color: #C41A16 } /* Literal.String.Regex */ +.highlight .s1 { color: #C41A16 } /* Literal.String.Single */ +.highlight .ss { color: #C41A16 } /* Literal.String.Symbol */ +.highlight .bp { color: #5B269A } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #1C01CE } /* Literal.Number.Integer.Long */ +.literal-block .hll { background-color: #ffffcc } +.literal-block { background: #ffffff; } +.literal-block .c { color: #177500 } /* Comment */ +.literal-block .err { color: #000000 } /* Error */ +.literal-block .k { color: #A90D91 } /* Keyword */ +.literal-block .l { color: #1C01CE } /* Literal */ +.literal-block .n { color: #000000 } /* Name */ +.literal-block .o { color: #000000 } /* Operator */ +.literal-block .ch { color: #177500 } /* Comment.Hashbang */ +.literal-block .cm { color: #177500 } /* Comment.Multiline */ +.literal-block .cp { color: #633820 } /* Comment.Preproc */ +.literal-block .cpf { color: #177500 } /* Comment.PreprocFile */ +.literal-block .c1 { color: #177500 } /* Comment.Single */ +.literal-block .cs { color: #177500 } /* Comment.Special */ +.literal-block .kc { color: #A90D91 } /* Keyword.Constant */ +.literal-block .kd { color: #A90D91 } /* Keyword.Declaration */ +.literal-block .kn { color: #A90D91 } /* Keyword.Namespace */ +.literal-block .kp { color: #A90D91 } /* Keyword.Pseudo */ +.literal-block .kr { color: #A90D91 } /* Keyword.Reserved */ +.literal-block .kt { color: #A90D91 } /* Keyword.Type */ +.literal-block .ld { color: #1C01CE } /* Literal.Date */ +.literal-block .m { color: #1C01CE } /* Literal.Number */ +.literal-block .s { color: #C41A16 } /* Literal.String */ +.literal-block .na { color: #836C28 } /* Name.Attribute */ +.literal-block .nb { color: #A90D91 } /* Name.Builtin */ +.literal-block .nc { color: #3F6E75 } /* Name.Class */ +.literal-block .no { color: #000000 } /* Name.Constant */ +.literal-block .nd { color: #000000 } /* Name.Decorator */ +.literal-block .ni { color: #000000 } /* Name.Entity */ +.literal-block .ne { color: #000000 } /* Name.Exception */ +.literal-block .nf { color: #000000 } /* Name.Function */ +.literal-block .nl { color: #000000 } /* Name.Label */ +.literal-block .nn { color: #000000 } /* Name.Namespace */ +.literal-block .nx { color: #000000 } /* Name.Other */ +.literal-block .py { color: #000000 } /* Name.Property */ +.literal-block .nt { color: #000000 } /* Name.Tag */ +.literal-block .nv { color: #000000 } /* Name.Variable */ +.literal-block .ow { color: #000000 } /* Operator.Word */ +.literal-block .mb { color: #1C01CE } /* Literal.Number.Bin */ +.literal-block .mf { color: #1C01CE } /* Literal.Number.Float */ +.literal-block .mh { color: #1C01CE } /* Literal.Number.Hex */ +.literal-block .mi { color: #1C01CE } /* Literal.Number.Integer */ +.literal-block .mo { color: #1C01CE } /* Literal.Number.Oct */ +.literal-block .sa { color: #C41A16 } /* Literal.String.Affix */ +.literal-block .sb { color: #C41A16 } /* Literal.String.Backtick */ +.literal-block .sc { color: #2300CE } /* Literal.String.Char */ +.literal-block .dl { color: #C41A16 } /* Literal.String.Delimiter */ +.literal-block .sd { color: #C41A16 } /* Literal.String.Doc */ +.literal-block .s2 { color: #C41A16 } /* Literal.String.Double */ +.literal-block .se { color: #C41A16 } /* Literal.String.Escape */ +.literal-block .sh { color: #C41A16 } /* Literal.String.Heredoc */ +.literal-block .si { color: #C41A16 } /* Literal.String.Interpol */ +.literal-block .sx { color: #C41A16 } /* Literal.String.Other */ +.literal-block .sr { color: #C41A16 } /* Literal.String.Regex */ +.literal-block .s1 { color: #C41A16 } /* Literal.String.Single */ +.literal-block .ss { color: #C41A16 } /* Literal.String.Symbol */ +.literal-block .bp { color: #5B269A } /* Name.Builtin.Pseudo */ +.literal-block .fm { color: #000000 } /* Name.Function.Magic */ +.literal-block .vc { color: #000000 } /* Name.Variable.Class */ +.literal-block .vg { color: #000000 } /* Name.Variable.Global */ +.literal-block .vi { color: #000000 } /* Name.Variable.Instance */ +.literal-block .vm { color: #000000 } /* Name.Variable.Magic */ +.literal-block .il { color: #1C01CE } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/theme/pygments/xcode.min.css b/theme/pygments/xcode.min.css new file mode 100644 index 00000000..29d94426 --- /dev/null +++ b/theme/pygments/xcode.min.css @@ -0,0 +1 @@ +.highlight .hll{background-color:#ffc}.highlight{background:#fff}.highlight .c{color:#177500}.highlight .err{color:#000}.highlight .k{color:#a90d91}.highlight .l{color:#1c01ce}.highlight .n,.highlight .o{color:#000}.highlight .ch,.highlight .cm{color:#177500}.highlight .cp{color:#633820}.highlight .c1,.highlight .cpf,.highlight .cs{color:#177500}.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#a90d91}.highlight .ld,.highlight .m{color:#1c01ce}.highlight .s{color:#c41a16}.highlight .na{color:#836c28}.highlight .nb{color:#a90d91}.highlight .nc{color:#3f6e75}.highlight .nd,.highlight .ne,.highlight .nf,.highlight .ni,.highlight .nl,.highlight .nn,.highlight .no,.highlight .nt,.highlight .nv,.highlight .nx,.highlight .ow,.highlight .py{color:#000}.highlight .mb,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#1c01ce}.highlight .sa,.highlight .sb{color:#c41a16}.highlight .sc{color:#2300ce}.highlight .dl,.highlight .s1,.highlight .s2,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sr,.highlight .ss,.highlight .sx{color:#c41a16}.highlight .bp{color:#5b269a}.highlight .fm,.highlight .vc,.highlight .vg,.highlight .vi,.highlight .vm{color:#000}.highlight .il{color:#1c01ce}.literal-block .hll{background-color:#ffc}.literal-block{background:#fff}.literal-block .c{color:#177500}.literal-block .err{color:#000}.literal-block .k{color:#a90d91}.literal-block .l{color:#1c01ce}.literal-block .n,.literal-block .o{color:#000}.literal-block .ch,.literal-block .cm{color:#177500}.literal-block .cp{color:#633820}.literal-block .c1,.literal-block .cpf,.literal-block .cs{color:#177500}.literal-block .kc,.literal-block .kd,.literal-block .kn,.literal-block .kp,.literal-block .kr,.literal-block .kt{color:#a90d91}.literal-block .ld,.literal-block .m{color:#1c01ce}.literal-block .s{color:#c41a16}.literal-block .na{color:#836c28}.literal-block .nb{color:#a90d91}.literal-block .nc{color:#3f6e75}.literal-block .nd,.literal-block .ne,.literal-block .nf,.literal-block .ni,.literal-block .nl,.literal-block .nn,.literal-block .no,.literal-block .nt,.literal-block .nv,.literal-block .nx,.literal-block .ow,.literal-block .py{color:#000}.literal-block .mb,.literal-block .mf,.literal-block .mh,.literal-block .mi,.literal-block .mo{color:#1c01ce}.literal-block .sa,.literal-block .sb{color:#c41a16}.literal-block .sc{color:#2300ce}.literal-block .dl,.literal-block .s1,.literal-block .s2,.literal-block .sd,.literal-block .se,.literal-block .sh,.literal-block .si,.literal-block .sr,.literal-block .ss,.literal-block .sx{color:#c41a16}.literal-block .bp{color:#5b269a}.literal-block .fm,.literal-block .vc,.literal-block .vg,.literal-block .vi,.literal-block .vm{color:#000}.literal-block .il{color:#1c01ce} \ No newline at end of file diff --git a/theme/stylesheet/dark-theme.less b/theme/stylesheet/dark-theme.less new file mode 100644 index 00000000..5997723b --- /dev/null +++ b/theme/stylesheet/dark-theme.less @@ -0,0 +1,165 @@ +// +// Dark Theme CSS styles. +// + +@import "variables.less"; + +body { + background-color: @body-bg-dark-theme; + color: @text-color-dark-theme; +} + +hr { + background-color: @solid-dark-grey; + color: @solid-dark-grey; +} + +aside { + background-color: @sidebar-bg-dark-theme; + color: @sidebar-text-color; + + form.navbar-search input#tipue_search_input { + background-color: @very-dark-grey; + color: @light-grey; + } +} + +main { + nav { + border-bottom-color: @nav-border-color-dark-theme; + } + + nav, .translations { + a { + border-color: @nav-border-color-dark-theme; + } + } + + article { + kbd { + background-color: #080808; + color: @light-grey; + } + + blockquote, pre { + border-left: 8px solid #ffffff33; + } + + *:not(pre) > code { + background-color: #080808; + border-color: #000; + } + + div#tipue_search_content .tipue_search_result { + span.tipue_search_content_bold { + color: white; + } + } + + section#isso-thread { + div.textarea, + .auth-section p.input-wrapper input, + .notification-section input { + background: @very-dark-grey; + color: @light-grey; + } + + >h4 { + color: @light-grey; + } + + .isso-postbox > .form-wrapper .preview { + background: repeating-linear-gradient( + -45deg, + @solid-dark-grey, @solid-dark-grey 10px, + @very-dark-grey 10px, @very-dark-grey 20px + ); + } + + .isso-comment > div.text-wrapper { + > .isso-comment-header { + .author { + color: @light-grey; + } + + .spacer, a.permalink, .note, a.parent { + color: @med-grey; + + &:hover { + color: @light-grey; + } + } + } + + > .isso-comment-footer a:hover { + // Unfortunately, Isso uses a lot of !important in its styles, so I + // have to override that. + text-shadow: @dark-grey 0 0 1px !important; + } + } + } + } + + footer { + border-top-color: @footer-border-color-dark-theme; + } +} + +div.related-posts { + border-color: @rel-post-border-color-dark-theme; +} + +// Admonition +div.admonition { + color: @admonition-generic-color-dark-theme; + background-color: @admonition-generic-bg-color-dark-theme; +} + +div.admonition.attention { + color: @admonition-attention-color-dark-theme; + background-color: @admonition-attention-bg-color-dark-theme; +} + +div.admonition.caution { + color: @admonition-caution-color-dark-theme; + background-color: @admonition-caution-bg-color-dark-theme; +} + +div.admonition.danger { + color: @admonition-danger-color-dark-theme; + background-color: @admonition-danger-bg-color-dark-theme; +} + +div.admonition.error { + color: @admonition-error-color-dark-theme; + background-color: @admonition-error-bg-color-dark-theme; +} + +div.admonition.hint { + color: @admonition-hint-color-dark-theme; + background-color: @admonition-hint-bg-color-dark-theme; +} + +div.admonition.important { + color: @admonition-important-color-dark-theme; + background-color: @admonition-important-bg-color-dark-theme; +} + +div.admonition.note { + color: @admonition-note-color-dark-theme; + background-color: @admonition-note-bg-color-dark-theme; +} + +div.admonition.tip { + color: @admonition-tip-color-dark-theme; + background-color: @admonition-tip-bg-color-dark-theme; +} + +div.admonition.warning { + color: @admonition-warning-color-dark-theme; + background-color: @admonition-warning-bg-color-dark-theme; +} + +div.figure { + color: @figure-color-dark-theme; +} diff --git a/theme/stylesheet/dark-theme.min.css b/theme/stylesheet/dark-theme.min.css new file mode 100644 index 00000000..b3855f25 --- /dev/null +++ b/theme/stylesheet/dark-theme.min.css @@ -0,0 +1 @@ +body{background-color:#333;color:#eee}hr{color:#222}aside,hr{background-color:#222}aside{color:#fff}aside form.navbar-search input#tipue_search_input{background-color:#1a1a1a;color:#eee}main nav{border-bottom-color:#222}main .translations a,main nav a{border-color:#222}main article kbd{background-color:#080808;color:#eee}main article blockquote,main article pre{border-left:8px solid #ffffff33}main article :not(pre)>code{background-color:#080808;border-color:#000}main article div#tipue_search_content .tipue_search_result span.tipue_search_content_bold{color:#fff}main article section#isso-thread .auth-section p.input-wrapper input,main article section#isso-thread .notification-section input,main article section#isso-thread div.textarea{background:#1a1a1a;color:#eee}main article section#isso-thread>h4{color:#eee}main article section#isso-thread .isso-postbox>.form-wrapper .preview{background:repeating-linear-gradient(-45deg,#222,#222 10px,#1a1a1a 0,#1a1a1a 20px)}main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header .author{color:#eee}main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header .note,main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header .spacer,main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header a.parent,main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header a.permalink{color:#999}main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header .note:hover,main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header .spacer:hover,main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header a.parent:hover,main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-header a.permalink:hover{color:#eee}main article section#isso-thread .isso-comment>div.text-wrapper>.isso-comment-footer a:hover{text-shadow:#242121 0 0 1px!important}main footer{border-top-color:#222}div.related-posts{border-color:#222}div.admonition{color:#eee;background-color:#404040}div.admonition.attention,div.admonition.caution{color:#fbda7a;background-color:#4a3900}div.admonition.danger,div.admonition.error{color:#ebadb3;background-color:#28070a}div.admonition.hint{color:#7abaff;background-color:#001933}div.admonition.important,div.admonition.note{color:#a8eab7;background-color:#122b18}div.admonition.tip{color:#7abaff;background-color:#001933}div.admonition.warning{color:#fbda7a;background-color:#4a3900}div.figure{color:#bfbfbf} \ No newline at end of file diff --git a/theme/stylesheet/style.less b/theme/stylesheet/style.less new file mode 100644 index 00000000..cc6a83a0 --- /dev/null +++ b/theme/stylesheet/style.less @@ -0,0 +1,732 @@ +@import "variables.less"; + +html, body { + width: 100%; + height: 100%; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; + line-height: 1.1; +} + +h1{ + font-size: 2.4em +} + +h2 { + font-size: 2em +} + +h3 { + font-size: 1.6em +} + +h4 { + font-size: 1.36em +} + +h5 { + font-size: 1.2em +} + +h6 { + font-size: 1.1em +} + +body { + margin: 0; + padding: 0; + background-color: @body-bg; + color: @text-color; + font-family: @sans; + font-size: 1.02em; + line-height: 1.2em; +} + +a { + color: @link-color; + text-decoration: none; +} + +a:hover { + color: @link-hover-color; +} + +hr { + color: @light-grey; + background-color: @light-grey; + height: 1px; + border: none; + margin-top: 40px; + margin-bottom: 40px; +} + +img { + max-width: 100%; +} + +aside { + background-color: @sidebar-bg; + color: @sidebar-text-color; + text-align: center; + + a { + color: @sidebar-link-color; + } + + a:hover { + color: @sidebar-link-hover-color; + } + + div { + padding: 20px; + margin: 0; + + img { + border-radius: 50%; + max-width: 140px; + } + + h1 { + margin: 15px 0 5px 0; + } + + p { + margin: 0 0 15px 0; + font-size: .92em; + } + } + + nav { + ul { + li { + display: inline; + line-height: 1.6em; + font-size: 1.28em; + text-transform: lowercase; + } + } + } +} + +main { + nav { + text-align: center; + text-transform: uppercase; + padding: 14px 0 14px 0; + border-bottom: @nav-border-color 1px solid; + + // Need to use font-size of 0 so that whitespace between the tags + // doesn't have an affect on alignment. + font-size: 0; + } + + nav, .translations { + a { + font-size: 12px; + padding: 0 4px; + border-right: @nav-border-color 1px solid; + } + + :last-child { + border-right: none; + } + } + + .neighbors { + margin: 4% 0% 4% 0%; + height: 20px; + } + + .pagination { + margin: 4% 8% 4% 8%; + height: 20px; + } + + .social-share { + p { + font-size: .8em; + } + } + + article { + margin: 0 8% 2% 8%; + + header { + h1, h2 { + margin-bottom: 0; + } + + p { + color: @header-text-color; + font-size: 0.86em; + } + + .translations { + float: right; + + .active { + font-weight: 600; + } + } + } + + code, kbd, samp, pre { + font-family: @mono; + } + + blockquote, pre { + background-color: rgba(128,128,128,0.05); + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + border-left: 8px solid rgba(128,128,128,0.075); + border-left-width: 10px; + } + + blockquote { + margin: 0; + padding: 10px 20px; + font-weight: 300; + font-size: 1.1em; + } + + pre { + padding: 4px; + font-size: .9em; + overflow-x: auto; + } + + samp { + white-space: pre; + display: block; + overflow-x: auto; + } + + kbd { + padding: .1em .6em; + border: 1px solid rgba(63,63,63,0.25); + box-shadow: 0 1px 0 rgba(63,63,63,0.25); + background-color: #fff; + color: #333; + border-radius: 3px; + display: inline-block; + margin: 0 .1em; + white-space: nowrap; + font-size: .78em; + } + + *:not(pre) > code { + font-size: .8em; + white-space: nowrap; + color: #c25; + padding: 1px 3px; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + border-radius: 3px; + } + + .comment-count { + font-size: .8em; + } + + table { + border-collapse: collapse; + border-spacing: 0; + + thead:first-child tr:first-child th { + border-top: 0; + } + + th, td { + padding: 8px; + line-height: 20px; + vertical-align: top; + border-top: 1px solid #ddd; + } + } + + table.highlighttable { + width: 100%; + table-layout: fixed; + + td { + border-style: none; + padding: 0px; + } + + td.linenos { + width: 2.5em; + + pre { + padding-right: .8em; + background-color: inherit; + text-align: right; + } + } + } + + // Add a bit of padding between each of the entry boxes in the Isso auth + // section. By default, they are squished together, which looks terrible. + section#isso-thread .auth-section .input-wrapper { + margin-right: 5px; + } + } + + footer { + padding-top: 4px; + border-top: @footer-border-color 1px solid; + + p { + margin: 2px; + text-align: center; + padding: 0 40px 0 40px; + color: @footer-text-color; + font-size: 11px; + } + + // Flex credits and theme selection separator + span.footer-separator { + margin: 0 6px; + } + } +} + +.tag-cloud { + a { + background-color: @tag-bg; + padding: .2em .6em .2em; + font-size: .74em; + line-height: 1; + color: @tag-text-color; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; + } + + a:hover { + background-color: @tag-hover-color; + } +} + +a.btn, +section#isso-thread section.auth-section p.post-action input { + background-color: @btn-bg; + padding: .6em .6em; + font-size: .8em; + line-height: 1; + color: @btn-text-color; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border: none; + border-radius: .25em; +} + +a.btn:hover { + background-color: @btn-hover-color; +} + +.center, .text-center { + text-align: center; +} + +.img-center { + margin-left: auto; + margin-right: auto; + display: block; +} + +.align-center { + margin-left: auto; + margin-right: auto; + display: block; +} + +.float-left { + float: left; +} + +.float-right { + float: right; +} + +div.related-posts { + margin: 15px 0 15px 0; + padding-bottom: 20px; + border-top: @rel-post-border-color 1px solid; + border-bottom: @rel-post-border-color 1px solid; + + h4 { + margin: 20px 0 25px 0; + } + + ul { + font-size: 1.1em; + padding-left: 12px; + + li { + padding: 4px 0 4px 0; + } + } +} + +ul.list, ul.social, ul.related-posts { + list-style-type: none; + margin: 0; + padding: 0; +} + +ul.list { + padding: 1em 0 1em 0; + + li { + padding: 4px; + } +} + +ul.social { + font-size: 1.6em; + padding-top: 20px; + + li { + display: inline; + } + + a:hover { + z-index: 2; + -webkit-transform: translateY(-2px); + transform: translateY(-2px); + } + + a { + display: inline-block; + width: 36px; + height: 36px; + border-radius: 100%; + text-align: center; + font-size: .8em; + line-height: 36px; + } + + a.sc-facebook { + background-color: @facebook-bg-color; + } + + a.sc-google { + background-color: @google-bg-color; + } + + a.sc-instagram { + background-color: @instagram-bg-color; + } + + a.sc-keybase { + background-color: @keybase-bg-color; + } + + a.sc-pinterest { + background-color: @pinterest-bg-color; + } + + a.sc-linkedin { + background-color: @linkedin-bg-color; + } + + a.sc-medium { + background-color: @medium-bg-color; + } + + a.sc-rss { + background-color: @rss-bg-color; + } + + a.sc-stack-overflow { + background-color: @stack-overflow-bg-color; + } + + a.sc-tumblr { + background-color: @tumblr-bg-color; + } + + a.sc-twitch { + background-color: @twitch-bg-color; + } + + a.sc-twitter { + background-color: @twitter-bg-color; + } + + a.sc-youtube { + background-color: @youtube-bg-color; + } + + a.sc-github, a.sc-github-alt { + background-color: @github-bg-color; + } + + a.sc-envelope { + background-color: @email-bg-color; + } + + a.sc-reddit { + background-color: @reddit-bg-color; + } + + a.sc-soundcloud { + background-color: @soundcloud-bg-color; + } + + a.sc-gitlab { + background-color: @gitlab-bg-color; + } + + a.sc-xing { + background-color: @xing-bg-color; + } + + a.sc-bitbucket { + background-color: @bitbucket-bg-color; + } + + a.sc-mastodon { + background-color: @mastodon-bg-color; + } + + a.sc-diaspora { + color: @diaspora-color; + background-color: @diaspora-bg-color; + } + + a.sc-flickr { + background-color: @flickr-bg-color; + } + + a.sc-lastfm { + background-color: @lastfm-bg-color; + } +} + +.ads-aside { + display: inline-block; + height: 90px; + width: 70%; +} + +.ads-responsive { + display: inline-block; + margin: 6px 0 6px 0; + width: 90%; + height: 70px; + margin-left: 5%; +} + +// +// Desktop +// + +@media screen and (min-width: 768px) { + aside { + width: 25vw; + height: 100vh; + position: fixed; + z-index: 1000; + top: 0; + left: 0; + + div { + padding: 36px 18px; + + nav { + ul { + li { + padding: 0 !important; + display: block; + } + } + } + + ul.social { + padding-top: 32px; + } + } + } + + main { + height: 100vh; + position: relative; + padding-left: 25vw; + + article { + max-width: 760px; + + ul.list { + li { + padding: 2px; + } + } + } + } + + .ads-aside { + height: 250px; + } + + .ads-responsive { + height: 90px; + } +} + +// Admonition +div.admonition { + margin-bottom: 2.5rem; + border-radius: 4px; + padding: 0.5em 1.25em 1.25em 1.25em; + + p.admonition-title::before { + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + font-family: "Font Awesome 5 Free"; + } + + p.admonition-title { + font-weight: 600; + line-height: 1.25em; + margin-bottom: 1.25em; + margin-top: inherit; + } + + p, div, pre { + margin-bottom: 0; + } +} + +div.admonition { + color: @admonition-generic-color; + background-color: @admonition-generic-bg-color; +} + +div.admonition.attention { + p.admonition-title::before { + content: @admonition-attention-icon; + } + + color: @admonition-attention-color; + background-color: @admonition-attention-bg-color; +} + +div.admonition.caution { + p.admonition-title::before { + content: @admonition-caution-icon; + } + + color: @admonition-caution-color; + background-color: @admonition-caution-bg-color; +} + +div.admonition.danger { + p.admonition-title::before { + content: @admonition-danger-icon; + } + + color: @admonition-danger-color; + background-color: @admonition-danger-bg-color; +} + +div.admonition.error { + p.admonition-title::before { + content: @admonition-error-icon; + } + + color: @admonition-error-color; + background-color: @admonition-error-bg-color; +} + +div.admonition.hint { + p.admonition-title::before { + content: @admonition-hint-icon; + } + + color: @admonition-hint-color; + background-color: @admonition-hint-bg-color; +} + +div.admonition.important { + p.admonition-title::before { + content: @admonition-important-icon; + } + + color: @admonition-important-color; + background-color: @admonition-important-bg-color; +} + +div.admonition.note { + p.admonition-title::before { + content: @admonition-note-icon; + } + + color: @admonition-note-color; + background-color: @admonition-note-bg-color; +} + +div.admonition.tip { + p.admonition-title::before { + content: @admonition-tip-icon; + } + + color: @admonition-tip-color; + background-color: @admonition-tip-bg-color; +} + +div.admonition.warning { + p.admonition-title::before { + content: @admonition-warning-icon; + } + + color: @admonition-warning-color; + background-color: @admonition-warning-bg-color; +} + +div.figure { + font-size: 90%; + color: @figure-color; + + img { + vertical-align: middle; + line-height: 1; + display: inline; + } + + p { + margin-top: 0; + margin-bottom: 0; + } + + p.caption { + font-style: italic; + } + + div.legend { + text-align: initial; + } +} + +div.figure.align-left { + text-align: left; +} + +div.figure.align-center { + text-align: center; +} + +div.figure.align-right { + text-align: right; +} diff --git a/theme/stylesheet/style.min.css b/theme/stylesheet/style.min.css new file mode 100644 index 00000000..b201a0eb --- /dev/null +++ b/theme/stylesheet/style.min.css @@ -0,0 +1 @@ +body,html{width:100%;height:100%}h1,h2,h3,h4,h5,h6{font-weight:300;line-height:1.1}h1{font-size:2.4em}h2{font-size:2em}h3{font-size:1.6em}h4{font-size:1.36em}h5{font-size:1.2em}h6{font-size:1.1em}body{margin:0;padding:0;background-color:#fff;color:#242121;font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-size:1.02em;line-height:1.2em}a{color:#d9411e;text-decoration:none}a:hover{color:#ff5a09}hr{color:#eee;background-color:#eee;height:1px;border:none;margin-top:40px;margin-bottom:40px}img{max-width:100%}aside{background-color:#333;text-align:center}aside,aside a{color:#fff}aside a:hover{color:#eee}aside div{padding:20px;margin:0}aside div img{border-radius:50%;max-width:140px}aside div h1{margin:15px 0 5px}aside div p{margin:0 0 15px;font-size:.92em}aside nav ul li{display:inline;line-height:1.6em;font-size:1.28em;text-transform:lowercase}main nav{text-align:center;text-transform:uppercase;padding:14px 0;border-bottom:1px solid #eee;font-size:0}main .translations a,main nav a{font-size:12px;padding:0 4px;border-right:1px solid #eee}main .translations :last-child,main nav :last-child{border-right:none}main .neighbors{margin:4% 0;height:20px}main .pagination{margin:4% 8%;height:20px}main .social-share p{font-size:.8em}main article{margin:0 8% 2%}main article header h1,main article header h2{margin-bottom:0}main article header p{color:#999;font-size:.86em}main article header .translations{float:right}main article header .translations .active{font-weight:600}main article code,main article kbd,main article pre,main article samp{font-family:Source Code Pro,Consolas,Liberation Mono,DejaVu Sans Mono,monospace}main article blockquote,main article pre{background-color:hsla(0,0%,50%,.05);border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:8px solid hsla(0,0%,50%,.075);border-left-width:10px}main article blockquote{margin:0;padding:10px 20px;font-weight:300;font-size:1.1em}main article pre{padding:4px;font-size:.9em;overflow-x:auto}main article samp{white-space:pre;display:block;overflow-x:auto}main article kbd{padding:.1em .6em;border:1px solid rgba(63,63,63,.25);box-shadow:0 1px 0 rgba(63,63,63,.25);background-color:#fff;color:#333;border-radius:3px;display:inline-block;margin:0 .1em;white-space:nowrap;font-size:.78em}main article :not(pre)>code{font-size:.8em;white-space:nowrap;color:#c25;padding:1px 3px;background-color:#f7f7f9;border:1px solid #e1e1e8;border-radius:3px}main article .comment-count{font-size:.8em}main article table{border-collapse:collapse;border-spacing:0}main article table thead:first-child tr:first-child th{border-top:0}main article table td,main article table th{padding:8px;line-height:20px;vertical-align:top;border-top:1px solid #ddd}main article table.highlighttable{width:100%;table-layout:fixed}main article table.highlighttable td{border-style:none;padding:0}main article table.highlighttable td.linenos{width:2.5em}main article table.highlighttable td.linenos pre{padding-right:.8em;background-color:inherit;text-align:right}main article section#isso-thread .auth-section .input-wrapper{margin-right:5px}main footer{padding-top:4px;border-top:1px solid #eee}main footer p{margin:2px;text-align:center;padding:0 40px;color:#999;font-size:11px}main footer span.footer-separator{margin:0 6px}.tag-cloud a{background-color:#d9411e;padding:.2em .6em;font-size:.74em;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.tag-cloud a:hover{background-color:#ff5a09}a.btn,section#isso-thread section.auth-section p.post-action input{background-color:#d9411e;padding:.6em;font-size:.8em;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border:none;border-radius:.25em}a.btn:hover{background-color:#ff5a09}.center,.text-center{text-align:center}.align-center,.img-center{margin-left:auto;margin-right:auto;display:block}.float-left{float:left}.float-right{float:right}div.related-posts{margin:15px 0;padding-bottom:20px;border-top:1px solid #eee;border-bottom:1px solid #eee}div.related-posts h4{margin:20px 0 25px}div.related-posts ul{font-size:1.1em;padding-left:12px}div.related-posts ul li{padding:4px 0}ul.list,ul.related-posts,ul.social{list-style-type:none;margin:0;padding:0}ul.list{padding:1em 0}ul.list li{padding:4px}ul.social{font-size:1.6em;padding-top:20px}ul.social li{display:inline}ul.social a:hover{z-index:1;transform:translateY(-2px)}ul.social a{display:inline-block;width:36px;height:36px;border-radius:100%;text-align:center;font-size:.8em;line-height:36px}ul.social a.sc-facebook{background-color:#3e5b98}ul.social a.sc-google{background-color:#d93e2d}ul.social a.sc-instagram{background-color:#125688}ul.social a.sc-keybase{background-color:#4c8dff}ul.social a.sc-pinterest{background-color:#c92619}ul.social a.sc-linkedin{background-color:#3371b7}ul.social a.sc-medium{background-color:#00ab6b}ul.social a.sc-rss{background-color:#f26109}ul.social a.sc-stack-overflow{background-color:#f90}ul.social a.sc-tumblr{background-color:#36465d}ul.social a.sc-twitch{background-color:#a970ff}ul.social a.sc-twitter{background-color:#4da7de}ul.social a.sc-youtube{background-color:#e02a20}ul.social a.sc-github,ul.social a.sc-github-alt{background-color:#111010}ul.social a.sc-envelope{background-color:#578ad6}ul.social a.sc-reddit{background-color:#ff4500}ul.social a.sc-soundcloud{background-color:#f50}ul.social a.sc-gitlab{background-color:#fca326}ul.social a.sc-xing{background-color:#007575}ul.social a.sc-bitbucket{background-color:#0747a6}ul.social a.sc-mastodon{background-color:#3088d4}ul.social a.sc-diaspora{color:#000;background-color:#d5d5d5}ul.social a.sc-flickr{background-color:#ff0084}ul.social a.sc-lastfm{background-color:#d92323}.ads-aside{display:inline-block;height:90px;width:70%}.ads-responsive{display:inline-block;margin:6px 0;width:90%;height:70px;margin-left:5%}@media screen and (min-width:768px){aside{width:25vw;height:100vh;position:fixed;z-index:2;top:0;left:0}aside div{padding:36px 18px}aside div nav ul li{padding:0!important;display:block}aside div ul.social{padding-top:32px}main{height:100vh;position:relative;padding-left:25vw}main article{max-width:760px}main article ul.list li{padding:2px}.ads-aside{height:250px}.ads-responsive{height:90px}}div.admonition{margin-bottom:2.5rem;border-radius:4px;padding:.5em 1.25em 1.25em}div.admonition p.admonition-title:before{display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;font-family:Font Awesome\ 5 Free}div.admonition p.admonition-title{font-weight:600;line-height:1.25em;margin-bottom:1.25em;margin-top:inherit}div.admonition div,div.admonition p,div.admonition pre{margin-bottom:0}div.admonition{color:#242121;background-color:#ccc}div.admonition.attention{color:#856404;background-color:#fff3cd}div.admonition.attention p.admonition-title:before{content:"\f071\00a0 "}div.admonition.caution{color:#856404;background-color:#fff3cd}div.admonition.caution p.admonition-title:before{content:"\f071\00a0 "}div.admonition.danger{color:#721c24;background-color:#f8d7da}div.admonition.danger p.admonition-title:before{content:"\f06a\00a0 "}div.admonition.error{color:#721c24;background-color:#f8d7da}div.admonition.error p.admonition-title:before{content:"\f06a\00a0 "}div.admonition.hint{color:#004085;background-color:#cce5ff}div.admonition.hint p.admonition-title:before{content:"\f0eb\00a0 "}div.admonition.important{color:#155724;background-color:#d4edda}div.admonition.important p.admonition-title:before{content:"\f05a\00a0 "}div.admonition.note{color:#155724;background-color:#d4edda}div.admonition.note p.admonition-title:before{content:"\f05a\00a0 "}div.admonition.tip{color:#004085;background-color:#cce5ff}div.admonition.tip p.admonition-title:before{content:"\f0eb\00a0 "}div.admonition.warning{color:#856404;background-color:#fff3cd}div.admonition.warning p.admonition-title:before{content:"\f071\00a0 "}div.figure{font-size:90%;color:#6c757d}div.figure img{vertical-align:middle;line-height:1;display:inline}div.figure p{margin-top:0;margin-bottom:0}div.figure p.caption{font-style:italic}div.figure div.legend{text-align:initial}div.figure.align-left{text-align:left}div.figure.align-center{text-align:center}div.figure.align-right{text-align:right} \ No newline at end of file diff --git a/theme/stylesheet/variables.less b/theme/stylesheet/variables.less new file mode 100644 index 00000000..aac8565b --- /dev/null +++ b/theme/stylesheet/variables.less @@ -0,0 +1,148 @@ +// Flex colors +@orange: #D9411E; +@light-orange: #FF5A09; +@white: #ffffff; +@grey: #333333; +@light-grey: #eeeeee; +@med-grey: #999999; +@dark-grey: #242121; +@solid-dark-grey: #222222; +@very-dark-grey: #1a1a1a; + +// Font family +@sans: 'Source Sans Pro', 'Roboto', 'Open Sans', 'Liberation Sans', 'DejaVu Sans', 'Verdana', 'Helvetica', 'Arial', sans-serif; +@mono: 'Source Code Pro', 'Consolas', 'Liberation Mono', 'DejaVu Sans Mono', monospace; + +// Body +@body-bg: @white; +@body-bg-dark-theme: @grey; +@text-color: @dark-grey; +@text-color-dark-theme: @light-grey; + +// Links +@link-color: @orange; +@link-hover-color: @light-orange; + +// Sidebar (aside) +@sidebar-bg: @grey; +@sidebar-bg-dark-theme: @solid-dark-grey; +@sidebar-text-color: @white; +@sidebar-link-color: @white; +@sidebar-link-hover-color: @light-grey; + +// Buttons +@btn-bg: @orange; +@btn-text-color: @white; +@btn-hover-color: @light-orange; + +// Tag cloud +@tag-bg: @orange; +@tag-text-color: @white; +@tag-hover-color: @light-orange; + +// Header +@header-text-color: @med-grey; + +// Footer +@footer-text-color: @med-grey; +@footer-border-color: @light-grey; +@footer-border-color-dark-theme: @solid-dark-grey; + +// Relative posts +@rel-post-border-color: @light-grey; +@rel-post-border-color-dark-theme: @solid-dark-grey; + +// Nav +@nav-border-color: @light-grey; +@nav-border-color-dark-theme: @solid-dark-grey; + +// Social buttons + +@email-bg-color: #578ad6; +@facebook-bg-color: #3e5b98; +@github-bg-color: #111010; +@google-bg-color: #d93e2d; +@instagram-bg-color: #125688; +@keybase-bg-color: #4c8dff; +@linkedin-bg-color: #3371b7; +@medium-bg-color: #00ab6b; +@pinterest-bg-color: #c92619; +@reddit-bg-color: #ff4500; +@rss-bg-color: #f26109; +@soundcloud-bg-color: #ff5500; +@stack-overflow-bg-color: #ff9900; +@tumblr-bg-color: #36465d; +@twitch-bg-color: #a970ff; +@twitter-bg-color: #4da7de; +@youtube-bg-color: #e02a20; +@gitlab-bg-color: #fca326; +@xing-bg-color: #007575; +@bitbucket-bg-color: #0747A6; +@mastodon-bg-color: #3088d4; +@diaspora-color: #000000; +@diaspora-bg-color: #D5D5D5; +@flickr-bg-color: #ff0084; +@lastfm-bg-color: #d92323; + +// Admonition colors +@admonition-generic-color: @dark-grey; +@admonition-generic-color-dark-theme: @light-grey; +@admonition-generic-bg-color: #cccccc; +@admonition-generic-bg-color-dark-theme: #404040; + +@admonition-attention-color: #856404; +@admonition-attention-color-dark-theme: #fbda7a; +@admonition-attention-bg-color: #fff3cd; +@admonition-attention-bg-color-dark-theme: #4a3900; +@admonition-attention-icon: "\f071\00a0 "; + +@admonition-caution-color: @admonition-attention-color; +@admonition-caution-color-dark-theme: @admonition-attention-color-dark-theme; +@admonition-caution-bg-color: @admonition-attention-bg-color; +@admonition-caution-bg-color-dark-theme: @admonition-attention-bg-color-dark-theme; +@admonition-caution-icon: @admonition-attention-icon; + +@admonition-warning-color: @admonition-attention-color; +@admonition-warning-color-dark-theme: @admonition-attention-color-dark-theme; +@admonition-warning-bg-color: @admonition-attention-bg-color; +@admonition-warning-bg-color-dark-theme: @admonition-attention-bg-color-dark-theme; +@admonition-warning-icon: @admonition-attention-icon; + +@admonition-danger-color: #721c24; +@admonition-danger-color-dark-theme: #ebadb3; +@admonition-danger-bg-color: #f8d7da; +@admonition-danger-bg-color-dark-theme: #28070a; +@admonition-danger-icon: "\f06a\00a0 "; + +@admonition-error-color: @admonition-danger-color; +@admonition-error-color-dark-theme: @admonition-danger-color-dark-theme; +@admonition-error-bg-color: @admonition-danger-bg-color; +@admonition-error-bg-color-dark-theme: @admonition-danger-bg-color-dark-theme; +@admonition-error-icon: @admonition-danger-icon; + +@admonition-hint-color: #004085 ; +@admonition-hint-color-dark-theme: #7abaff; +@admonition-hint-bg-color: #cce5ff; +@admonition-hint-bg-color-dark-theme: #001933; +@admonition-hint-icon: "\f0eb\00a0 "; + +@admonition-tip-color: @admonition-hint-color; +@admonition-tip-color-dark-theme: @admonition-hint-color-dark-theme; +@admonition-tip-bg-color: @admonition-hint-bg-color; +@admonition-tip-bg-color-dark-theme: @admonition-hint-bg-color-dark-theme; +@admonition-tip-icon: @admonition-hint-icon; + +@admonition-important-color: #155724; +@admonition-important-color-dark-theme: #a8eab7; +@admonition-important-bg-color: #d4edda; +@admonition-important-bg-color-dark-theme: #122b18; +@admonition-important-icon: "\f05a\00a0 "; + +@admonition-note-color: @admonition-important-color; +@admonition-note-color-dark-theme: @admonition-important-color-dark-theme; +@admonition-note-bg-color: @admonition-important-bg-color; +@admonition-note-bg-color-dark-theme: @admonition-important-bg-color-dark-theme; +@admonition-note-icon: @admonition-important-icon; + +@figure-color: #6c757d; +@figure-color-dark-theme: #bfbfbf; diff --git a/theme/tipuesearch/jquery.min.js b/theme/tipuesearch/jquery.min.js new file mode 100644 index 00000000..644d35e2 --- /dev/null +++ b/theme/tipuesearch/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("