Skip to content

Instantly share code, notes, and snippets.

View GMatrixGames's full-sized avatar
😄
Just hanging out

Garrett Koleda GMatrixGames

😄
Just hanging out
View GitHub Profile
@GMatrixGames
GMatrixGames / pre-commit.sh
Last active January 13, 2023 03:29
Updates the Unreal Engine Build.version json file using Git instead of Perforce for versioning.
#!/bin/sh
branch=$(git rev-parse --abbrev-ref HEAD)
revcount=$(git rev-list --count $branch)
modifiedrev=$(($revcount + 1))
basename=$(basename -s .git `git config --get remote.origin.url`)
branch=("++$basename+$branch")
contents="$(jq --arg branch "$branch" --arg modifiedrev "$modifiedrev" '. + {BranchName:$branch, Changelist:$modifiedrev|tonumber}' Engine/Build/Build.version)" && \
@GMatrixGames
GMatrixGames / EFortRarity.java
Created September 12, 2020 17:18
EFortRarity enum for Java
package com.gmatrixgames.common.fnutils;
import java.awt.*;
/**
* Utility class for color coordination for embeds pertaining to cosmetics
*
* @author Garrett
*/
public enum EFortRarity {
@GMatrixGames
GMatrixGames / Helper.java
Created August 29, 2020 23:25
My common Helper class used in a lot of my projects
package com.gmatrixgames.fn.discord.utils;
import kotlin.text.Charsets;
import org.apache.commons.io.IOUtils;
import org.apache.wink.json4j.JSONException;
import org.apache.wink.json4j.JSONObject;
import javax.net.ssl.HttpsURLConnection;
import java.awt.*;
import java.io.*;