Skip to content

Instantly share code, notes, and snippets.

@osipxd
osipxd / paper-versions.json
Last active April 30, 2024 20:49
Paper versions links
{
"latest": "1.20.6",
"versions": {
"1.20.6": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/28/downloads/paper-1.20.6-28.jar",
"1.20.5": "https://api.papermc.io/v2/projects/paper/versions/1.20.5/builds/22/downloads/paper-1.20.5-22.jar",
"1.20.4": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/496/downloads/paper-1.20.4-496.jar",
"1.20.2": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar",
"1.20.1": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar",
"1.20": "https://api.papermc.io/v2/projects/paper/versions/1.20/builds/17/downloads/paper-1.20-17.jar",
"1.19.4": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar",
@KavenTheriault
KavenTheriault / nginx_reverse_proxy.md
Last active February 21, 2020 22:52
Configure Nginx Reverse Proxy as failover

Configure Nginx Reverse Proxy as failover

In this exemple of configuration, if the first server fail (proxy_connect_timeout) one time (max_fails), the second server will be used for 60s (fail_timeout).

The SSL certificate need to be configure on the ReverseProxy server AND the proxyied servers. You can use the same certificate and configurations on all servers.

To test the configuration you can change your host file to simulate the correct domain name.

Use the following tool to configure SSL with optimal configuration.

@GrenderG
GrenderG / IdenticonGenerator.java
Last active March 3, 2021 03:00
Generate identicons using java.
import javax.imageio.ImageIO;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.awt.image.WritableRaster;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@Sets88
Sets88 / get_mac_vendors_list.py
Last active February 11, 2023 06:13
Get MAC address vendor list from ieee and place it into sqlite3 database
#! /usr/bin/python
import os
import sys
import urllib2
import re
import sqlite3
def get_mac_table_file(filename="oui.txt"):
request = urllib2.urlopen("http://standards.ieee.org/develop/regauth/oui/oui.txt")
with open(filename, "w") as f:
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1