Skip to content

Instantly share code, notes, and snippets.

View justisr's full-sized avatar
💭
Processing

Justis R justisr

💭
Processing
  • BuiltByBit
  • United States
View GitHub Profile
@justisr
justisr / build.js
Last active November 24, 2023 21:16
import { readdir, rm, mkdir, rename } from 'node:fs/promises';
import { join, resolve } from 'path';
const start = performance.now();
const srcDir = join('src', 'main', 'resources', '_static');
const targetDir = join('target', 'classes', '_static');
async function fileHash(file) {
const md5Hasher = new Bun.CryptoHasher('md5');
return md5Hasher.update(await file.text()).digest('hex').substring(0, 16);
var Pa=Object.create;var{defineProperty:ra,getPrototypeOf:Oa,getOwnPropertyNames:Ca}=Object;var Ka=Object.prototype.hasOwnProperty;var Ma=(a,i,n)=>{n=a!=null?Pa(Oa(a)):{};const o=i||!a||!a.__esModule?ra(n,"default",{value:a,enumerable:!0}):n;for(let e of Ca(a))if(!Ka.call(o,e))ra(o,e,{get:()=>a[e],enumerable:!0});return o};var O=(a,i)=>()=>(i||a((i={exports:{}}).exports,i),i.exports);var sa=O((qa,ga)=>{var ta;ta={passwords:"123456,password,12345678,qwerty,123456789,12345,1234,111111,1234567,dragon,123123,baseball,abc123,football,monkey,letmein,shadow,master,696969,mustang,666666,qwertyuiop,123321,1234567890,pussy,superman,654321,1qaz2wsx,7777777,fuckyou,qazwsx,jordan,123qwe,000000,killer,trustno1,hunter,harley,zxcvbnm,asdfgh,buster,batman,soccer,tigger,charlie,sunshine,iloveyou,fuckme,ranger,hockey,computer,starwars,asshole,pepper,klaster,112233,zxcvbn,freedom,princess,maggie,pass,ginger,11111111,131313,fuck,love,cheese,159753,summer,chelsea,dallas,biteme,matrix,yankees,6969,corvette,austin,access,thunder,mer
@justisr
justisr / Eclipse.md
Last active August 2, 2023 19:07 — forked from danthe1st/Eclipse.md
Why I personally prefer Eclipse over IntelliJ

Why I personally prefer Eclipse over IntelliJ

Introduction/Disclaimers

I do not claim any IDE being better than another. These are just reasons I personally like developing in Eclipse more than I like developing in IntelliJ.

I have used both Eclipse and IntelliJ for quite some time and I cannot deny that both are excellent IDEs. While Eclipse is better for me, this might not be the case for you. This is my subjective opinion and this gist is intended to explain some reasons so I don't have to repeat myself all the time.

As I am (mainly) a Java developer, this applies to Java development specifically but some points may not be specific to Java.

What is compared?

IntelliJ comes in two editions: Community Edition (free) and Ultimate Edition (paid). When comparing Eclipse and IntelliJ, this is (in my experience) often ignored. Some functionality is possible in Eclipse (especially using Eclipse IDE for Enterprise Java Developers which is Free and Open Source as well) which is available in IntelliJ

@justisr
justisr / TitleUpdater.java
Last active July 6, 2023 03:26
Update an inventory name while opened without NMS
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import com.gmail.justisroot.autoecon.data.ServerSpecs;
@justisr
justisr / UUIDProvider.java
Last active August 29, 2022 11:39
Get the real UUID from a player name. Requires internet connection.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@justisr
justisr / hmff.sublime-syntax
Created September 20, 2018 00:22
Sublime text syntax file for HMFF
%YAML 1.2
---
name: HMFF
file_extensions: [hmff]
scope: source.c
contexts:
main:
- match: "^\\s*?(#).*"
scope: comment.line
@justisr
justisr / gist:72423b92e1880c8f0a1cbdfcaa75da1d
Created August 13, 2021 00:46 — forked from dsci/gist:1347672
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@justisr
justisr / JsonMessage.java
Last active July 27, 2021 13:32
Send json messages to a player.
//Created by Justis Root. Released into the public domain.
//https://gist.github.com/justisr/7a7449adac931a066c51/
//
//Source is licensed for any use, provided that this copyright notice is retained.
//Modifications not expressly accepted by the author should be noted in the license of any forks.
//No warranty for any purpose whatsoever is implied or expressed,
//and the author shall not be held liable for any losses, direct or indirect as a result of using this software.
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@justisr
justisr / BungeeCom.java
Last active April 14, 2021 20:37
Bungee communications wrapper util
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
package com.gmail.justisroot.broker;
import java.math.BigDecimal;
import java.util.UUID;
import org.spongepowered.api.item.inventory.Inventory;
import org.spongepowered.api.item.inventory.ItemStack;
public interface Broker {