Skip to content

Instantly share code, notes, and snippets.

View jensens's full-sized avatar

Jens W. Klein jensens

View GitHub Profile
@jensens
jensens / copy-to-latest.sh
Created February 18, 2021 14:49
Rsync via hard link whole tree of blobs (Plone/Zope)
echo "COPY DB ----------------------------------------------------------------------"
rm -rf latest-pgdb
cp -R live-pgdb latest-pgdb
chown -R 500.1001 latest-pgdb
echo "COPY BLOBS -------------------------------------------------------------------"
SOURCE=/data/aaf/live-blobs
TARGET=/data/aaf/latest-blobs
LINKDEST=`python3 -c "import os.path; print(os.path.relpath('$SOURCE', '$TARGET'))"`
rsync -avh --delete-during --link-dest=$LINKDEST $SOURCE/ $TARGET
@jensens
jensens / XResources
Created February 8, 2021 20:17
My Regolith 1.5 Configuration
i3-wm.gaps.focus_follows_mouse: yes
i3-wm.bar.trayoutput: eDP-1
i3-wm.bar.stripworkspacenumbers: no
i3-wm.workspace.01.name: 1: term
i3-wm.workspace.02.name: 2: web
i3-wm.workspace.03.name: 3: dev
i3-wm.workspace.04.name: 4: apps
i3-wm.workspace.05.name: 5: files
@jensens
jensens / .Xresources
Last active March 1, 2021 09:53
config
i3-wm.bar.trayoutput: eDP-1
i3-wm.gaps.focus_follows_mouse: yes
i3-wm.program.files: /usr/bin/nemo
i3-wm.workspace.01.name: 1:<span font_desc='JetBrains Mono Medium 10'> 1 terminal </span>
i3-wm.workspace.02.name: 2:<span font_desc='JetBrains Mono Medium 10'> 2 web </span>
i3-wm.workspace.03.name: 3:<span font_desc='JetBrains Mono Medium 10'> 3 dev </span>
i3-wm.workspace.04.name: 4:<span font_desc='JetBrains Mono Medium 10'> 4 mail </span>
i3-wm.workspace.05.name: 5:<span font_desc='JetBrains Mono Medium 10'> 5 chat </span>
@jensens
jensens / email.txt
Created April 10, 2020 17:58
Simon von der LUGT hat beim Roten Kreuz nachgefragt (08.04.20 17:27)
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 November 29, 2018 10:34
Plone style Black and Isort cfg
[tool.black]
line-length = 79
# skip-string-normalization = true
@jensens
jensens / buildout.cfg
Created August 13, 2018 14:49
Sentry on Docker to monitor Zope (for Andreas)
...
[instance]
...
eggs +=
raven
event-log-custom =
%import raven.contrib.zope
@jensens
jensens / calc_test_percentages.py
Created July 2, 2018 14:42
Simple percentage report of end of tests output.
#!./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 June 19, 2018 06:24
Plone Registry Exporter (parts only)
<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 October 16, 2017 11:52
Show Event Start-End with Zope Content Provider usage
<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 September 19, 2017 13:42
cornerribbon tile Plone
<!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;