Skip to content

Instantly share code, notes, and snippets.

View ipmb's full-sized avatar

Peter Baumgartner ipmb

View GitHub Profile
@ipmb
ipmb / test.xml
Created April 28, 2011 17:33
Feedparser Fail
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Inhabi</title>
<link></link>
<description>Recent items</description>
<language>en-us</language>
<ttl>40</ttl>
<item>
<title>This is a title</title>
@ipmb
ipmb / intense.py
Created June 24, 2011 22:35
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:
continue
post += u"""
@ipmb
ipmb / gist:1140096
Created August 11, 2011 16:30
Naïve fix #399 for django-haystack
diff --git a/haystack/query.py b/haystack/query.py
index 8caa279..988f7f8 100644
--- a/haystack/query.py
+++ b/haystack/query.py
@@ -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
require 'formula'
class Boost < Formula
homepage 'http://www.boost.org'
url 'http://downloads.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.bz2'
md5 'd1e9a7a7f532bb031a3c175d86688d95'
head 'http://svn.boost.org/svn/boost/trunk', :using => :svn
# Bottle built on 10.7.2 using XCode 4.2
bottle 'https://downloads.sourceforge.net/project/machomebrew/Bottles/boost-1.48.0-bottle.tar.gz'
@ipmb
ipmb / RealtimeConf2012.md
Created October 29, 2012 17:52 — forked from dshaw/RealtimeConf2012.md
Realtime Conf 2012 Talks
@ipmb
ipmb / election_results.py
Created November 7, 2012 00:52
Say election results
#!/usr/bin/env python
import time
import json
import urllib2
import subprocess
def check_results():
page = urllib2.urlopen('http://elections.nytimes.com/2012/results/president/big-board.json')
data = json.loads(page.read())
REPO=$1
ORG=mycorp
git clone git@github.com:$ORG/$REPO.git
cd $REPO
for remote in `git branch -r | grep -v HEAD`; do git checkout --track $remote; done
git remote add bitbucket git@bitbucket.org:$ORG/$REPO.git
git push --all bitbucket
@ipmb
ipmb / lesson0.ipynb.json
Last active December 15, 2015 08:39
IPython Notebook & IPython Blocks: Lesson 0
{
"metadata": {
"name": "Lesson 0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@ipmb
ipmb / gist:6249825
Last active December 21, 2015 04:29 — forked from kennethlove/gist:6233919
Web Generalist at Lincoln Loop

Lincoln Loop is looking for a web generalist to join our ranks. We have lots of domain experts, but need someone who can tie up the loose ends. A strong knowledge of CSS and HTML is required along with a working knowledge of JavaScript and Python. You should have a year or so of experience building clean cross-browser interfaces and be familiar with responsive design techniques for mobile.

Bonus points for experience/knowledge in:

  • CSS Preprocessors (SASS or LESS)
  • Django
  • Backbone or similar JS framework
  • Visual design

We're a fully distributed company where everyone sets their own hours and salary. You can learn more about how we operate at http://lincolnloop.com/blog/categories/business/. This is a full-time position. If you feel like you're a good fit, tell us about yourself at jobs+generalist@lincolnloop.com.

@ipmb
ipmb / gist:6295311
Created August 21, 2013 14:36
Webkit full screen bookmarklet
javascript:document.documentElement.webkitRequestFullScreen();