Skip to content

Instantly share code, notes, and snippets.

View jschpp's full-sized avatar

Johannes Schöpp jschpp

View GitHub Profile
@jschpp
jschpp / dovecot.conf
Created April 6, 2023 13:30
my dovecot conf
# 2.3.19.1 (9b53102964): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.19 (4eae2f79)
# OS: OpenBSD 7.2 amd64
# Hostname: mx.jschpp.de
first_valid_uid = 1000
mail_debug = yes
mail_location = maildir:~/Maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve
mbox_write_locks = fcntl

Keybase proof

I hereby claim:

  • I am jschpp on github.
  • I am jschpp (https://keybase.io/jschpp) on keybase.
  • I have a public key ASAgXMbfh_iSVS7IhdTupIdPURUMYJJw7KdjxYR0e8y0nAo

To claim this, I am signing this object:

@jschpp
jschpp / Dockerfile
Last active February 22, 2021 22:32
.Net + Powershell + Jupyter = ❤️
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster
RUN apt-get update && apt-get install python3 python3-pip -y
RUN pip3 install jupyterlab
RUN dotnet tool install -g --add-source "https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" Microsoft.dotnet-interactive
ENV PATH="/root/.dotnet/tools:${PATH}"
RUN dotnet interactive jupyter install
13:41:29|00:00:00|00:00:00.000| Initialization
13:41:29|00:00:00|00:00:00.010| - Host operating system version: '10.0.17763'
13:41:29|00:00:00|00:00:00.018| - Creating new lab definition with name 'Education'
13:41:29|00:00:00|00:00:00.037| - Location of lab definition files will be 'D:\PROJEKTE\Labs\BreakingSetup'
13:41:29|00:00:00|00:00:00.123| - Location of LabSources folder is 'D:\LabSources'
13:41:29|00:00:00|00:00:00.000| - Auto-adding ISO files
13:41:29|00:00:00|00:00:00.038| - found 15 OS images in the cache
13:41:30|00:00:00|00:00:00.253| - Added 'D:\LabSources\ISOs\SW_DVD9_Win_Pro_Ent_Edu_N_10_1809_64-bit_English_MLF_X21-96501.ISO'
13:41:30|00:00:00|00:00:00.267| - Added 'D:\LabSources\ISOs\SW_DVD9_Win_Server_STD_CORE_2019_64Bit_English_DC_STD_MLF_X21-96581.ISO'
13:41:30|00:00:00|00:00:00.281| - Done
@jschpp
jschpp / error.html
Last active April 22, 2019 18:37
Error Stack from grav
<!DOCTYPE html>
<!-- saved from url=(0026)http://localhost/guestbook -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Crikey! There was an error...</title>
<style>body {
font: 12px "Helvetica Neue", helvetica, arial, sans-serif;
function ParseLine([string]$Line) {
$returnObject = @{
Date = $null
Time = $null
Status = $null
}
$returnObject.Date = Get-Date $line.Split(',')[0] -Format "dd/MM/yyyy"
$returnObject.Time = Get-Date $line.Split(',')[0] -Format "hh:mm:ss"
$returnObject.Status = $line.Split(',')[1].TrimEnd('.')
@jschpp
jschpp / diff.ps1
Last active May 17, 2018 13:17
Quick and dirty diff in powershell
param (
[switch]$CompareObjects,
$left, # if I specify [string[]]$left the Property ReadCount which is created by gc is lost -.-'
$right,
[switch]$DisplayWhitespace
)
if (!$CompareObjects) {
$left = Get-Content $left
$right = Get-Content $right
}
@jschpp
jschpp / Export-PowerShellDataFile.psm1
Last active December 29, 2022 18:19
Exports a powershell object to a psd1 format. Can be re-imported via Import-PowershellDataFile
function Get-IdentedString {
<#
.SYNOPSIS
Returns $obj as indented string
.DESCRIPTION
Turns $obj to string and adds $indent * 4 spaces in front of it
.PARAMETER obj
Object to be converted to String
@jschpp
jschpp / CBS.log
Created March 9, 2018 10:57
.net 3.5 installation fail error logs on Server 2012 R2
This file has been truncated, but you can view the full file.
2018-03-09 11:33:37, Info CBS Trusted Installer is shutting down because: SHUTDOWN_REASON_AUTOSTOP
2018-03-09 11:33:37, Info CBS TiWorker signaled for shutdown, going to exit.
2018-03-09 11:33:37, Info CBS Ending the TiWorker main loop.
2018-03-09 11:33:37, Info CBS Ending the TrustedInstaller main loop.
2018-03-09 11:33:37, Info CBS Starting TiWorker finalization.
2018-03-09 11:33:37, Info CBS Starting TrustedInstaller finalization.
2018-03-09 11:33:37, Info CBS Ending TrustedInstaller finalization.
2018-03-09 11:33:37, Info CBS Ending TiWorker finalization.
2018-03-09 11:33:56, Info CBS TI: --- Initializing Trusted Installer ---
2018-03-09 11:33:56, Info CBS TI: Last boot time: 2018-03-07 14:02:10.495
@jschpp
jschpp / pdfpagecount.py
Last active January 13, 2017 08:04
Count sum of number of pages in a folder. Can be called with `-r` to check subdirectories also.
"""count pdf pages"""
from __future__ import print_function
import sys
from getopt import GetoptError, getopt
from PyPDF2 import PdfFileReader
try:
from os import scandir
except ImportError:
from scandir import scandir