Skip to content

Instantly share code, notes, and snippets.

View FonzTech's full-sized avatar
😄
Developing

Alfonso FonzTech

😄
Developing
View GitHub Profile
@FonzTech
FonzTech / disable_bottom_banner_tampermonkey.js
Last active November 6, 2023 00:00
Disable bottom banner on Songsterr - TamperMonkey
// ==UserScript==
// @name Disable bottom banner on Songsterr
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Disable bottom banner on Songsterr
// @author You, credit: https://stackoverflow.com/users/3710743/fonztech
// @match https://www.songsterr.com/*
// @grant none
// ==/UserScript==
@FonzTech
FonzTech / MultipleFilesConfigSource.java
Last active September 5, 2022 12:41
Load multiple properties files from different paths. Useful when working with MicroProfile and Quarkus. Put your filepaths, separated by colon (like the PATH variable) in the PROPERTIES_FILES environment variable.
package it.alfonsopauciello.config;
import org.eclipse.microprofile.config.spi.ConfigSource;
import java.io.FileReader;
import java.util.Properties;
import java.util.Set;
public class MultipleFilesConfigSource implements ConfigSource {
private static final Properties configuration = new Properties();
@FonzTech
FonzTech / s3sync.sh
Last active November 7, 2023 20:56
S3-compatible buckets file sync. Useful to backup logs and other meaningful files, when Docker's Log Driver is "json-file"
#!/bin/bash
# Functions
EscapeFilename()
{
printf '%s' "$1" | sed -e 's/[^A-Za-z0-9._-]/_/g'
}
# Configuration
S3CMD_PARAMETERS=