Below you will find pages that utilize the taxonomy term “Coding”
LOL
Thursday, Apr 10, 2014
This is hilarious:
The CFLAGS in the commit contain: -DOPENSSL_NO_HEARTBEAT
The actual setting to disable the SSL heartbeat is -DOPENSSL_NO_HEARTBEATS (note the S at the end).
This commit was apparently OKed by two other people.
This right here tells you why code is hard. Hubris anyone? Is there a coding equivalent to Muphry’s law?
Facebook insights have different return formats.
Saturday, Jan 4, 2014
- 1388649600 = 1/2/2014 12:00:00 AM GMT-8
- 1391241600 = 2/1/2014 12:00:00 AM GMT-8
returns something that looks like this:
{
/* previous, next page, etc keys */
"data": [
{
"values": [
{
"end_time": "2014-01-03T08:00:00+0000",
"value": 4
},
{
"end_time": "2014-01-04T08:00:00+0000",
"value": 1
},
{
"end_time": "2014-01-05T08:00:00+0000",
"value": 0
}
.... /* More 0 values here until Feb 2 */
],
"period": "day",
"description": "Daily: The number of people who have seen any content associated with your Page. (Unique Users)",
"title": "Daily Total Reach"
}
]
}
Whereas
stupid Python logging woes
Wednesday, Oct 17, 2012
Recently moved a project to Django 1.3 and I kept seeing duplicate messages for all of my logger.x messages, even though my LOGGING dictionary looked like:
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'loggers': {
'base': {
'level': 'DEBUG',
},
}
}
I simplified it to this to see if there were any issues, and although I define no handlers for the ‘base’ logger, it still was printing out logging messages. I did a grep on the entire virtualenv libraries for basicConfig or BASIC_FORMAT to see if any of my external libraries were misbehaving and didn’t find anything. I went through my codebase again and got rid of some extraneous logging.debug in some files and that fixed it. So always use