Skip to content

Instantly share code, notes, and snippets.

James Brotchie brotchie

Block or report user

Report or block brotchie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brotchie
brotchie / generate.py
Created Apr 26, 2013
Generates random articles containing loremipsum to test Pelican site generation.
View generate.py
#!/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 Jan 4, 2013
Work around for dispatch_release deprecation in iOS 6.0
View gist:4458379
// 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
View BButton.podspec
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 Jul 18, 2012
Minimal C++ implementation of Functor, Monad and Maybe using c++0x variadic templates and lambda expressions.
View main.cpp
/*
* 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 Apr 24, 2012
Python module for loading the latest version of COM typelibs.
View typelibhelper.py
"""
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
You can’t perform that action at this time.