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
// Tarantool quick test | |
// Copyright, Dennis Anikin 2016 | |
// | |
// Quick disclaimer: | |
// | |
// This test shows 500K-1000K transactions per second on one CPU core | |
// and 600K-1600K queries per second on one CPU core. | |
// | |
// Based on the $6.57 per-month-price for the AWS t2.micro instance we can afford the tremendous number of 630bln queries for just $1 | |
// |
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
for _,expr in pairs({ | |
"1", | |
"N", | |
"N/2+1", | |
"N/2+2", | |
"math.random()" | |
}) do | |
local fun,err = loadstring("return "..expr) | |
if not fun then error("Bad expression '"..expr.."'") end | |
local count = math.floor(math.random(7)) |
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 -r -u nginx-1.10.3.orig/src/http/ngx_http_core_module.c nginx-1.10.3/src/http/ngx_http_core_module.c | |
--- nginx-1.10.3.orig/src/http/ngx_http_core_module.c 2017-01-31 18:01:11.000000000 +0300 | |
+++ nginx-1.10.3/src/http/ngx_http_core_module.c 2017-02-13 15:37:11.505036520 +0300 | |
@@ -626,6 +626,13 @@ | |
offsetof(ngx_http_core_loc_conf_t, etag), | |
NULL }, | |
+ { ngx_string("proxy_100_continue"), | |
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
+ ngx_conf_set_flag_slot, |
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 5.010; | |
use strict; | |
use File::Find; | |
use Getopt::Long; | |
sub usage { | |
return <<EOF | |
=============================================================== |
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
use 5.016; | |
use Encode::Base58::GMP; | |
use Data::UUID; | |
# '11115QchsAWLTKggVhJEd' | |
# '00000000-ffff-ffff-0000-000000000000' | |
# 55b1a44d-e22b-4cf1-9c89-486d20c06adc | |
# 4da4b155 2be2 f14c 9c89 486d20c06adc |
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
sub listener { | |
push_read(line => sub { | |
my $line = shift; # GET / HTTP/1.1 | |
# PUT /file HTTP/1.1 | |
my ($method, $path, $http) = $line =~ m{^(\S+)\s+(\S+)}; | |
# Key: value | |
# Conetent-Length: 10 | |
# | |
# body... |
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 5.016; | |
use integer; | |
my $n = <>; | |
local $/ = " "; | |
$, = " "; | |
my @bottom; | |
while (<>) { |
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
local weak = setmetatable({},{__mode = 'v'}) | |
do | |
local Class = {} | |
-- function Class:super( class,method ) | |
-- return function () | |
-- print("work") | |
-- end | |
-- end | |
function Class:test() | |
self:super(Class,'method')() |
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
local obj = require('obj') | |
local fiber = require('fiber') | |
local log = require('log') | |
local remote = require('net.box') | |
local pool = obj.class({},'pool') | |
function pool:_init(cfg) | |
local zones = {} | |
self.total = 0 |
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
if gr == nil then | |
gr = { version = 1.0 }; | |
else | |
gr.version = 1.0 | |
end | |
-- gr['defschema'] = '1s30s 1s7d 1m3M' | |
gr['defschema'] = '1s30s' | |
gr['defagg'] = 'avg' | |
gr.port = 22003 |