Skip to content

Instantly share code, notes, and snippets.

View ulope's full-sized avatar

Ulrich Petri ulope

View GitHub Profile
@ulope
ulope / fabfile.py
Created January 29, 2014 15:01
Fabric task to create requirements from setup.py's `install_requires` and (if existing) `dependency_links`
# requires that the `setup()` call in setup.py is guarded with the if __name__ idiom
import imp
import os
from rex import rex # python-rex on PyPI
@task()
def update_req():
setup = imp.load_source("setup", "setup.py")
dep_re = rex("/^(.*?)#egg=(?P<package_name>.*)$/")
@ulope
ulope / 02.make
Created April 19, 2014 03:57
mosh build error OS X 10.9
Making install in src
Making install in protobufs
GEN userinput.pb.cc
GEN hostinput.pb.cc
GEN transportinstruction.pb.cc
/Applications/Xcode.app/Contents/Developer/usr/bin/make install-am
CXX hostinput.pb.o
CXX transportinstruction.pb.o
CXX userinput.pb.o
AR libmoshprotos.a
.tox
### Keybase proof
I hereby claim:
* I am ulope on github.
* I am ulope (https://keybase.io/ulope) on keybase.
* I have a public key whose fingerprint is 2265 EB92 276E D197 1E68 019C 8EDA C8BD 2021 09C0
To claim this, I am signing this object:
@ulope
ulope / SQLAlchemy.slides.html
Created November 17, 2014 14:56
PyUGRM #16 Lightning Talk SQLAlchemy
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
@ulope
ulope / gist:1495a9e7572c62885f30
Created January 14, 2015 12:10
Automatically place tox working directories into a central location
# Add this to your shell's rc file.
# Optionally export TOX_WORKDIR_BASE if you don't like the default of ~/.cache/tox
tox() {
if [ -z "$TOX_WORKDIR_BASE" ]; then
TOX_WORKDIR_BASE=~/.cache/tox
fi
if [ -f tox.ini ]; then
if [ -d .tox -a ! -L .tox ]; then
echo "Warning: Existing .tox directory is not symlinked into TOX_WORKDIR_BASE! Remove and re-run to auto-create symlink."
/*
Script: FormValidator.German.js
Date messages for German.
Contributors:
- Frank Rossi
- Ulrich Petri
License:
MIT-style license.
/*
Script: Date.German.js
Date messages for German.
Contributors:
- Frank Rossi
- Ulrich Petri
License:
MIT-style license.
From 7dfa5fb595c1de9fb2cf419c672e44d3620d33be Mon Sep 17 00:00:00 2001
From: Ulrich Petri <u.petri@diefirma.de>
Date: Fri, 30 Oct 2009 16:38:57 +0100
Subject: [PATCH] "Fixed" CMS_FLAT_URLS
---
cms/views.py | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/cms/views.py b/cms/views.py
========================================================================
BYTE UNIX Benchmarks (Version 5.1.2)
System: eq4: GNU/Linux
OS: GNU/Linux -- 2.6.28-15-server -- #49-Ubuntu SMP Tue Aug 18 20:09:37 UTC 2009
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (5346.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 1: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (5346.6 bogomips)