Skip to content

Instantly share code, notes, and snippets.

@bldrdash
bldrdash / grafana.ini
Last active August 14, 2024 00:34
Nginx reverse proxy for Prometheus and Grafana
# Settings are in addition or replacement to default config
[server]
protocol = https
domain = fqdn.com
root_url = %(protocol)s://%(domain)s/grafana/
serve_from_sub_path = true
@bldrdash
bldrdash / go-mod-rename.sh
Created March 13, 2024 22:00
Rename golang module
#!/bin/bash
if [ -z "$1" -o -z "$2" ]; then
echo $0 oldmod newmod
exit 1
fi
OLD_MODULE="$1"
NEW_MODULE="$2"
@bldrdash
bldrdash / SocketFactory.java
Last active May 31, 2024 13:22
SocketFactory for Self Signed PKCS12
package com.company.project;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.KeyStore;