Skip to content

Instantly share code, notes, and snippets.

View brotchie's full-sized avatar

James Brotchie brotchie

View GitHub Profile
@willurd
willurd / web-servers.md
Last active April 18, 2024 14:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@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