Skip to content

Instantly share code, notes, and snippets.

@yushijinhun
yushijinhun / minecraft-offline-uuid.php
Created July 8, 2018 03:32 — forked from games647/minecraft-offline-uuid.php
Generate an offline minecraft UUID v3 based on the case sensitive player name
<?
/**
* Generates a offline-mode player UUID.
*
* @param $username string
* @return string
*/
public static function constructOfflinePlayerUuid($username) {
//extracted from the java code:
//new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
@yushijinhun
yushijinhun / !jdk-8203870.md
Last active December 19, 2019 04:27
[JDK-8203870]OpenJDK FXML Read-Only List Properties Bug

Issue in JDK Bug System: JDK-8203870


Expected output:

listProp: [elementA, elementB]
Problem did not appear
@yushijinhun
yushijinhun / keybase.md
Last active June 27, 2020 00:59
keybase proof @yushijinhun

Keybase has been acquired by Zoom, therefore you should NEVER blindly trust the information it provides!

Keybase proof

I hereby claim:

  • I am yushijinhun on github.
  • I am was yushijinhun (https://keybase.io/yushijinhun) on keybase.
  • I have a public key whose fingerprint is 9AF5 443C 95BB 317A 10ED 6B99 5BC1 67F7 3EA5 58E4
@yushijinhun
yushijinhun / Dockerfile
Created July 31, 2017 12:36
[ubuntu|docker]auto select fastest apt mirror
FROM ubuntu
RUN apt-get update -y \
&& apt-get install -y wget \
&& wget -O netselect.deb http://http.us.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-28+b1_`dpkg --print-architecture`.deb \
&& dpkg -i netselect.deb \
&& rm netselect.deb \
&& sed -r -i -e "s#http://(archive|security)\.ubuntu\.com/ubuntu/?#$(netselect -v -s1 -t20 `wget -q -O- https://launchpad.net/ubuntu/+archivemirrors | grep -P -B8 "statusUP|statusSIX" | grep -o -P "http://[^\"]*"`|grep -P -o 'http://.+$')#g" /etc/apt/sources.list
@yushijinhun
yushijinhun / DownloadTable.java
Last active February 24, 2016 13:09
Gui for jmccc-mcdownloader
package org.to2mbn.jmccc.mcdownloader.gui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URI;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
@yushijinhun
yushijinhun / ServerStatus.java
Created January 23, 2016 08:37
minecraft server pinger
package pulutalauncher.util.server;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import javax.imageio.ImageIO;
public class ServerStatus implements Serializable {