Archive for the ‘TIL’ Category

TIL Remove a Znode from Zookeeper

Yep, you could easily achieve that (and much more) using zkCli.sh (Zookeeper client): $ /usr/share/zookeeper/bin/zkCli.sh Connecting to localhost:2181 Welcome to ZooKeeper! JLine support is enabled WATCHER:: WatchedEvent state:SyncConnected type:None path:null [zk: localhost:2181(CONNECTED) 0] help ZooKeeper -server host:port cmd args connect host:port get path [watch] ls path [watch] set path data [version] rmr path delquota [-n|-b] […]

Posted on May 30, 2017 at 12:16 pm by sergeyt · Permalink · Leave a comment
In: TIL

TIL HSTS requires a secure transport

Otherwise (quoting RFC6797): If an HTTP response is received over insecure transport, the UA MUST ignore any present STS header field(s). That means SSL certificate on your server must be valid, i.e. no errors or warnings when you open a page from a browser over https.

Posted on May 25, 2017 at 2:25 pm by sergeyt · Permalink · Leave a comment
In: TIL

TIL gethostbyname*() and gethostbyaddr*() functions are obsolete

It wasn’t obvious to me until I tried to run netcat utility (aka nc) on Ubuntu 10.04 (lucid) release to check Zookeeper’s status: echo “stat” | nc zookeer_server_name 2181 zookeer_server_name: forward host lookup failed: No address associated with name It wouldn’t have been a problem had Zookeeper server used IPv4 address but it was configured […]

Posted on January 28, 2017 at 11:54 am by sergeyt · Permalink · 2 Comments
In: Linux, TIL

TIL Common Name (CN) is legacy and subjectAltName must always be used.

Seems I’ve been living under a rock for far too log. From RFC2818: Although the use of the Common Name is existing practice, it is deprecated and Certification Authorities are encouraged to use the dNSName instead. So in today’s world CN is only evaluated when subjectAltName is not present and if it’s set all host […]

Posted on July 6, 2016 at 2:52 pm by sergeyt · Permalink · Leave a comment
In: TIL

Calculating percentile in Python

If you need to find the percentile in Python do that correctly. Which means is by following one of the following receipts: Finding the percentile of the values Use numpy library

Posted on June 29, 2016 at 11:13 pm by sergeyt · Permalink · Leave a comment
In: TIL