Skip to content

Instantly share code, notes, and snippets.

Jonas Gröger JonasGroeger

Block or report user

Report or block JonasGroeger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JonasGroeger
JonasGroeger / OAuth2GrantTypes.java
Created Oct 24, 2019
OAuth 2 grant types enum for Spring apps
View OAuth2GrantTypes.java
public enum OAuth2GrantTypes {
AUTHORIZATION_CODE("authorization_code"),
IMPLICIT("implicit"),
PASSWORD("password"),
CLIENT_CREDENTIALS("client_credentials"),
REFRESH_TOKEN("refresh_token");
// Currently not supported by Spring Security
// https://tools.ietf.org/html/draft-ietf-oauth-device-flow-01
View SpringCronExpressionTester.java
package de.jonasgroeger;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.scheduling.support.CronSequenceGenerator;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
@JonasGroeger
JonasGroeger / unattend.xml
Created Aug 29, 2019
Put next to python-xxx.exe to auto-install preconfigured python. https://docs.python.org/3/using/windows.html#installing-without-ui
View unattend.xml
<Options>
<Option Name="InstallLauncherAllUsers" Value="0" />
<Option Name="SimpleInstall" Value="1" />
<Option Name="PrependPath" Value="1" />
<Option Name="Include_test" Value="0" />
<Option Name="Include_doc" Value="0" />
<Option Name="Include_tcltk" Value="0" />
</Options>
View awesome-snippets.md
@JonasGroeger
JonasGroeger / perf.sh
Last active May 7, 2018
Performancetest
View perf.sh
bash -c "rm -rf /tmp/test-d/; mkdir -p /tmp/test-d; cd /tmp/test-d/; git init" 1>/dev/null
@JonasGroeger
JonasGroeger / OnShutdownCompressingRollingFileAppender.java
Created Apr 14, 2018
OnShutdownCompressingRollingFileAppender the compresses on logging context stop
View OnShutdownCompressingRollingFileAppender.java
package de.jonasgroeger.logback;
import ch.qos.logback.core.LogbackException;
import ch.qos.logback.core.rolling.RollingFileAppender;
import ch.qos.logback.core.rolling.RollingPolicy;
import ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy;
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy;
import ch.qos.logback.core.rolling.helper.CompressionMode;
import ch.qos.logback.core.rolling.helper.Compressor;
View keybase.md

Keybase proof

I hereby claim:

  • I am jonasgroeger on github.
  • I am jonasgroeger (https://keybase.io/jonasgroeger) on keybase.
  • I have a public key ASChemutzTh_F1v-seff00EIXO3DRuzZGd6cUWRMyGckowo

To claim this, I am signing this object:

@JonasGroeger
JonasGroeger / README.md
Last active Jun 2, 2017
Export iFiske data to a KML file
View README.md

Steps to export iFiske data to a KML file

  1. Open Chrome on "http://www.ifiske.se/index.php/en/fishing-areas/karta"

  2. Press F12 and go to the "Console" tab

  3. Paste the following code:

    function Export_iFiske_To_KML() {
        var template = `
    <?xml version="1.0" encoding="UTF-8"?>
    <kml xmlns="http://www.opengis.net/kml/2.2">
    
@JonasGroeger
JonasGroeger / sync-projects
Last active Nov 26, 2019
Gitlab: Clone / Pull all projects in a group
View sync-projects
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="YOUR_NAMESPACE"
BASE_PATH="https://gitlab.example.com/"
PROJECT_SEARCH_PARAM=""
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")"
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }"
You can’t perform that action at this time.