> 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Leaflet Layer Control, which may be expanded by default, but may be collapsed using a button. | |
* | |
* @example new CollapsableLayerControl(layers, {}, { collapsed: false }) | |
*/ | |
export class CollapsableLayerControl extends L.Control.Layers { | |
onAdd(map) { | |
L.Control.Layers.prototype.onAdd.call(this, map); | |
const div = document.createElement("div"); | |
div.style.textAlign = "right"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta | |
import re | |
import unittest | |
def parse_timedelta(delta: str) -> timedelta: | |
"""Parses the given string as ISO 8601 timedelta""" | |
# https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/Duration.html#parse(java.lang.CharSequence) | |
match = re.compile( | |
r"(?P<sign>[-+]?)P" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; | |
import java.security.KeyManagementException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.SecureRandom; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import java.util.HexFormat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.auth0.jwt.JWT; | |
import com.auth0.jwt.algorithms.Algorithm; | |
import org.bouncycastle.util.io.pem.PemReader; | |
import org.junit.Test; | |
import java.io.BufferedReader; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.interfaces.RSAPrivateKey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Using optional BOM (0xEF 0xBB 0xBF) --> | |
<!-- From http://forum.openstreetmap.org/viewtopic.php?id=7186 --> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
targetNamespace="http://openstreetmap.org/osm/0.6" | |
xmlns="http://openstreetmap.org/osm/0.6"> | |
<xs:element name="osm"> | |
<xs:complexType> | |
<xs:sequence> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Simon Legner <Simon.Legner@gmail.com> | |
convert () { | |
in="$1" | |
out="${in%.m4a}.ogg" | |
ffmpeg -i "$in" \ | |
-acodec libvorbis -aq 4 -vn -ac 2 \ | |
-map_metadata 0 \ | |
"$out" |
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(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/caddy/Caddyfile | |
cloud.example.com { | |
root /srv/http/nextcloud/ | |
fastcgi / localhost:7070 php { | |
root /var/www/html/ | |
} | |
timeouts 30m | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |