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] […]
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.
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 […]
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 […]
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