Skip to content

Instantly share code, notes, and snippets.

View stuntguy3000's full-sized avatar
🎮
Playing Games...

Luke Anderson stuntguy3000

🎮
Playing Games...
View GitHub Profile
@magnetikonline
magnetikonline / README.md
Last active April 19, 2024 19:59
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

Microsoft active directory servers will default to offer LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.

@mkotb
mkotb / SimpleScoreboard.java
Last active December 24, 2022 02:29
Non-flickering scoreboard implementation; create scoreboards with ease.
import com.google.common.base.Charsets;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.*;
import java.lang.reflect.Constructor;
public class Foo {
public static void main(String[] args) {
String x = "This is weird: \u0022\u003B\u0069\u006E\u0074\u0020\u0079\u003D\u0031\u002F\u0030\u003B\u0078\u003D\u0022???";
System.out.println("x = " + x);
}
}
@DarkBlade12
DarkBlade12 / ParticleEffect.java
Last active December 23, 2023 16:20
This is a little library which allows you to display all possible particle effects in Minecraft with your plugin.
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.bukkit.Bukkit;
@Thinkofname
Thinkofname / gist:5110835
Last active September 23, 2019 23:29
0x3F Particle list
hugeexplosion
largeexplode
fireworksSpark
bubble
suspended
depthsuspend
townaura
crit
magicCrit
smoke
@paulononaka
paulononaka / JavaIntToLittleEndianUnsigned
Created April 7, 2011 17:22
Convert a Int (in Java, big endian signed) to LittleEndian unsigned
private static byte[] intToLittleEndian(long numero) {
ByteBuffer bb = ByteBuffer.allocate(4);
bb.order(ByteOrder.LITTLE_ENDIAN);
bb.putInt((int) numero);
return bb.array();
}
// OR ...
private static byte[] intToLittleEndian(long numero) {