Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
from __future__ import division
import mailbox
import re
import pprint
import dateutil.parser
import datetime
junk_box= mailbox.Maildir("Junkmail")
@drott
drott / screendumperCocoa
Created December 3, 2013 15:31
Demo App to show issues with CGDisplayRegisterReconfigurationCallback
//
// screendumperCocoa
//
// Copyright (c) 2013 Intel Corporation
//
#import "AppDelegate.h"
#include <stdio.h>
--- fam1.cpp 2014-08-12 14:23:59.000000000 +0300
+++ fam2.cpp 2014-08-12 14:23:40.000000000 +0300
@@ -1,4 +1,4 @@
-void WebFontInfo::familyForChar(WebUChar32 c, const char* preferredLocale, WebFontFamily* family)
+void WebFontInfo::fallbackFontForChar(WebUChar32 c, const char* preferredLocale, WebFallbackFont* fallbackFont)
{
FcCharSet* cset = FcCharSetCreate();
FcCharSetAddChar(cset, c);
@@ -29,9 +29,9 @@
FcCharSetDestroy(cset);
@drott
drott / gist:b64205d5424eca2e8a94
Created September 29, 2014 12:34
USB WebKit Buildbot monitor
#!/usr/bin/python2
#
# Buildbot monitor
# Author: Leandro A. F. Pereira <[email protected]>
#
# Copyright (C) 2010 ProFUSION Embedded Systems
#
import urllib
import BeautifulSoup
@drott
drott / gist:37f3cd6a91cf098eb384
Created September 29, 2014 12:35
USB WebKit Buildbot monitor
#!/usr/bin/python2
#
# Buildbot monitor
# Author: Leandro A. F. Pereira <[email protected]>
#
# Copyright (C) 2010 ProFUSION Embedded Systems
#
import urllib
import BeautifulSoup
@drott
drott / bbmonitor
Created September 29, 2014 12:35
USB WebKit Buildbot monitor
#!/usr/bin/python2
#
# Buildbot monitor
# Author: Leandro A. F. Pereira <[email protected]>
#
# Copyright (C) 2010 ProFUSION Embedded Systems
#
import urllib
import BeautifulSoup
import logging
from google.appengine.api import memcache, urlfetch
class CommitterCheck(object):
COMMITTER_LIST_URL = "http://roettsch.es/committer_list.php"
COMMITTER_LIST_KEY = "committer-list"
COMMITTER_LIST_EXPIRY_SECONDS = 1800
../../third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp(643) : bool blink::collectCandidateRuns(const UChar *, size_t, const blink::Font *, Vector<blink::CandidateRun> *, bool)
ERROR: glyphPositionsLength: 4
../../third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp(917) : void blink::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun(blink::HarfBuzzShaper::HarfBuzzRun *, hb_buffer_t *, blink::HarfBuzzShaper::HarfBuzzRun *)
ERROR: i: 0 ccIndex: 3 glyphInfos[i].cluster: 3 numGlyphs: 4
../../third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp(935) : void blink::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun(blink::HarfBuzzShaper::HarfBuzzRun *, hb_buffer_t *, blink::HarfBuzzShaper::HarfBuzzRun *)
ERROR: i: 1 ccIndex: 2 glyphInfos[i].cluster: 2 numGlyphs: 4
../../third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp(935) : void blink::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun(blink::HarfBuzzShaper::HarfBuzzRun *, hb_buffer_t *, blink::HarfBuzzSh
<meta charset="utf-8">
<style type="text/css">
@font-face {
font-family: 'opensansweb';
src: url(https://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2) format('woff2');
unicode-range: U+0000-00FF, U+2000-206F;
}
body {
font-family: opensansweb;
@drott
drott / truncation_test.cpp
Created March 22, 2016 11:26
Test for integer truncation
#include <stdio.h>
// TIL, this compiles without warnings with
// $ clang -Wall main.cpp -o testTruncation
// The following local pragmas may be used to activate warnings for this case,
// if you can't use -Wconversion globally.
// #pragma GCC diagnostic push
// #pragma GCC diagnostic warning "-Wconversion"