Skip to content

Instantly share code, notes, and snippets.

@chestercs
chestercs / ResourceJarLoader.java
Last active December 4, 2022 02:54
This class can tell, you have started it from ide or jar. If Jar, it can extract it's own wrapped resources or anything by keywords. #jar #resource #extract
import lombok.experimental.UtilityClass;
import lombok.extern.log4j.Log4j;
import org.apache.commons.io.FileUtils;
import org.springframework.util.ResourceUtils;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.jar.JarFile;
@chestercs
chestercs / Wow_ScanMapStruct.lua
Last active December 4, 2022 02:57
World of Warcraft - Wow Map structure dumper. Print all map level information to chat. Can be used in addons.
function TopHop.ScanMapStruct(arg)
local currentMapID = C_Map.GetBestMapForUnit(arg);
local mapTable = {}
if(currentMapID) then
local currentMapDetails = C_Map.GetMapInfo(currentMapID)
if(currentMapDetails) then
local currentMapType = currentMapDetails.mapType
local iteratingParentMapId = currentMapID
for i = currentMapType, 1, -1 do
local tempDetails = C_Map.GetMapInfo(iteratingParentMapId)