Skip to content

Instantly share code, notes, and snippets.

View TuxCoding's full-sized avatar

Alex (TuxCoding) TuxCoding

  • [::1]
View GitHub Profile
@TuxCoding
TuxCoding / golang-cross-compile.sh
Last active August 26, 2016 11:51
Cross compile command syntax
GOOS=windows GOARCH=386 go build -o hello.exe hello.go
#Supported architecture: https://golang.org/doc/install/source#environment
@TuxCoding
TuxCoding / java uuid regex.txt
Last active August 1, 2019 18:42
Java UUID Regex
[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}
@TuxCoding
TuxCoding / OfflineUUID.java
Created August 10, 2016 15:13
Generate a offline uuid based on the minecraft player name
import com.google.common.base.Charsets;
import java.util.UUID;
public class OfflineUUID {
public static void main(String[] test) throws Exception {
UUID.nameUUIDFromBytes(("OfflinePlayer:" + "playerName").getBytes(Charsets.UTF_8));
}
@TuxCoding
TuxCoding / start.sh
Created August 10, 2016 08:41
Java remote debugging startup
java -Xdebug -XX:+UnlockDiagnosticVMOptions -Xrunjdwp:transport=dt_socket,address=1000,server=y,suspend=n -jar fileName.jar
@TuxCoding
TuxCoding / find-duplicates.sql
Last active August 26, 2016 11:51
Find duplicates in SQL if COLUMN or COLUM, COLUM has the same values. Just replace TABLE and COLUMN with your setup.
SELECT
COLUMN, COUNT(*)
FROM
TABLE
GROUP BY
COLUMN
HAVING
COUNT(*) > 1
@TuxCoding
TuxCoding / autoIn-fastlogin-import.sql
Last active December 20, 2016 15:12
Import the auto in plugin database to the fastlogin database
INSERT INTO premium (Name, Premium, LastIp, UUID) SELECT
name AS Name,
/* Enable premium authentication only for those who want to be auto logged in, so
they have their cracked protection disabled */
!protection AND premium AS Premium,
/* Not used at the moment */
'' AS LastIp,
/* Remove the dashes - returns null if puuid is null too */
REPLACE(puuid, '-', '') AS UUID
FROM gt_nicknames