Skip to content

Instantly share code, notes, and snippets.

@fschulze
fschulze / _develop
Created August 23, 2012 15:20 — forked from esteele/_develop
zsh completion for mr.developer
#compdef develop
if [[ "$words[1]" != "$_cache_develop_cmd" ]]; then
_cache_develop_cmd="$words[1]"
fi
_arguments -C \
'(-h --help)'{-h,--help}'[Show help]' \
'(-v --version)'{-v,--version}'[Print version]' \
'*::command:->command' \

Keybase proof

I hereby claim:

  • I am fschulze on github.
  • I am fschulze (https://keybase.io/fschulze) on keybase.
  • I have a public key whose fingerprint is F914 C2DE F5B2 FD66 EB20 00A6 C2B0 8DA0 E558 8473

To claim this, I am signing this object:

diff --git a/server/devpi_server/replica.py b/server/devpi_server/replica.py
index e8aef55..69e5a27 100644
--- a/server/devpi_server/replica.py
+++ b/server/devpi_server/replica.py
@@ -6,6 +6,7 @@ import time
from pyramid.httpexceptions import HTTPNotFound, HTTPAccepted
from pyramid.view import view_config
from pyramid.response import Response
+from webob.headers import EnvironHeaders
import datetime
import pytz
def testcase(tzinfo, dt, delta):
dt = dt.replace(tzinfo=tzinfo)
earlier = dt - delta
later = earlier + delta
assert dt == later
from pkg_resources import resource_filename
from pyramid.events import subscriber
from pyramid.events import BeforeRender
def devpiserver_cmdline_run(xom):
# this is slightly hacky, because accessing the command line args like that
# is not part of the official API, but this is just for convenience
if xom.config.args.theme is None:
xom.config.args.theme = resource_filename('devpi_example_theme', 'theme')
@fschulze
fschulze / failed_tests
Created October 31, 2016 13:44
Filters failed tests from zope.testrunner output to be suitable for ```-t $(failed_tests)```
#!/usr/bin/env python
import subprocess
def get_tests_from_paste_buffer():
return subprocess.check_output('pbpaste')
def run():
raw_tests = get_tests_from_paste_buffer()
# run in a temporary folder to list 32 bit only iOS apps from your iTunes Library
from glob import glob
import os
import plistlib
import subprocess
import textwrap
import zipfile
ipas = glob(os.path.expanduser('~/Music/iTunes/Mobile Applications/*.ipa'))
@fschulze
fschulze / devpi-pypi-warehouse.sh
Created March 18, 2018 11:03
Create a devpi index for the new pypi.org (Warehouse)
devpi index -c root/warehouse type=mirror "mirror_web_url_fmt=https://pypi.org/project/{name}/" "mirror_url=https://pypi.org/simple/" title=Warehouse
@fschulze
fschulze / .coveragerc
Last active July 15, 2018 06:24
coverage.py issue #678
[run]
plugins =
chameleon_coverage_plugin
from devpi_server.main import get_pluginmanager
from devpi_server.main import _main
import sys
def main():
pm = get_pluginmanager()
pm.register(Plugin())
_main(pm, sys.argv)