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
escape ^z^z | |
bind ^U encoding utf8 utf8 | |
bind ^E encoding eucjp utf8 | |
bind ^S encoding sjis utf8 | |
#bindkey "^[[1;5A" stuff "\015exit\012" ##dengerous... | |
bindkey "^[[1;5B" screen | |
bindkey "^[[1;5C" next | |
bindkey "^[[1;5D" prev |
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
:autocmd! BufNewFile,BufRead *.psgi setf perl |
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
access_log: | |
parser: | |
format: '/.../' | |
datacounter: | |
- count_key: code | |
pattern1: 2xx ^2\d\d$ | |
pattern2: 3xx ^3\d\d$ | |
pattern3: 4xx ^4\d\d$ | |
pattern4: 5xx ^5\d\d$ | |
tag_prefix: codecount |
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
# tag: test.access_log.HOSTNAME | |
# record: {"method": "GET", "path": "/hoge", "code": "200"} | |
<match test.access_log.**> | |
type forest | |
subtype groupcounter | |
<template> | |
count_key method path code | |
count_interval 60s | |
aggregate all |
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/bin/fluent-agent-lite b/bin/fluent-agent-lite | |
index 129a1c5..b515334 100755 | |
--- a/bin/fluent-agent-lite | |
+++ b/bin/fluent-agent-lite | |
@@ -178,12 +178,12 @@ sub build_tail_command { | |
} | |
sub open_tail { | |
- open(my $tailfd, '-|', build_tail_command()) | |
+ my $pid = open(my $tailfd, '-|', build_tail_command()) |
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
use strict; | |
use warnings; | |
my $pid = open(my $tailfd, '-|', qw/tail -F hogehoge/) or die; | |
print "$pid\n"; | |
while (1) { | |
sleep 1; | |
} |
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 'digest/md5' | |
require 'digest/sha1' | |
require 'digest/sha2' | |
require 'murmurhash3' | |
num = 5 | |
test = 10000 | |
res = { | |
"md5" => Array.new(num, 0), | |
"sha1" => Array.new(num, 0), |
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/perl | |
use strict; | |
use warnings; | |
my $logfile = '/tmp/inrun.log'; | |
open my $log, '>>', $logfile or die; | |
my $file = $ARGV[0] or failed("need file path"); | |
my $out = `$file 2>&1`; |
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 | |
_sugyan() { | |
local cur prev | |
cur=${COMP_WORDS[COMP_CWORD]} | |
prev=${COMP_WORDS[COMP_CWORD-1]} | |
COMPREPLY=() | |
if (( $COMP_CWORD <= 1 )); then | |
local _list=$(sugyan list command) |
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 | |
_get_kamipo_bin() { | |
cat <<'EOF' | perl - "${BASH_SOURCE[0]}" | |
use strict; | |
use warnings; | |
use Cwd; | |
my $path = $ARGV[0] or die; | |
$path =~ s/^\.\/(.+)$/$1/; | |
$path = getcwd() . "/$path" if ($path !~ /^\//); |