This file contains hidden or 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
# Add this line in your container that needs to mount a share. | |
# The target path will be relative to the root of the container. | |
# Note the missing slash '/' in the target path. In the example, the mount point will be at /<target path> | |
# Without 'create=dir', the container won't be able to start as the /<target path> have to exist to mount properly | |
lxc.mount.entry = /mnt/user/<the share name> <target path> none bind,create=dir 0 0 |
This file contains hidden or 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
#!/usr/bin/env bash | |
#### | |
# This script use .env where should be defined DB_FOLDER (the PG data folder) and DB_BACKUPS_FOLDER (the backups location). | |
# It stops the immich stack then make the backup by zipping the db data to a tar file. | |
#### | |
set -a | |
source .env |
This file contains hidden or 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.fasterxml.jackson.core.Version; | |
import com.fasterxml.jackson.databind.AnnotationIntrospector; | |
import com.fasterxml.jackson.databind.introspect.Annotated; | |
import com.fasterxml.jackson.databind.introspect.AnnotatedMember; | |
import com.fasterxml.jackson.databind.module.SimpleModule; | |
import java.lang.annotation.Annotation; | |
This file contains hidden or 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
basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/<user>/<repo>/releases/latest) |
This file contains hidden or 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.fasterxml.jackson.databind.ObjectReader; | |
import com.fasterxml.jackson.dataformat.avro.AvroMapper; | |
import com.fasterxml.jackson.dataformat.avro.AvroSchema; | |
import io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer; | |
import io.confluent.kafka.serializers.KafkaAvroDeserializerConfig; | |
import lombok.SneakyThrows; | |
import org.apache.avro.Schema; | |
import org.apache.kafka.common.errors.SerializationException; | |
import org.apache.kafka.common.serialization.Deserializer; |
This file contains hidden or 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 io.opentracing.log.Fields | |
import io.opentracing.tag.Tags | |
import io.opentracing.util.GlobalTracer | |
import org.aspectj.lang.ProceedingJoinPoint | |
import org.aspectj.lang.annotation.Around | |
import org.aspectj.lang.annotation.Aspect | |
import org.springframework.stereotype.Component | |
import reactor.core.publisher.Mono | |
This file contains hidden or 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
chattr +i /mountpoint # will prevent writes for /mountpoint, but not prevent mounting |
This file contains hidden or 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
// ==UserScript== | |
// @name Dofusbook real dmg calculator | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.dofusbook.net/fr/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=dofusbook.net | |
// @grant none | |
// ==/UserScript== | |
(function() { |
This file contains hidden or 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
String toSQL(EntityManager em, String hql) { | |
SessionImplementor hibernateSession = em.unwrap(SessionImplementor.class); | |
HQLQueryPlan p = new HQLQueryPlan(hql, false, Map.of(), hibernateSession.getSessionFactory()); | |
if (p.getTranslators().length > 1) { | |
throw new UnsupportedOperationException(); | |
} | |
return p.getTranslators()[0].getSQLString(); | |
} |
This file contains hidden or 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 | |
compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
output='/usr/local/bin/docker-compose' | |
curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output | |
chmod +x $output | |
echo $(docker-compose --version) |
NewerOlder