Skip to content

Instantly share code, notes, and snippets.

View kchoudhu's full-sized avatar
💭
General misery

Kamil Choudhury kchoudhu

💭
General misery
View GitHub Profile
@kchoudhu
kchoudhu / logging_Iso8601UTCTimeFormatter.py
Created May 19, 2019 11:54 — forked from sloanlance/logging_Iso8601UTCTimeFormatter.py
Python: A logging Formatter class giving timestamps in a more common ISO 8601 format.
class Iso8601UTCTimeFormatter(logging.Formatter):
"""
A logging Formatter class giving timestamps in a more common ISO 8601 format.
The default logging.Formatter class **claims** to give timestamps in ISO 8601 format
if it is not initialized with a different timestamp format string. However, its
format, "YYYY-MM-DD hh:mm:ss,sss", is much less common than, "YYYY-MM-DDThh:mm:ss.sss".
That is, the separator between date and time is a space instead of the letter "T"
and the separator for fractional seconds is a comma instead of a period (full stop).
While these differences may not be strictly *wrong*, it makes the formatted timestamp
@kchoudhu
kchoudhu / hostapd
Created September 7, 2017 06:22
Allow hostapd(8) rc script to manage multiple access points
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: hostapd
# REQUIRE: mountcritremote
# KEYWORD: nojail shutdown
. /etc/rc.subr

Keybase proof

I hereby claim:

  • I am kchoudhu on github.
  • I am kchoudhu (https://keybase.io/kchoudhu) on keybase.
  • I have a public key whose fingerprint is 2468 099D B33A DF9E AAAF DB25 429E EC54 2F5B 98E5

To claim this, I am signing this object: