Skip to content

Instantly share code, notes, and snippets.

View jensens's full-sized 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 / make_labels.py
Last active February 21, 2024 17:00
Create a bunch of same labels for each repo of an organization
View make_labels.py
# -*- coding: utf-8 -*-
"""
This script creates specific labels for all repositories of an organization.
before using it do a ``pip install PyGithub``.
"""
from github import Github
import argparse
@jensens
jensens / svnr_validate.py
Last active September 13, 2022 10:39
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 / .Xresources
Last active March 1, 2021 09:53
config
View .Xresources
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 / copy-to-latest.sh
Created February 18, 2021 14:49
Rsync via hard link whole tree of blobs (Plone/Zope)
View copy-to-latest.sh
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
View XResources
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 / config
Created February 10, 2015 19:19
.i3/config
View config
# jensens i3wm config
set $mainscreen LVDS1
set $sidescreen VGA1
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
@jensens
jensens / email.txt
Created April 10, 2020 17:58
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 November 29, 2018 10:34
Plone style Black and Isort cfg
View pyproject.toml
[tool.black]
line-length = 79
# skip-string-normalization = true
@jensens
jensens / INSTALL.rst
Last active April 13, 2019 09:43
sentry setup with docker-compose
View INSTALL.rst

In order to run this image do: docker-compose up -d to get all up. On first run DB initialization and initial user setup is done like so:

First start a bash in the container: docker-compose exec sentry /bin/bash. Then, inside bash, do sentry upgrade wait until it asks you for an inital user. When finished exit the bash.

When in doubt check with docker-compose ps if all went fine.

@jensens
jensens / date.pt
Created October 16, 2017 11:52
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