Skip to content

Instantly share code, notes, and snippets.

View ejamesc's full-sized avatar

Cedric Chin ejamesc

View GitHub Profile
@abdelazer
abdelazer / epub_to_opds_entry.py
Created April 6, 2011 17:55
A Python program to accept EPUB files as arguments and output an OPDS Catalog Entry skeleton based on the EPUB's metadata
#!/usr/bin/env python
# encoding: utf-8
"""
epub_to_opds_entry.py
Created by Keith Fahlgren on Tue Apr 5 21:21:02 PDT 2011
Copyright (c) 2011 Threepress. All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@rctay
rctay / __init__.py
Created February 23, 2011 13:37
[python] overloadable decorators
def decorates(dec):
def handler(*args, **kwargs):
if len(args) == 1 and callable(args[0]):
func = args[0]
return dec(func)
else:
def wrapper(func):
return dec(func, *args, **kwargs)
return wrapper
return handler
@shawntan
shawntan / bashrc
Created February 13, 2011 04:09
my .bashrc
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything