Skip to content

Instantly share code, notes, and snippets.

Masahiro Nagano kazeburo

Block or report user

Report or block kazeburo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ngx_http_headers_more_headers_in.patch
diff --git a/src/ngx_http_headers_more_headers_in.c b/src/ngx_http_headers_more_headers_in.c
index c3eb8f7..527c8a5 100644
--- a/src/ngx_http_headers_more_headers_in.c
+++ b/src/ngx_http_headers_more_headers_in.c
@@ -739,6 +739,7 @@ ngx_http_set_connection_header(ngx_http_request_t *r,
if (ngx_strcasestrn(value->data, "close", 5 - 1)) {
r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE;
r->headers_in.keep_alive_n = -1;
+ r->keepalive = 0;
View gist:dbbdb8198c72addc2fcafbce79d5f6b6
diff --git a/starter.go b/starter.go
index c65ce00..4d47000 100644
--- a/starter.go
+++ b/starter.go
@@ -517,7 +517,6 @@ func (s *Starter) StartWorker(sigCh chan os.Signal, ch chan processState) *os.Pr
sigs = append(sigs, sig)
}
}
-
// if received any signals, during the wait, we bail out
View fio_wrap.pl
#!/usr/bin/perl
use strict;
use warnings;
use JSON;
sub cap_cmd {
my ($cmdref) = @_;
pipe my $logrh, my $logwh
or die "Died: failed to create pipe:$!\n";
my $pid = fork;
View gist:8bb1f162f5c58abaa6ed5c79630b47bc
#!/usr/bin/perl
use strict;
use warnings;
use IO::Handle;
use Getopt::Long;
use File::Spec;
sub find_path {
my $pg = shift;
View gist:dafd347524e99562d5a2
#!/usr/bin/perl
use strict;
use warnings;
use JSON;
sub cap_cmd {
my ($cmdref) = @_;
pipe my $logrh, my $logwh
or die "Died: failed to create pipe:$!\n";
View stats_elb.pl
$ perl stats_elb.pl --region us-west-2 --elb ProdElb | mkr throw --service production
View mackerel-plugin-linux-lite.pl
#!/usr/bin/perl
use strict;
use warnings;
use Storable;
use JSON;
use File::Spec;
sub cap_cmd {
my ($cmdref) = @_;
View diff-detector.pl
#!/usr/bin/perl
use strict;
use warnings;
use Digest::MD5 qw/md5_hex/;
use File::Spec;
use File::Temp qw(tempfile);
use Getopt::Long;
use File::Copy;
View gist:71603b4bc0994e2222b4
## Server
EC2 c4.8xlarge
Amazon Linux
## Software
```
sudo yum install -y make gcc git curl tar bzip2 patch nginx openssl-devel strace
git clone https://github.com/tagomoris/xbuild.git
@kazeburo
kazeburo / starlet.rb
Last active Aug 29, 2015
ruby port of Starlet and Parallel::Prefork
View starlet.rb
# -*- coding: utf-8 -*-
# gem install pico_http_parser proc-wait3
# start_server --port 8080 --signal-on-hup=USR1 -- rackup -r ./starlet.rb -E production -s Starlet \
# -O MaxWorkers=1 -O MaxRequestPerChild=1000 -O MinRequestPerChild=500 -O SpawnInterval=1 config.ru
#
require 'rubygems'
require 'rack'
require 'pico_http_parser'
You can’t perform that action at this time.