WindowsでEAP−PEAP使うのが結構煩雑だったのでスクショ貼りつけておく。
WindowsでEAP−PEAP使うのが結構煩雑だったのでスクショ貼りつけておく。
https://mazgi.github.io/posts/2015.02/morisnite-02-with-whole-prosciutto/
モリスナイト2で無事に生ハムをdeployすることができた。
骨は@mirakuiさんが美味しいラーメンにしてくださった。
例の@tagomorisさんと酒を飲む会である。
ノリで生ハム原木をポチったので担ぐことにした。
#morisnite で担ぐ生ハムぽちった
— Hidenori MATSUKI (@mazgi) January 31, 2015
まずビールの量が恐ろしかった。
フリークアウトさんの広いカウンターが埋まるほどの量だった。
なおすべてなくなったらしい。
ちょっとみんなビール贈りすぎでは? #morisnite pic.twitter.com/KtQ8CnZ2Iq
— Tatsuro Hisamori (@myfinder) February 6, 2015
生ハム原木も
あと栓抜きを持ち帰るのを忘れた
モリスさんや皆さんにカットしていただき(念のためモザイクをかけた)
無事
完食された
なお骨は@sora_hさんが持って帰ってくださった。
爪が飛び出た豚の脚(しかも骨のみ)を運んでいただきありがとうございます。原木持ち帰る上に12時に間に合わないといけないのでお先に #morisnite (@ 株式会社フリークアウト (FreakOut) 本社ヒルズ ガレージ in Minato-ku, Tokyo) https://t.co/wFBZfbG6yw
— そらは (@sora_h) February 6, 2015
生ハム原木の持ち込みを黙認(あるいはスルー)していただいた@myfinderさんと会場を貸してくださったフリークアウト様ありがとうございます。
@mirakuiさんが生ハム原木の骨をラーメンにしてくださるとのことでお呼ばれしてきた。 それはもう美味かった。
チャーシューがとても美味かったのだが、チャーシューと別に生ハムの一部も入っておりそれはたしかにチャーシューとは異なる旨さで「ああ、たしかにmorisniteの生ハムだ」と感慨に浸らせられるものだった。
完食。
原木はこのように煮込まれていた
あとクックパッドさんのオフィスはとても眺めが良かった
仕込んでくださった@mirakuiさん、原料を運んでくださった@sora_hさん、「昼にエンジニアが集まってラーメンを食う」ただそれだけのためにテーブルを貸してくださったクックパッド様ありがとうございました。
ここで書かないと書く機会がなさそうなのでdeployまでの準備などを記録しておく。
#morisnite 専用装備を手に入れた(2/3発送予定とはなんだったのか…)(冷蔵どーすんだこれ…) pic.twitter.com/sLJeD7xmJP
— Hidenori MATSUKI (@mazgi) February 1, 2015
生ハム原木が早く着きすぎたので冷却に悩んだ。
しかしコンビニの板氷4枚とエアキャップ少々、そして耐水性の箱(衣装ケースなどを想像していただきたい)で解決した。
(当日運搬中と開封後に触診により温度を確認したが冷えていたので解決したと考えている)
運搬には公共交通機関を活用した。
#morisnite 向かってます! pic.twitter.com/40Ib759Y3Q
— Hidenori MATSUKI (@mazgi) February 6, 2015
中央線乗車中の生ハム原木
六本木駅のホームで佇む生ハム原木
エスカレーターを昇る生ハム原木
ヒルズと生ハム原木(重すぎて片手で持ち上げるのはこれが限界だった)
なおせっかくの機会なのでタイトル通り担いだ
(背景のイケてるスペースはフリークアウト様オフィスである)
xtrabackup-bin
# emerge -pvq xtrabackup-bin [ebuild R ] dev-db/xtrabackup-bin-2.2.5
# equery f xtrabackup-bin * Searching for xtrabackup-bin ... * Contents of dev-db/xtrabackup-bin-2.2.5: /usr /usr/bin /usr/bin/innobackupex /usr/bin/xbcrypt /usr/bin/xbstream /usr/bin/xtrabackup
qpress
Download qpress-11-linux-x64.tar
from this site:
Fast compression library for C, C# and Java
And extract qpress
command.
# tar xvf qpress-11-linux-x64.tar -C /usr/local/bin/ qpress
innobackupex
# innobackupex --defaults-file=/etc/mysql/my.cnf --user=$USER --password=$PASS --ibbackup=xtrabackup --slave-info --safe-slave-backup --compress $TARGET_DIR
# innobackupex --user=$USER --password=$PASS --decompress $BACKUP_DIR # innobackupex --user=$USER --password=$PASS --apply-log $BACKUP_DIR # innobackupex --copy-back $BACKUP_DIR # chown -R mysql:mysql /var/lib/mysql
Gentoo忘年会ー勉強会 2014-12-20 - connpassでGentoo Advent Calendar 2014 - Qiitaの存在を知りましたのでお酒を呑みながら慎重に検討した結果この記事は21日目に再配置されました。 ときにはそういうことも必要だと思います!
20日目は@aliceinwireさんでした。 22日目は@kizononnさんです。
追記ここまで
Linuxサーバーを運用していると"Too many open files"に出くわし"ulimit 反映されない"でググって Linux サーバでの「Too many open files」対策について - akishin999の日記 や ulimitが効かない不安を無くす設定 | 外道父の匠 のお世話になるのはままある話。
Gentooの場合、起動スクリプトで起動するプロセス(いわゆるdaemon)であれば簡単にulimitを設定できる。
たとえばRedmineをdaemon化するこんな起動スクリプトを書いたとして、
[root@redmine-host] # cat /etc/init.d/redmine #!/sbin/runscript # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ description="Redmine daemon" REDMINE_ENVIRONMENT="${REDMINE_ENVIRONMENT:-production}" REDMINE_USER="${REDMINE_USER:-redmine}" REDMINE_GROUP="${REDMINE_GROUP:-redmine}" REDMINE_NAME="${SVCNAME##*.}" if [ -n "${REDMINE_NAME}" -a "${SVCNAME}" != "redmine" ]; then description="${description} for ${REDMINE_NAME}" REDMINE_PID_FILE="/var/run/redmine.${REDMINE_NAME}.pid" REDMINE_RB_DEFAULT="/etc/redmine/${REDMINE_NAME}.rb" else REDMINE_PID_FILE="/var/run/redmine.pid" REDMINE_RB_DEFAULT="/etc/redmine/unicorn.rb" fi REDMINE_DIR="${REDMINE_DIR:-/var/lib/redmine}" REDMINE_RB="${REDMINE_RB:-${REDMINE_RB_DEFAULT}}" REDMINE_WORKER_PROCESSES="${REDMINE_WORKER_PROCESSES:-4}" REDMINE_BUNDLE_EXEC="${REDMINE_BUNDLE_EXEC:-/usr/local/bin/bundle}" LD_PRELOAD_OPTS="" if [ -f "/usr/lib64/libjemalloc.so" ]; then LD_PRELOAD_OPTS="/usr/lib64/libjemalloc.so" fi depend() { need net } start() { ebegin "Starting ${SVCNAME}" start-stop-daemon \ --start \ --chdir "${REDMINE_DIR}" \ --user "${REDMINE_USER}" \ --background \ --make-pidfile --pidfile "${REDMINE_PID_FILE}" \ --env PATH="${PATH}:$(dirname ${REDMINE_BUNDLE_EXEC})" \ --env LD_PRELOAD="${LD_PRELOAD_OPTS}" \ --env REDMINE_PID_FILE="${REDMINE_PID_FILE}" \ --exec "${REDMINE_BUNDLE_EXEC}" \ -- exec unicorn_rails -c "${REDMINE_RB}" -E "${REDMINE_ENVIRONMENT}" eend $? } stop() { ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --pidfile "${REDMINE_PID_FILE}" eend $? }
/etc/conf.d/SVCNAME
にrc_ulimit
を書いておくと反映してくれる。
[root@redmine-host] # cat /etc/conf.d/redmine rc_ulimit="-n 65535" rc_need="nginx" REDMINE_DIR="/var/lib/redmine/versions/current" REDMINE_BUNDLE_EXEC="/usr/local/bin/bundle" REDMINE_RB="/var/lib/redmine/versions/current/config/unicorn.rb"
便利!
[root@redmine-host] # cat /proc/$(cat /var/run/redmine.pid)/limits Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 3981 3981 processes Max open files 65535 65535 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 3981 3981 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us
ちなみにcomment outすると
[root@redmine-host] # grep rc_ulimit /etc/conf.d/redmine #rc_ulimit="-n 65535"
こんな感じ。
[root@redmine-host] # cat /proc/$(cat /var/run/redmine.pid)/limits Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 3981 3981 processes Max open files 1024 4096 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 3981 3981 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us
id:onk さんのMount Engineの記事読んだら便利そうだったのでやってみた。
まずおもむろにGitHubリポジトリをつくり
rbenv local
bundle install --path=vendor/bundle
bundle exec rails new .
等の儀式を済ませる。 差分は下記の通り。
welcome controller
というHello World的なControllerとViewを作る
[diff]Create a Rails controller
[diff]Create a Rails view
bundle exec rake routes
の結果はこんな感じ
[mazgi@Balmung] $ bundle exec rake routes Prefix Verb URI Pattern Controller#Action root GET / welcome#index
Welcome!と表示された。
記事を参考にconfig/routes.rb
に
mount proc {|env| [200, {}, ["Hello from mounted engine!"]] }, at: "hello_mount_engine"
の1行を書き加えてみる。
routeが増えた。
[mazgi@Balmung] $ bundle exec rake routes Prefix Verb URI Pattern Controller#Action root GET / welcome#index /hello_mount_engine #<Proc:0x007f138f7872c0@/home/mazgi/Creations/MountableEngineTestDrive/config/routes.rb:4>
/hello_mount_engine
というpathでちゃんと表示された。
まずとても簡単なSinatraアプリを作る。 内容はこれだけ:
[mazgi@Balmung] $ < lib/sinatra_app/app.rb require 'sinatra/base' class HelloFromSinatra < Sinatra::Base set :bind, '0.0.0.0' get "/" do "I am Sinatra!" end get "/hello" do "Hello from Sinatra!" end run! if app_file == $0 end
まずは単体でbundle exec ruby lib/sinatra_app/app.rb -e production
する。
'/'と'/hello'はそれぞれ次のように表示される。
ではいよいよSinatraアプリをRailsアプリにマウントしてみる。
まずconfig/application.rb
に
require Rails.root.join("lib/sinatra_app/app")
の1行を追加し、次にconfig/routes.rb
にSinatraアプリをmount
する。
mount HelloFromSinatra, at: "hello_sinatra"
[diff]Add mount
for Sinatra app to routes
bundle exec rake routes
の出力が増えている。
[mazgi@Balmung] $ bundle exec rake routes Prefix Verb URI Pattern Controller#Action root GET / welcome#index /hello_mount_engine #<Proc:0x007fb0335f85a8@/home/mazgi/Creations/MountableEngineTestDrive/config/routes.rb:4> hello_from_sinatra /hello_sinatra HelloFromSinatra
簡単にRailsアプリからSinatraアプリを呼び出せた。
Mount Engine便利っぽいしドリコム Advent Calendar 2014勉強になる。
I moved my blog to blog.mazgi.net from self hosted WordPress site.
WordPress is good product, but I was tired of updating wordpress and plugins.
ブログ移行しました。
WordPressの運用に疲れたので。
旧サイトからは↓みたいにリダイレクトしておいた。
location = / { rewrite ^(.*)$ http://blog.mazgi.net$1 permanent; } location ~* ^/\d+/\d+/.*/$ { rewrite ^/(\d+)/(\d+)/(.*)/$ http://blog.mazgi.net/entry/$3 permanent; rewrite_log on; }
Previously, I were introduced to the program that can be control Keynote by LeapMotion(blog in Japanese), but was submitted to the Airspace in the App!
By the swipe on the LeapMotion, you can control the Keynote.
#LeapMotion Keynote slideshow using Leap Motion from Hidenori MATSUKI on Vimeo.
Last year, I received a Leap Motion Controller that was pre-order! I had made the program for oneself, but I decided to publish because there was a demand on Twitter.
Does anyone here know what app is used here @mazgi #leapmotion @LeapMotion http://t.co/eVsmnGnmeE … Thanks
— Vassil Mladjov (@vassko) April 1, 2014
@vassko Thank you very much for giving me this opportunity!
It has been confirmed in the following two environments: It doesn't correspond to the PowerPoint and Windows.
Please make sure "Allow Background Apps" is On in your "Leap Motion Control Panel".
Item called "KM" in the menu bar will appear when you start the app.
Click the "Quit Keymotion" in the "KM" when you end.
You can control the Keynote slideshow.
First, Open a single Keynote slideshow. Next, Operations are as follows:
I want to be able to customise the combination of the operation and thresholds of gesture in the future.
As long as us to cooperate in the beta test, please contact the blog comment or Twitter.