Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View brotchie's full-sized avatar

James Brotchie brotchie

View GitHub Profile
@brotchie
brotchie / generate.py
Created April 26, 2013 05:11
Generates random articles containing loremipsum to test Pelican site generation.
#!/usr/bin/env python
"""
Generates random articles containing loremipsum to
test Pelican site generation.
Requires the loremipsum Python module:
pip install loremipsum
@brotchie
brotchie / gist:4458379
Created January 4, 2013 23:15
Work around for dispatch_release deprecation in iOS 6.0
// Work around for dispatch_release deprecation in
// iOS 6.0.
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
#undef dispatch_release
#define dispatch_release(X) (X)
#undef dispatch_retain
#define dispatch_retain(X) (X)
#endif
Pod::Spec.new do |s|
s.name = "BButton"
s.version = "0.0.1"
s.summary = "BButton is a subclass of UIButton that looks like the bootstrap buttons."
s.homepage = "https://github.com/mattlawer/BButton"
s.license = { :type => 'Unknown', :text => 'Unknown' }
s.author = { "Mathieu Bolard" => "mattlawer08@gmail.com" }
s.source = { :git => "https://github.com/mattlawer/BButton.git", :branch => "master", :commit => "HEAD"}
s.platform = :ios
s.source_files = 'BButton/BButton.*'
@brotchie
brotchie / main.cpp
Created July 18, 2012 06:32
Minimal C++ implementation of Functor, Monad and Maybe using c++0x variadic templates and lambda expressions.
/*
* Minimal C++ implementation of Functor, Monad and Maybe.
*
* Requires c++0x variadic templates and lambda expressions:
*
* g++ -std=c++0x main.cpp -o main
*
* fmap, monadic bind and return implementations for std::vector
* and Maybe.
*
@brotchie
brotchie / typelibhelper.py
Created April 24, 2012 07:57
Python module for loading the latest version of COM typelibs.
"""
Useful functions for loading the latest version
of a typelib given just its IID.
- James Brotchie <brotchie@gmail.com> (github.com/brotchie)
"""
from win32com.client import gencache
from _winreg import OpenKey, HKEY_CLASSES_ROOT, QueryInfoKey, EnumKey