Skip to content

Instantly share code, notes, and snippets.

Julian König jkoenig134

Block or report user

Report or block jkoenig134

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import java.util.concurrent.TimeUnit;
import java.util.Map;
import java.util.HashMap;
import java.util.function.Function;
public class RateLimiter<T> {
private final long rateLimit;
private final Function<T, ?> keyMapper;
private final Map<?, Long> timestamps;
import javafx.application.Platform;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import java.util.Timer;
import java.util.TimerTask;
public class AnimatedTitle {
public interface Animation {
stnwtr /
Last active Mar 1, 2019
HiddenKeyListener for JavaFX
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import java.util.Collections;
import java.util.Optional;
import java.util.Set;
class HiddenKeyListener<T extends Event> implements EventHandler<T> {
JohnnyJayJay /
Last active Sep 2, 2019
Event Waiter für Spigot und faule Menschen, die Inventar Menüs wollen
import org.bukkit.event.Event;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
JohnnyJayJay /
Last active Apr 10, 2019
A util class to build table-like Strings in Java.
import java.util.Arrays;
import java.util.Objects;
* A utility class that can be used to easily create String tables in Java without any extra frameworks.
* This can be useful to display table-like structures in Discord codeblocks, for example.
* <p>If framing is activated, the tables usually look like this (but with box drawing characters):
* <code>
* ------------------------------------
DarkSeraphim /
Last active Dec 30, 2018
Notchifier - Thou shall be Notch
package net.darkseraphim.test;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.wrappers.EnumWrappers;
import com.comphenix.protocol.wrappers.PlayerInfoData;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
soheilhy /
Last active Oct 18, 2019
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

darkhelmet / balance.go
Created Jun 16, 2013
Simple TCP load balancer in Go.
View balance.go
package main
import (
You can’t perform that action at this time.