Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Legner simon04

  • Innsbruck, Austria
View GitHub Profile
View MacBook Air.md
> neofetch
                    c.'          simon@simon-mac 
                 ,xNMM.          --------------- 
               .OMMMMo           OS: macOS Monterey 12.3 21E230 x86_64 
               lMM"              Host: MacBookAir10,1 
     .;loddo:.  .olloddol;.      Kernel: 21.4.0 
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Packages: 242 (brew), 48 (nix-user) 
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Shell: fish 3.4.1 
 XMMMMMMMMMMMMMMMMMMMMMMMX. Resolution: 2560x1600 , 3440x1440 @ -Hz 
@simon04
simon04 / gist:6865179
Last active Feb 15, 2022
Gradle, Java plugin, Jar MANIFEST, Class-Path is empty
View gist:6865179

Gradle, Java plugin, Jar MANIFEST, Class-Path is empty

I struggled with with the jar MANIFEST file built with Gradle containing an empty Class-Path. I traced down the problem to the order of the dependencies and jar blocks in the build.gradle file:

Wrong (jar before dependencies):

jar {
 manifest.attributes(
@simon04
simon04 / git.sh
Created Jan 14, 2020
Git merge/replace orphan branch into master
View git.sh
git checkout --orphan new-framework
# completely rewrite your application in new framework
git merge --strategy=ours --allow-unrelated-histories master
git commit-tree -p HEAD^2 -p HEAD^1 -m "Merge branch 'new-framework'" "HEAD^{tree}"
git reset --hard $OUTPUT_FROM_PREVIOUS_COMMAND
git checkout master
git merge --ff-only new-framework
@simon04
simon04 / Caddyfile
Last active Jan 11, 2022
Nextcloud via Docker and Caddy
View Caddyfile
# /etc/caddy/Caddyfile
cloud.example.com {
root /srv/http/nextcloud/
fastcgi / localhost:7070 php {
root /var/www/html/
}
timeouts 30m
}
@simon04
simon04 / JwtAuthenticator.java
Created Dec 30, 2021
Jetty Authenticator for JWT/JWKS
View JwtAuthenticator.java
package at.tbbm.manual_input.util;
import com.auth0.jwk.Jwk;
import com.auth0.jwk.JwkException;
import com.auth0.jwk.JwkProvider;
import com.auth0.jwk.UrlJwkProvider;
import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.JWTVerificationException;
import com.auth0.jwt.interfaces.DecodedJWT;
@simon04
simon04 / README.md
Created Dec 7, 2021
IntelliJ IDEA // external tools // javap
View README.md
@simon04
simon04 / README.md
Last active Dec 7, 2021
IntelliJ IDEA // external tools // oxipng
View README.md
@simon04
simon04 / Getting rid of "INFO: None-ODF attribute created for …".md
Last active Nov 7, 2021
Getting rid of "INFO: None-ODF attribute created for …"
View Getting rid of "INFO: None-ODF attribute created for …".md

I tried to get rid of the following messages by the Apache odfdom library.

Aug 20, 2014 8:55:45 AM org.odftoolkit.odfdom.pkg.OdfXMLFactory newOdfAttribute
INFO: None-ODF attribute created for calcext:value-type

Strangely, this did not work out …

java.util.logging.Logger.getLogger("org.odftoolkit").setLevel(java.util.logging.Level.WARNING);
@simon04
simon04 / fontAwesome.ts
Last active Jun 11, 2021
Font Awesome directive for Angular.js 1.x
View fontAwesome.ts
import angular from 'angular';
import fontawesome from '@fortawesome/fontawesome-svg-core';
import {faPrint} from '@fortawesome/free-solid-svg-icons/faPrint';
import {faSearch} from '@fortawesome/free-solid-svg-icons/faSearch';
fontawesome.library.add(faPrint, faSearch);
function directive(): ng.IDirective {
return {
restrict: 'E',
@simon04
simon04 / index.html
Created Jun 9, 2021
Leaflet example using JavaScript modules
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
/>
</head>