Skip to content

Instantly share code, notes, and snippets.

Haowei Wen yushijinhun

Block or report user

Report or block yushijinhun

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
@yushijinhun
yushijinhun / get_skin.sh
Created Aug 23, 2018
Download Minecraft skin using bash
View get_skin.sh
name=ZhaiShu
wget -O skin.png $(curl --silent https://sessionserver.mojang.com/session/minecraft/profile/$(curl --silent -X POST -H 'Content-Type: application/json' --data "[\"$name\"]" https://api.mojang.com/profiles/minecraft|grep -Po '"id"\s*:\s*"\K[^"]+')|grep -Po '"value"\s*:\s*"\K[^"]+'|base64 -d|grep -Po '"SKIN"\s*:\s*{\s*"url"\s*:\s*"\K[^"]+')
@yushijinhun
yushijinhun / minecraft-offline-uuid.php
Created Jul 8, 2018 — forked from games647/minecraft-offline-uuid.php
Generate an offline minecraft UUID v3 based on the case sensitive player name
View minecraft-offline-uuid.php
<?
/**
* 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 / Test.java
Created May 26, 2018
OpenJDK FXML Read-Only List Properties Bug
View Test.java
package test;
import java.io.IOException;
import javafx.beans.NamedArg;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXMLLoader;
public class Test {
View keybase.md

Keybase proof

I hereby claim:

  • I am yushijinhun on github.
  • I am 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

To claim this, I am signing this object:

@yushijinhun
yushijinhun / openpgp.txt
Created Dec 7, 2017
OpenKeychain 关联用户标识
View openpgp.txt
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:9af5443c95bb317a10ed6b995bc167f73ea558e4]
@yushijinhun
yushijinhun / Dockerfile
Created Jul 31, 2017
[ubuntu|docker]auto select fastest apt mirror
View Dockerfile
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 Feb 24, 2016
Gui for jmccc-mcdownloader
View DownloadTable.java
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 Jan 23, 2016
minecraft server pinger
View ServerStatus.java
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 {
You can’t perform that action at this time.