This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/td-agent/td-agent.log { | |
size 200M | |
rotate 6 | |
missingok | |
create 644 td-agent td-agent | |
compress | |
delaycompress | |
notifempty | |
sharedscripts | |
postrotate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
def decodeDataUri(uristr): | |
comma = uristr.find(',') | |
urihead = uristr.find('data:') | |
if urihead is None or comma is None: | |
return None | |
headpart = uristr[urihead + 5:comma] | |
firstsep = headpart.find(';') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import calendar | |
import datetime | |
def get_utc_timestamp(): | |
return calendar.timegm(datetime.datetime.utcnow().utctimetuple()) | |