ためしてないけど、こんなかんじでできるのでは。
/etc/sysconfig/td-agent
export BUNDLE_BIN_PATH=/opt/td-agent/embedded/bin/bundle
export BUNDLE_GEMFILE=/etc/td-agent/Gemfile
export RUBYOPT=-rbundler/setup| def sq_escape(str) | |
| str.split(/\'/).map{|s| "'#{s}'"}.join("\\'") | |
| end | |
| sq_escape {"breakfast"=>"Bill's"}.to_json | |
| #=> "'{\"breakfast\":\"Bill'\\''s\"}'" | |
| puts sq_escape {"breakfast"=>"Bill's"}.to_json | |
| #=> '{"breakfast":"Bill'\''s"}' | |
| # # on bash | |
| # $ echo '{"breakfast":"Bill'\''s"}' |
| #!/usr/local/bin/ruby | |
| require 'rubygems' | |
| require 'httpclient' | |
| require 'clockwork' | |
| include Clockwork | |
| module Clockwork |
ためしてないけど、こんなかんじでできるのでは。
/etc/sysconfig/td-agent
export BUNDLE_BIN_PATH=/opt/td-agent/embedded/bin/bundle
export BUNDLE_GEMFILE=/etc/td-agent/Gemfile
export RUBYOPT=-rbundler/setuptl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile
rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)
| # Usage: | |
| # 1. Drop this file into lib/capistrano/remote_cache_with_project_root_strategy.rb | |
| # 2. Add the following to your Capfile: | |
| # require 'capistrano/git' | |
| # require './lib/capistrano/remote_cache_with_project_root_strategy' | |
| # 3. Add the following to your config/deploy.rb | |
| # set :git_strategy, RemoteCacheWithProjectRootStrategy | |
| # set :project_root, 'subdir/path' | |
| # Define a new SCM strategy, so we can deploy only a subdirectory of our repo. |
| #!/bin/bash | |
| # Get current swap usage for all running processes | |
| # Erik Ljungstrom 27/05/2011 | |
| # Updated: 2013-11-13 Yuichiro Saito | |
| SUM=0 | |
| OVERALL=0 | |
| for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do | |
| PID=`echo $DIR | cut -d / -f 3` | |
| PROGNAME=`ps -p $PID -o comm --no-headers` | |
| for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` |