This file contains 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/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb | |
index 861bcd2..48c3c70 100644 | |
--- a/lib/fluent/plugin/in_tail.rb | |
+++ b/lib/fluent/plugin/in_tail.rb | |
@@ -238,7 +238,7 @@ class TailInput < Input | |
end | |
def on_change(prev, cur) | |
- @h.call | |
+ @h.check |
This file contains 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
#ls -l /proc/6943/fd | |
total 0 | |
lr-x------ 1 username group 64 Feb 16 14:51 0 -> pipe:[1353571971] | |
l-wx------ 1 username group 64 Feb 16 14:51 1 -> pipe:[1353571972] | |
lrwx------ 1 username group 64 Feb 16 14:51 10 -> socket:[1353576456] | |
lrwx------ 1 username group 64 Feb 16 14:51 100 -> socket:[1353576926] | |
lr-x------ 1 username group 64 Feb 16 14:51 101 -> eventpoll:[1353576927] | |
lrwx------ 1 username group 64 Feb 16 14:51 102 -> socket:[1353576928] | |
lr-x------ 1 username group 64 Feb 16 14:51 103 -> eventpoll:[1353576929] | |
lrwx------ 1 username group 64 Feb 16 14:51 104 -> socket:[1353576930] |
This file contains 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 scribe | |
# port 14631 | |
port 14631 | |
add_prefix scribe | |
remove_newline true | |
</source> | |
<match scribe.**> | |
type copy | |
<store> |
This file contains 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
module Mysql2::Client::PseudoBindMixi | |
def pseudo_bind(sql, values) | |
sql = sql.dup | |
placeholders = [] | |
search_pos = 0 | |
while pos = sql.index('?', search_pos) | |
placeholders.push(pos) | |
search_pos = pos + 1 | |
end |
This file contains 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
1.9.2p180 :001 > require 'yajl' | |
=> true | |
1.9.2p180 :002 > y = Yajl::Parser.new | |
=> #<Yajl::Parser:0x007f895d098038> | |
1.9.2p180 :003 > y.on_parse_complete = lambda {|msg| p msg} | |
=> #<Proc:0x007f895d08de80@(irb):3 (lambda)> | |
1.9.2p180 :004 > y << '{"message":1}' | |
{"message"=>1} | |
=> nil | |
1.9.2p180 :005 > |
This file contains 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
1.9.3p125 :001 > require 'yajl' | |
=> true | |
1.9.3p125 :002 > y.on_parse_complete = lambda {|msg| p msg} | |
NameError: undefined local variable or method `y' for main:Object | |
from (irb):2 | |
from /Users/tagomoris/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `<main>' | |
1.9.3p125 :003 > y = Yajl::Parser.new | |
=> #<Yajl::Parser:0x007fd2fc92ce90> | |
1.9.3p125 :004 > y.on_parse_complete = lambda {|msg| p msg} | |
=> #<Proc:0x007fd2fc926108@(irb):4 (lambda)> |
This file contains 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 perl | |
use strict; | |
use warnings; | |
use lib q!/Users/tagomoris/Documents/nagios-scripts/extlib/lib/perl5!; | |
use List::Util qw!!; | |
use Getopt::Long; | |
Getopt::Long::Configure ("no_ignore_case"); |
This file contains 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 forward | |
# port 24211 | |
port 24211 | |
</source> | |
<match raw.**> | |
type copy | |
<store> | |
type scribe | |
host central1.local |
This file contains 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
def emit(tag, es, chain) | |
t = if @sample_unit == :all | |
'all' | |
else | |
tag | |
end | |
# Access to @counts SHOULD be protected by mutex, with a heavy penalty. | |
# Code below is not thread safe, but @counts (counter for sampling rate) is not | |
# so serious value (and probably will not be broke...), | |
# then i let here as it is now. |
This file contains 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
def emit(tag, es, chain) | |
t = if @sample_unit == :all | |
'all' | |
else | |
tag | |
end | |
# Access to @counts SHOULD be protected by mutex, with a heavy penalty. | |
# Code below is not thread safe, but @counts (counter for sampling rate) is not | |
# so serious value (and probably will not be broke...), | |
# then i let here as it is now. |