Skip to content

Instantly share code, notes, and snippets.

@stopthink
stopthink / gist:2321231
Created April 6, 2012 16:43
brew install ipmitool fails on OSX 10.7.3
~$ brew install -v ipmitool
==> Downloading http://downloads.sourceforge.net/project/ipmitool/ipmitool/1.8.11/ipmitool-1.8.11.tar.bz2
Already downloaded: /Library/Caches/Homebrew/ipmitool-1.8.11.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/ipmitool-1.8.11.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/ipmitool/1.8.11 --mandir=/usr/local/Cellar/ipmitool/1.8.11/share/man --disable-debug --disable-dependency-tracking
./configure --prefix=/usr/local/Cellar/ipmitool/1.8.11 --mandir=/usr/local/Cellar/ipmitool/1.8.11/share/man --disable-debug --disable-dependency-tracking
checking build system type... i686-apple-darwin11.3.0
checking host system type... i686-apple-darwin11.3.0
checking target system type... i686-apple-darwin11.3.0
checking for a BSD-compatible install... /usr/bin/install -c
@stopthink
stopthink / combine_querysets.py
Created December 1, 2010 21:38
Combine multiple querysets from different models and sort by shared column (which can be fed into paginator)
from itertools import chain
from operator import attrgetter
collection = Collection.objects.get(pk=id)
document_list = collection.documents.all()
task_list = collection.tasks.all()
item_list = sorted(
chain(document_list, task_list),
key=attrgetter('created'),
class Bicycle
attr_reader :gears, :wheels, :seats
def intialize(gears = 1)
@wheels = 2
@seats = 1
@gears = gears
end
end
# Load format-specific drivers in the following order:
$SourceParserImplementations = []
SourceParser::Upcoming
SourceParser::Ical
SourceParser::Hcal