Skip to content

Instantly share code, notes, and snippets.

=== RUN TestConnectionMigration
test_log_scope.go:79: test logs captured to: /tmp/logTestConnectionMigration2409985112
test_log_scope.go:80: use -show-logs to present logs inline
ONE
127.0.0.1:36529
TWO
127.0.0.1:39917
=== RUN TestConnectionMigration/successful_connection
request
{postgresql://root@127.0.0.1:39917/defaultdb?sslcert=test_certs%2Fclient.root.crt&sslkey=test_certs%2Fclient.root.key&sslmode=verify-full&sslrootcert=test_certs%2Fca.crt true}
[jay@archome] cockroach (master)$ go test -test.v -exec 'stress -p=1' -v ./pkg/ccl/sqlproxyccl/ -run TestDirectoryConnect -timeout 0
0 runs so far, 0 failures, over 5s
1 runs so far, 0 failures, over 10s
1 runs so far, 0 failures, over 15s
2 runs so far, 0 failures, over 20s
3 runs so far, 0 failures, over 25s
3 runs so far, 0 failures, over 30s
4 runs so far, 0 failures, over 35s
4 runs so far, 0 failures, over 40s
5 runs so far, 0 failures, over 45s
{
"Ansi 6 Color" : {
"Green Component" : 0.57082360982894897,
"Red Component" : 0.14679534733295441,
"Blue Component" : 0.52502274513244629
},
"Ansi 12 Color" : {
"Red Component" : 0.42023858428001404,
"Color Space" : "Calibrated",
"Blue Component" : 0.93014276027679443,

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@imjching
imjching / gdb_ruby_backtrace.py
Created April 27, 2018 03:17 — forked from csfrancis/gdb_ruby_backtrace.py
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
@imjching
imjching / README.md
Created April 17, 2018 03:37
virtualbox (boot2docker) vs xhyve (barge-os) benchmarks
@imjching
imjching / nginx-tuning.md
Created March 4, 2018 15:42 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@imjching
imjching / README.md
Created March 3, 2018 21:11 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@imjching
imjching / output_deployments.txt
Created August 21, 2017 03:43
Production Engineering / Infrastructure Problem
Name: db
Namespace: shopify-dev
CreationTimestamp: Sun, 20 Aug 2017 15:41:35 -0700
Labels: app=db
Annotations: deployment.kubernetes.io/revision=1
Selector: app=db
Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 1 max unavailable, 1 max surge
@imjching
imjching / sample.script
Created February 17, 2017 16:36
sample.script
// What to do in the morning
func morning <
name := "Jay";
greet morning=true input=@name;
eat cereals;
attend class="CS101";
>
// What to do at night
func night <