Skip to content

Instantly share code, notes, and snippets.

View martijnthe's full-sized avatar

Martijn Thé martijnthe

View GitHub Profile
import imp
try:
imp.find_module("gdb")
except ImportError:
raise Exception("This file is a GDB script.\n"
"It is not intended to be run outside of GDB.\n"
"Hint: to load a script in GDB, use `source this_file.py`")
import gdb
import re
@martijnthe
martijnthe / wait_until_all_threads_finish.py
Created February 8, 2015 23:32
unittest vs threading helper
import threading
def wait_until_all_threads_finish():
all_threads = threading.enumerate()
all_threads.remove(threading.current_thread())
for t in all_threads:
t.join()
@martijnthe
martijnthe / SPBindings.h
Created August 22, 2011 16:42 — forked from nevyn/SPBindings.h
Bindings for iOS
#import <Foundation/Foundation.h>
@interface NSObject (SPBindings)
-(void)sp_bind:(NSString*)binding toObject:(id)observable withKeyPath:(NSString*)observableKeyPath;
-(void)sp_unbind:(NSString*)binding;
@end
@martijnthe
martijnthe / Xcode4TestFlightintegration.sh
Created November 19, 2011 15:47 — forked from fictorial/Xcode4TestFlightintegration.sh
ReWrite: "Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here: http://developmentseed.org/blog/2011/sep/02/automating-development-uploads-testflight-xcode"
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Inspired by original script by incanus:
# https://gist.github.com/1186990
#
# Rewritten by martijnthe:
# https://gist.github.com/1379127
#
@martijnthe
martijnthe / Example.js
Created January 23, 2012 08:21
FancyLoader
// Example use:
// See below for FancyLoader.src.js source
var loader = FancyLoader();
var defs = {
scripts: {
j: {
src: 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js',
doesExist: loader.doesJQueryExist,
dependencies: []
@martijnthe
martijnthe / rabobank.js
Created January 25, 2012 11:20
Bookmarklet om Rabobank pasnummer en rekeningnummer automatisch in te vullen op https://bankieren.rabobank.nl/klanten/
// 1) Vul PASNR en REKENINGNUMMER in.
// 2) Copy & paste de code
// 3) Maak een bookmark aan met deze regel code als URL.
// 4) Als je op de inlog pagina bent, klik dan de bookmark aan om je rekeningnr en pasnr automatisch te laten invullen.
javascript:document.getElementById('AuthBpasNrv4').value='PASNR';document.getElementById('AuthIdv4').value='REKENINGNR';
@martijnthe
martijnthe / Info.plist
Created February 23, 2012 16:02
Workaround-plugin for Xcode 4.4 to fix a crash when running unit tests
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.martijnthe.${PRODUCT_NAME:rfc1034identifier}.xcodeplugin</string>
@martijnthe
martijnthe / NSURLConnectionVCR+Test.json
Created February 25, 2012 16:44
Test response for NSURLConnectionVCR
{msg:"yay!"}
diff --git a/freetype/__init__.py b/freetype/__init__.py
index e175d52..e602d9c 100644
--- a/freetype/__init__.py
+++ b/freetype/__init__.py
@@ -30,15 +30,24 @@ import ctypes.util
__dll__ = None
__handle__ = None
FT_Library_filename = ctypes.util.find_library('freetype')
+
if not FT_Library_filename:
require 'formula'
class Isl < Formula
homepage 'http://www.kotnet.org/~skimo/isl/'
url 'http://garage.kotnet.org/~skimo/isl/isl-0.11.1.tar.bz2'
mirror 'ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.10.tar.bz2'
sha1 'd7936929c3937e03f09b64c3c54e49422fa8ddb3'
head 'http://repo.or.cz/w/isl.git'