結論:みあたらないので誰か
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
my $spf_server = Mail::SPF::Server->new; | |
my $request = Mail::SPF::Request->new( | |
versions => [1,2], | |
scope => 'mfrom', | |
identity => $self->from, | |
ip_address => $ip, | |
); | |
my $result = $spf_server->process($request); | |
$result->is_code('pass'); |
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
#!/bin/sh | |
SEC=$1 | |
tcpdump -s 65535 -nn -q -tttt -x port 3306 -l > /tmp/tcpdump.3306 2> /dev/null & | |
PID_3306=$! | |
tcpdump -s 65535 -nn -q -tttt -x port 11211 -l > /tmp/tcpdump.11211 2> /dev/null & | |
PID_11211=$! |
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
http { | |
map $uri $backend_port { | |
include port_map; | |
} | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
server { |
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
package Apache::BumpyLife; | |
use strict; | |
use warnings; | |
use Config; | |
use Apache::Constants (); | |
use constant IS_WIN32 => $Config{'osname'} eq 'MSWin32' ? 1 : 0; | |
our $VERSION = '0.01'; |
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
$ perl installed2cpanfile > cpanfile | |
$ cpanm --installdeps . |
td-agent 1.1.17
ログ生成
https://github.com/sonots/dummy_log_generator を使用し、-r 100000 や -r 200000 と指定。実際に20万lines/sec吐き出せていることはもちろん確認済み。
送信側
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/perl | |
use POSIX qw(setuid setgid); | |
use Unix::Groups qw(setgroups); | |
die "usage: setusergroups username child\n" | |
unless @ARGV >= 2; | |
my $username = shift @ARGV; | |
# get user entry |
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
> perl -E 'say "生" & "死"' | |
愛 | |
生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111 | |
死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011 | |
愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011 |
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
;;; ------------------------------------------------------------ | |
;;; 選択範囲を計算してバッファに出力 | |
;; gist-description: Emacs(Elisp): calculate region and insert. 選択範囲の数式を計算して、次の行にinsertします。数字が羅列されている場合は、加算します。数字や式と自然な文章が混在している場合は、数式のみを計算します。 | |
;; gist-id: b967d6a7441f85aa541d | |
;; gist-name: calculate-region-and-insert.el | |
;; gist-private: nil | |
(defun add-number-grouping (number &optional separator) | |
"Add commas to NUMBER and return it as a string. | |
Optional SEPARATOR is the string to use to separate groups. |
OlderNewer