Skip to content

Instantly share code, notes, and snippets.

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
@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
@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 / 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
--- 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 / 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>
#!/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 / gstreamerhashes.py
Last active December 29, 2015 02:09
Quick and dirty python script to download sha256 and generate md160 hashes for the common gstreamer deliverables
#!/usr/bin/python
import requests
import tempfile
import re
import hashlib
packages = [ "gstreamer", "gst-plugins-base", "gst-plugins-good", "gst-plugins-bad", "gst-plugins-ugly", "gst-libav" ]
base_url = 'http://gstreamer.freedesktop.org/src/'
version = '1.2.1'
@drott
drott / git-gse
Last active June 1, 2016 16:44
I recommend putting git-gse in your $PATH then search for occurences of strings $@ in your repo, pretty fast.
#!/bin/sh
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Copyright (c) 2013 Dominik Röttsches
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
git grep -n -e "$@" -- "*.h" "*.hpp" "*.cpp" "*.c" "*.cc" "*.cpp" "*.inl"\
"*.grd" "*.idl" "*.m" "*.mm" "*.py" "*.sh" "*.cfg"\
"*.vcproj" "*.vsprops" "*.make"\
"*.gyp" "*.gypi" "*.js" "*.html" "*.css" "*.cmake" "*CMakeLists.txt"\
"*GNUmakefile.*"\
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
for (int i = 8; i <= 30; i++)
{
FontFamily fontFamily = new FontFamily("Liberation Sans");
Font liberation = new Font(fontFamily, i, FontStyle.Regular, GraphicsUnit.Pixel);