Skip to content

Instantly share code, notes, and snippets.

View mmontagna's full-sized avatar

Marco Montagna mmontagna

  • San Francisco, CA
View GitHub Profile
@mmontagna
mmontagna / redis_usage.py
Created April 10, 2019 01:58 — forked from sherin/redis_usage.py
redis space usage report grouped by prefixes on keys
#!/usr/bin/env python
# production friendly
# slow if there are too many keys but the script will print partial outputs
# usage is an approximation for complex objects
import math
import redis
import urlparse
import os
@sherin
sherin / redis_usage.py
Last active April 10, 2019 03:34
redis space usage report grouped by prefixes on keys
#!/usr/bin/env python
# production friendly
# slow if there are too many keys but the script will print partial outputs
# usage is an approximation for complex objects
import math
import redis
import urlparse
import os
@okhwaja
okhwaja / loggly-format.conf
Last active November 18, 2016 00:18
Loggly syslog tag regex for docker containers
# Documentation: http://www.rsyslog.com/doc/v5-stable/configuration/property_replacer.html
# Helpful testing tool: http://www.rsyslog.com/regex/
$template LogglyFormat,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [<token>@<port> tag=\"%syslogtag:R,ERE,1,ZERO,0:docker\/([^[]+)\[--end%\"] %msg%\n"