I hereby claim:
- I am banks on github.
- I am banksyw (https://keybase.io/banksyw) on keybase.
- I have a public key ASD34ru5nha4p16hYT9Ye62vPO3FM-d3r3Is6xmFLhhH5Ao
To claim this, I am signing this object:
| <?php | |
| // Example to accompany blog post: | |
| // http://blog.banksdesigns.co.uk/post/when-not-to-use-arrays-in-php | |
| ini_set('memory_limit', '512M'); | |
| $array_2d = $array_strings = array(); | |
| $mem_start = memory_get_usage(); |
| ['BandFmt', 'Bands', 'Bbits', 'Coding', 'Compression', 'Hist', 'Length', 'Level', 'Type', 'Xoffset', 'Xres', 'Xres_float', 'Xsize', 'Yoffset', 'Yres', 'Yres_float', 'Ysize', '__class__', '__copy__', '__deepcopy__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__gdoc__', '__ge__', '__getattribute__', '__gpointer__', '__grefcount__', '__gsignals__', '__gt__', '__gtype__', '__hash__', '__info__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_force_floating', '_ref', '_ref_sink', '_unref', '_unsupported_data_method', '_unsupported_method', 'argument_isset', 'argument_needsstring', 'argument_table', 'baseaddr', 'bind_property', 'bind_property_full', 'build', 'chain', 'client1', 'client2', 'close', 'compat_control', 'connect', 'connect_after', 'connect_data', 'connect_object', 'connect_object_after', 'constructed', 'data', 'decode', 'decode_predict', 'delete_on_close', 'del |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/time.h> | |
| #include "../libmill.h" | |
| void relay(chan in, chan out) { | |
| int val = chr(in, int); | |
| chs(out, int, val + 1); |
| // On Macbook pro quad-core 2014 retina 15inch | |
| Opts: {} | |
| Batches of 1 | |
| Inserting 5000 docs took 52808.177948ms @ 94.6822834187 per second | |
| Batches of 10 | |
| Inserting 5000 docs took 9779.50787544ms @ 511.27290901 per second | |
| Batches of 200 | |
| Inserting 5000 docs took 1662.64986992ms @ 3007.23692097 per second | |
| Opts: {'durability': 'soft'} | |
| Batches of 1 |
I hereby claim:
To claim this, I am signing this object:
| bash-4.4$ export STEP=120 | |
| bash-4.4$ for i in $(seq 1 10 600); do START=$((1485176922 + i)); END=$((1485263322 + $i)); echo "$START - $END"; curl 2>/dev/null "http://prometheus.1.dblayer.com:9090/api/v1/query_range?query=cpu_usage_user%7Bhost%3D%22candidate.57%22%7D%20&start=$START&end=$END&step=$STEP" | jq '.data.result[0].values[] | .[1] | tonumber' | awk -v max=0 -v min=9999 '{ total += $1; count++; if($1>max){max=$1}; if($1<min){min=$1} } END { print " " total/count, max, min}'; done | |
| 1485176923 - 1485263323 | |
| 45.4626 91.07730456963016 12.89468239168138 | |
| 1485176933 - 1485263333 | |
| 30.1437 86.16109881174854 10.058442152821929 | |
| 1485176943 - 1485263343 | |
| 30.1437 86.16109881174854 10.058442152821929 | |
| 1485176953 - 1485263353 | |
| 23.3495 71.28118644816615 6.88269494352532 |
| $ ./grpc_proxy_bug.sh | |
| Putting /grpc_proxy_bug/001 | |
| OK | |
| Putting /grpc_proxy_bug/002 | |
| OK | |
| Putting /grpc_proxy_bug/003 | |
| OK | |
| Putting /grpc_proxy_bug/004 | |
| OK | |
| Putting /grpc_proxy_bug/005 |
| #! /bin/bash | |
| # Sets up outgoing dummynet in pf firewall suitable for use to throttle outgoing network | |
| # connections. gtihub.com/tylertreat/comcast is a much nicer tool but I couldn't get it to work due | |
| # to shell issues and more - it seemed to only setup inbound rules in pf which don't affect outbound | |
| # TCP connections in my tests. | |
| TARGET=$1 | |
| PIPECFG=${2:-"plr 1"} |
| // ecdh implements a simple way to perform Diffie-Hellman Key Exchange using | |
| // Curve25519 on the command line. | |
| // | |
| // NOTE: this is a toy for fun. Don't use it. | |
| // | |
| // See https://godoc.org/golang.org/x/crypto/curve25519 and | |
| // https://cr.yp.to/ecdh.html for more info. | |
| // | |
| // The final shared secret given is the raw shared secret bytes from DH and is | |
| // not typically suitable for direct use as an encryption key as it can leak |
| package main | |
| import ( | |
| "bytes" | |
| "compress/lzw" | |
| "crypto/md5" | |
| "encoding/gob" | |
| "fmt" | |
| "log" | |
| "time" |