Skip to content

Instantly share code, notes, and snippets.

View JonasGroeger's full-sized avatar
🏠
Working from home

Jonas Gröger JonasGroeger

🏠
Working from home
View GitHub Profile
#!/usr/bin/env bash
set -
export UPDATED_YES=✅
export UPDATED_NO=❌
export DIRTY_YES=🐷
export DIRTY_NO=✨
export REPO_TRUNCATE_CHARS=32

Balkonsolar (kostenoptimiert)

Annahmen:

  • Oberrohr mit ~40mm Durchmesser
  • Unterrohr mit ~13mm Durchmesser
  • Außensteckdose vorhanden
  • KFZ vorhanden für Fahrt nach Cadolzburg
  • Besuch bei Hornbach :)

Gesamtpreis: ~750€ + Preis vom Shelly

import org.hibernate.validator.HibernateValidator;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import javax.validation.Configuration;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorFactory;
import java.util.List;
/**
@JonasGroeger
JonasGroeger / git-libsecret.md
Last active March 23, 2024 07:58 — forked from maelvls/README.md
Guide: How to install git-credential-helper / libsecret in Debian / Ubuntu

Storing your GIT credentials in libsecret

# Install dependencies
$ sudo apt install make gcc git libsecret-1-0 libsecret-1-dev libglib2.0-dev

# Compile binary
$ sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret

# Configure git to use binary as credential storage
package de.jonasgroeger.aspect;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
@Aspect
public class LogAspect {
@Around("execution(* de.jonasgroeger.aspect.SubmissionService.uploadAttachment(..))")
@JonasGroeger
JonasGroeger / dl-sops.sh
Created September 30, 2022 18:36
Download latest version of SOPS
wget -O /usr/local/bin/sops \
"$(curl -s https://api.github.com/repos/mozilla/sops/releases/latest | jq -r '.assets[] | select(.name | test(".linux.amd64$")) | .browser_download_url')"
@JonasGroeger
JonasGroeger / .gitlab-ci.yml
Last active September 20, 2022 14:37
GitLab CI/CD: Staged Deployment (dev -> stage -> prod)
# When deploy-dev auto-deploys
# When deploy-dev succeeds, the (⏵) button for the deploy-stage stage shows up
# When deploy-dev fails, the (⏵) button for the deploy-stage stage does NOT show up
# Same for the deploy-prod stage
stages:
- deploy-dev
- deploy-test
@JonasGroeger
JonasGroeger / IT.N-Proxy-Guide.md
Last active January 18, 2022 18:21
IT.N Proxy Guide

IT.N Proxy Guide

Ausgehende Anfragen (z.B. Webhooks, HTTP-Aufrufe) ins Internet müssen über einen Proxyserver gehen.

Das betrifft nicht die Response eines Request ⇄ Response Zyklus.

Konfiguration

Host: http-proxy.niedersachsen.de
@JonasGroeger
JonasGroeger / proxy.jsh
Created December 2, 2021 16:59
JVM HTTP / HTTPS proxy configuration using jshell
import java.net.http.*;
import java.io.*;
var httpClient = HttpClient.newHttpClient();
var httpProxyHost = System.getProperty("http.proxyHost");
var httpProxyPort = System.getProperty("http.proxyPort");
var httpsProxyHost = System.getProperty("https.proxyHost");
var httpsProxyPort = System.getProperty("https.proxyPort");
@JonasGroeger
JonasGroeger / template.sh
Created October 4, 2021 09:13
Bash script template
#!/usr/bin/env bash
set -Eeuo pipefail
SCRIPT_DIR=$(python -c "import os, sys; print(os.path.dirname(os.path.realpath('${BASH_SOURCE[0]}')))")
echo "Hi!"