ゴルーチンをつかってスレッドを作って非同期にするとき、そのスレッドをチャネル経由で制御するデモ。 気が向いたら説明を付加するけど、だいたいわかると思う。
- LogWriter.go
- main.go
on alfred_script(q) | |
set command to q | |
tell application "Terminal" | |
activate | |
do script command in front window | |
end tell | |
end alfred_script |
# | |
# Forward with hostname | |
# | |
# harukasan <harukasan@pixiv.com> | |
# | |
# == configure | |
# key (optional):: キー名(default: host) | |
# | |
class ForwardWithHostnameOutput < Fluent::ForwardOutput |
$ sudo ./modify_rrd.sh /var/lib/munin/example.com/example2-if_eth0-up-c.rrd |
# | |
# Auto typecast | |
# ============= | |
# | |
# Ref:: http://y-ken.hatenablog.com/entry/fluentd-parser-auto-type-conversion | |
# | |
# ちなみにこの方法だとApacheとかNginxのログで、"-"とかが流れたときにIntegerとStringが混ざって死ぬ。 | |
# | |
module Fluent |
source "https://rubygems.org" | |
platforms :ruby do | |
gem "fluentd" | |
gem "fluent-plugin-norikra" | |
gem "fluent-plugin-dummydata-producer" | |
end | |
platforms :jruby do |
#!/bin/sh | |
script_dir=$(cd $(dirname $0) && pwd) | |
norikra_dir=$(cd "$script_dir/../lib/norikra" && pwd) | |
shared_dir=$(cd "$script_dir/../shared" && pwd) | |
log_dir=/var/log/norikra | |
pid_file="$shared_dir/norikra.pid" | |
full_dir=$(cd "$norikra_dir" && pwd) |
# /etc/network/interface | |
# post-upに指定しておく | |
iface eth0 inet static | |
address 192.2.0.10 | |
netmask 255.255.255.0 | |
network 192.2.0.0 | |
broadcast 192.2.0.255 | |
gateway 192.2.0.1 | |
post-up /var/scripts/set_irq_affinity.sh > /dev/null |
エラーメッセージ:
$ sbt test
[info] Loading global plugins from /Users/harukasan/.sbt/0.13/plugins
[info] Loading project definition from /Users/harukasan/repo/play-test/project
[info] Set current project to play-test (in build file:/Users/harukasan/repo/play-test/)
[info] Compiling 1 Scala source to /Users/harukasan/repo/play-test/target/scala-2.11/test-classes...
[info] - play.api.libs.concurrent.ActorSystemProvider - Starting application default Akka system: application
[info] - play.api.libs.concurrent.ActorSystemProvider - Shutdown application default Akka system: application
FROM debian:jessie | |
RUN apt-get update && apt-get install -y openssl git ruby ruby-dev build-essential ruby-dev libxml2-dev libxslt-dev libz-dev wget | |
RUN cd / && git clone https://github.com/aeris/cryptcheck.git | |
WORKDIR /cryptcheck | |
RUN gem install --no-ri --no-doc bundler |