Skip to content

Instantly share code, notes, and snippets.

Avatar
🕶️
Available for training, coaching and trouble-shooting (as usual)..

Jens W. Klein jensens

🕶️
Available for training, coaching and trouble-shooting (as usual)..
View GitHub Profile
@jensens
jensens / email.txt
Created Apr 10, 2020
Simon von der LUGT hat beim Roten Kreuz nachgefragt (08.04.20 17:27)
View email.txt
Hi,
Ich habe beim Roten Kreuz nachgefragt - sie werden den Source Code der
App offenlegen - Fahrplan dazu habe ich aber keinen bekommen (siehe
Auszug aus dem Mail unten).
lg
Simon
@jensens
jensens / pyproject.toml
Created Nov 29, 2018
Plone style Black and Isort cfg
View pyproject.toml
[tool.black]
line-length = 79
# skip-string-normalization = true
@jensens
jensens / buildout.cfg
Created Aug 13, 2018
Sentry on Docker to monitor Zope (for Andreas)
View buildout.cfg
...
[instance]
...
eggs +=
raven
event-log-custom =
%import raven.contrib.zope
@jensens
jensens / calc_test_percentages.py
Created Jul 2, 2018
Simple percentage report of end of tests output.
View calc_test_percentages.py
#!./bin/python
"""
Simple percentage report of end of tests output. Copy the line from there and pass to script:
usage: $./calc_test_percentages.py 9372 tests, 180 failures, 324 errors and 266 skipped in 22 minutes 25.188 seconds
output:
green : 91.784%
failures: 1.921%
@jensens
jensens / configure.zcml
Created Jun 19, 2018
Plone Registry Exporter (parts only)
View configure.zcml
<configure
i18n_domain="kup.akivdb"
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone">
<!-- ADMIN -->
<browser:page
class=".registryexporter.RegistryExporterView"
for="plone.app.layout.navigation.interfaces.INavigationRoot"
name="plone-export-registry"
@jensens
jensens / date.pt
Created Oct 16, 2017
Show Event Start-End with Zope Content Provider usage
View date.pt
<time class="datum"
datetime="${result/iso}"
tal:define="result python:view.datedict"
tal:condition="result"
i18n:domain="my.fancy.site">
<--
case 1: whole day, same day
Mo, 21.01.2015
@jensens
jensens / corneribbon.pt
Created Sep 19, 2017
cornerribbon tile Plone
View corneribbon.pt
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="bda.aaf.site">
<head>
<style tal:condition="view/show">
/* The ribbons */
.corner-ribbon{
position: fixed;
top: 25px;
left: -50px;
width: 200px;
@jensens
jensens / stmce.rst
Last active Jul 24, 2017
sublime multi cursor edit
View stmce.rst

Multi-Edit in SublimeText2/ Linux

Multicursor Block/ Columns Selection

Keyboard:
  • Ctrl+Alt+[Up, Down] creates multicursor block
  • Ctrl+Alt+[Left, Right] expands as block
@jensens
jensens / svnr_validate.py
Last active Mar 23, 2017
Calculate the check digit of an Austrian social insurance number; Berechnen der Prüfziffer einer österreichischen Sozialversicherungsnummer
View svnr_validate.py
# -*- coding: utf-8 -*-
"""Calculate the check digit of an Austrian social insurance number
Berechnen der Prüfziffer einer österreichischen Sozialversicherungsnummer
copyright Klein & Partner KG.
License: Gnu Public License 2.0
from https://de.wikipedia.org/wiki/Sozialversicherungsnummer#.C3.96sterreich
@jensens
jensens / imageproxyview.py
Created Nov 3, 2016
Plone Image Proxy View
View imageproxyview.py
# -*- coding: utf-8 -*-
from plone import api
from plone.namedfile.interfaces import IStableImageScale
from plone.namedfile.scaling import ImageScale
from plone.scale.storage import AnnotationStorage
from Products.Five import BrowserView
from zExceptions import NotFound
from zope.interface import alsoProvides
from zope.interface import implementer
from zope.publisher.interfaces import IPublishTraverse
You can’t perform that action at this time.