Skip to content

Instantly share code, notes, and snippets.

Peter Baumgartner ipmb

  • Lincoln Loop
Block or report user

Report or block ipmb

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
View sample_rss.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<title>RSS Example</title>
<description>This is an example of an RSS feed</description>
<lastBuildDate>Mon, 28 Aug 2006 11:12:55 -0400 </lastBuildDate>
<pubDate>Tue, 29 Aug 2006 09:00:00 -0400</pubDate>
ipmb /
Created Nov 4, 2010
Scrapes hours from Pivotal Trackers optional time tracker
import datetime
import decimal
import logging
from StringIO import StringIO
from lxml import html
import twill
from twill import commands as twl
from boto.iam import IAMConnection
iam = IAMConnection(aws_key, aws_secret)
iam.put_group_policy('group', 'EC2', '{"Statement":[{"Effect":"Allow","Action":"ec2:*","Resource":"*"}]}')
iam.add_user_to_group('group', 'user')
import os
from fabric.api import *
def deploy_github():
with lcd(env.local_root):
local('git checkout master')
commit = local('git log -1|grep commit', capture=True)
ipmb / test.xml
Created Apr 28, 2011
Feedparser Fail
View test.xml
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="">
<description>Recent items</description>
<title>This is a title</title>
ipmb /
Created Jun 24, 2011 — forked from bartTC/
Quick and dirty script to export django.contrib.comments as an IntenseDebate Export file to import it in Disqus.
from django.utils.html import escape
from django.contrib.comments.models import Comment
from django.utils.encoding import smart_str
post = u''
for i in Comment.objects.order_by('submit_date'):
if not i.content_object:
post += u"""
ipmb / gist:1140096
Created Aug 11, 2011
Naïve fix #399 for django-haystack
View gist:1140096
diff --git a/haystack/ b/haystack/
index 8caa279..988f7f8 100644
--- a/haystack/
+++ b/haystack/
@@ -2,6 +2,7 @@ import operator
import re
import warnings
from django.conf import settings
+from django.utils.encoding import force_unicode
from haystack.backends import SQ
View boost.rb
require 'formula'
class Boost < Formula
homepage ''
url ''
md5 'd1e9a7a7f532bb031a3c175d86688d95'
head '', :using => :svn
# Bottle built on 10.7.2 using XCode 4.2
bottle ''
ipmb /
Created Oct 29, 2012 — forked from dshaw/
Realtime Conf 2012 Talks
ipmb /
Created Nov 7, 2012
Say election results
#!/usr/bin/env python
import time
import json
import urllib2
import subprocess
def check_results():
page = urllib2.urlopen('')
data = json.loads(
You can’t perform that action at this time.