This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'listen' | |
| require 'blink1' | |
| class Blink1Signal | |
| def initialize | |
| @blink1 = Blink1.new | |
| end | |
| def succeeded | |
| @blink1.open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| for i in 1.9.3-p392 2.0.0-p0; do ~/.rbenv/bin/rbenv install $i; done | |
| for i in 1.9.3-p392 2.0.0-p0; do RBENV_VERSION=$i ~/.rbenv/shims/gem install bundler; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # | |
| #= このスクリプトの用途 | |
| # | |
| # Stacked グラフが生成されていないステータスコード別のグラフ( /\dxx_count/ )を見つけて | |
| # - 色を修正し | |
| # - 指定した場所に stacked グラフを作成する | |
| # | |
| # - 今回は生成されるグラフは 同じサービス名.accesses.同じパス名_all_status という名前にする | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| start on startup | |
| stop on runlevel [016] | |
| respawn | |
| env USER="growthforecast" | |
| env PERLVER=5.16.2 | |
| env PROG_PATH=/home/${USER}/perl5/perlbrew/perls/perl-${PERLVER}/bin/growthforecast.pl | |
| env LOG="/var/log/growthforecast/growthforecast.log" | |
| env MYSQL_USER=growthforecast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <source> | |
| type exec | |
| command df -k / | sed -E -e 1d -e 's/ +/ /g' -e 's/%//' | |
| tag df | |
| keys fs,1024_blocks,used,available,capacity,mounted_on | |
| run_interval 30s | |
| </source> | |
| <match df> | |
| type growthforecast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # ikachan wrapper | |
| ikachan=http://IKACHANHOST:4979 | |
| if [ -z "$2" ]; then | |
| echo "Usage: $0 channel message" | |
| fi | |
| channel=$(echo $1 | sed -E 's/^[^0-9A-Za-z_]/#/') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Makefile.orig b/Makefile | |
| index 460b774..9c21b9e 100644 | |
| --- a/Makefile.orig | |
| +++ b/Makefile | |
| @@ -97,7 +97,7 @@ svc_stone: logmsg.rc $(SVC_LIBS) | |
| $(MAKE) FLAGS="-DNT_SERVICE $(FLAGS)" LIBS="$(LIBS) $(SVC_LIBS) -ladvapi32 -luser32 -lshell32 -lkernel32" $(TARGET) | |
| linux: | |
| - $(MAKE) FLAGS="-O -Wall -DCPP='\"/usr/bin/cpp -traditional\"' -DPTHREAD -DUNIX_DAEMON -DPRCTL -DSO_ORIGINAL_DST=80 -DUSE_EPOLL $(FLAGS)" LIBS="-lpthread $(LIBS)" stone | |
| + $(MAKE) FLAGS="-O -Wall -DCPP='\"/usr/bin/cpp -traditional\"' -DPTHREAD -DUNIX_DAEMON -DPRCTL -DSO_ORIGINAL_DST=80 -DUSE_EPOLL -D_GNU_SOURCE $(FLAGS)" LIBS="-lpthread $(LIBS)" stone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # /etc/rc.d/init.d/growthforecast | |
| # | |
| # chkconfig: - 80 20 | |
| # description: growthforecast | |
| # processname: growthforecast | |
| # pidfile: /var/run/growthforecast/growthforecast.pid | |
| # | |
| ### BEGIN INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream growthforecast { | |
| server 127.0.0.1:5125; | |
| } | |
| log_format ltsv 'time:$time_local\t' | |
| 'host:$remote_addr\t' | |
| 'request:$request\t' | |
| 'status:$status\t' | |
| 'size:$body_bytes_sent\t' | |
| 'referer:$http_referer\t' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'securerandom' | |
| namespace :td do | |
| task :start, :roles => :fluentd do | |
| run "#{try_sudo} /etc/init.d/td-agent start" | |
| end | |
| task :stop, :roles => :fluentd do | |
| run "#{try_sudo} /etc/init.d/td-agent stop" | |
| end |