Skip to content

Instantly share code, notes, and snippets.

View glenbot's full-sized avatar

Glen Zangirolami glenbot

View GitHub Profile
@glenbot
glenbot / launch_requestbin.py
Created May 4, 2012 13:26
Bootstrap file to run Requestbin locally
import os
from requestbin.web import app
from requestbin.service import RequestBin
from requestbin.storage.memory import MemoryStorage
request_bin = RequestBin()
request_bin.do_start()
app.config['bind_address'] = ('0.0.0.0', int(os.environ.get("PORT", 5000)))
@glenbot
glenbot / solr_queue_backen.py
Created December 15, 2011 03:31
Solr Queue Backend for haystack
import logging
import sys
import time
from threading import Thread
from Queue import Queue
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.loading import get_model
from haystack.backends import BaseSearchBackend, BaseSearchQuery, log_query, EmptyResults
from haystack.constants import ID, DJANGO_CT, DJANGO_ID
@glenbot
glenbot / Git Issue Export for Pivotal
Created January 6, 2011 23:57
Export your open issues in github to a pivotal tracker friendly csv for import, requires github2 python api-client
import csv
from github2.client import Github
# api settings for github
git_username = 'your_git_username'
git_api_token = 'your_git_api_token'
git_repo = 'username/repo_name'
# import all issues as this story type
pivotal_story_type = 'Bug'
<syntaxColor id="CodeColor_DjangoTemplateFilter" text="#5C4B5E" />
<syntaxColor id="CodeColor_DjangoTemplateTag" text="#5C4B5E" />
<syntaxColor id="CodeColor_DjangoTemplateBlockTag" text="#999999" bold="true" />
<syntaxColor id="CodeColor_DjangoTemplateVariable" text="#999999" bold="true" />
<syntaxColor id="CodeColor_DjangoTemplateString" text="#99CC66" />
<syntaxColor id="CodeColor_DjangoTemplateIdentifier" text="#B8A484" />
<syntaxColor id="CodeColor_DjangoTemplateOperator" text="#993333" />
<syntaxColor id="CodeColor_DjangoTemplateNumbers" text="#993333" />