Skip to content

Instantly share code, notes, and snippets.

View mdornseif's full-sized avatar

Maximillian Dornseif mdornseif

View GitHub Profile
@mdornseif
mdornseif / Makefile
Created January 12, 2011 23:25
tag deploys for appengine
deploy: dependencies check
# index must be clean (no modified files)
git diff-index --quiet --cached HEAD
# no uncomitted changes
git diff-files --quiet
# create a branch for the current version
git branch -f deploy_`grep -E '^version: ' app.yaml | cut -d ' ' -f 2`
# push current code to that branch
git push -f . deploy_`grep -E '^version: ' app.yaml | cut -d ' ' -f 2`
@mdornseif
mdornseif / calendar.coffee
Created January 16, 2011 20:59
Create Semantic Caledar
# Create a calendar table. See below for an example.
'Created by Maximillian Dornseif on 2011-01-16.'
util = require('util')
dayNames = ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
# **Find the ISO 8601 Weekday for a given date** - based on code from
# [jUI.datepoicker](http://jquery-ui.googlecode.com/svn/trunk/ui/jquery.ui.datepicker.js)
@mdornseif
mdornseif / gist:805540
Created February 1, 2011 07:26
Beispiel für eine DSL zum Testen von REST-Interfaces
# This is just a comment
GET http://www.spiegel.de/ -> 200 containing "\willkommen\w"
# the same as
# curl -X GET http://www.spiegel.de/
# check it returns 200
# check the reply contains the regular expression "\willkommen\w"
POST http://www.postbin.org/nqg379 {'JSON': 'data, urlencoded'} -> 201
# the same as
@mdornseif
mdornseif / gist:829238
Created February 16, 2011 11:33
Rebase eines Reviews
c0ldcut:tmp md$ git clone ssh://[email protected]:29418/EDIhub
Cloning into EDIhub...
remote: Counting objects: 3503, done
remote: Finding sources: 100% (3503/3503)
Receiving objects: 60% (2102/3503), 323.91 KiB | 115 KiB/s
Receiving objects: 100% (3503/3503), 953.89 KiB | 200 KiB/s, done.
Resolving deltas: 100% (2379/2379), done.
c0ldcut:tmp md$ cd EDIhub
diff --git a/husoftm2/lieferscheine.py b/husoftm2/lieferscheine.py
index f0f4691..4bfe0df 100644
--- a/husoftm2/lieferscheine.py
+++ b/husoftm2/lieferscheine.py
@@ -67,6 +67,17 @@ def get_ls_kb_data(conditions, additional_conditions=None, limit=None, header_on
auftragsnr2satznr[remove_prefix(kopf['auftragsnr'], 'SO')] = pos_key
satznr2auftragsnr[pos_key] = remove_prefix(kopf['auftragsnr'], 'SO')
koepfe[pos_key] = d
+ if row['ALK00_dfsl']:
+ # Basis dieses Codes:
diff --git a/husoftm2/fields.py b/husoftm2/fields.py
index 205931b..5f7e7cc 100644
--- a/husoftm2/fields.py
+++ b/husoftm2/fields.py
@@ -774,11 +774,11 @@ MAPPINGDIR = {
'LKKDRG': 'rechnungsempfaenger',
'LKKDNR': 'warenempfaenger',
'LKLFSN': 'lieferscheinnr',
- 'LKDTLF': 'ALK_lieferschein_date',
- 'LKZTLF': 'lieferschein_time',
From f779766658a18af79555e73efb20d6bce1de83e0 Mon Sep 17 00:00:00 2001
From: Maximillian Dornseif <[email protected]>
Date: Wed, 9 Mar 2011 08:18:48 +0100
Subject: [PATCH] ndling ob Umlauts in Domains
---
shop/tools.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/shop/tools.py b/shop/tools.py
iff --git a/husoftm2/lieferscheine.py b/husoftm2/lieferscheine.py
index 19739ce..e39cb20 100644
--- a/husoftm2/lieferscheine.py
+++ b/husoftm2/lieferscheine.py
@@ -250,7 +250,7 @@ def get_new(limit=11):
# Dadurch dsa wir absteigend nach LKDTLF sortieren, senken wir das Risiko, noch nicht komplett
# von SoftM bearbeitete Datens<C3><A4>tze zu erhelten - bei denen ist das Datum und die Menge in der Rege
# noch nicht gesetzt.
- for kopf in query(['ALK00'], ordering=['LKDTLF DESC'], fields=['LKLFSN'],
+ for kopf in query(['ALK00'], ordering=['LKDTLF DESC, LKZTLF DESC'], fields=['LKLFSN'],
diff --git a/cs/ablage.py b/cs/ablage.py
index 7ec72b1..74adcba 100644
--- a/cs/ablage.py
+++ b/cs/ablage.py
@@ -31,8 +31,12 @@ def store(akte_id, pdfdata, typ, datum, quelle, ref, obj=None, **kwargs):
* kwargs moegen weitere Argumente, die d-ablage verarbeitet, sein.
"""
# ref in einen Unicode String umwandeln
- if isinstance(ref, list):
- ref = u' '.join([unicode(x) for x in ref if x])