Skip to content

Instantly share code, notes, and snippets.

View cherabear4's full-sized avatar
๐Ÿ’
c++

chera cherabear4

๐Ÿ’
c++
View GitHub Profile
@cherabear4
cherabear4 / firebaseUtil.ts
Created March 10, 2024 16:33
set of functions useful for firebase queries
import { collection, doc, getDoc, getDocs, limit, orderBy, query } from "firebase/firestore";
import { db } from "./firebase";
const documentExists = async (collectionName: string, documentId: string) => {
const collectionRef = doc(db, collectionName, documentId);
const docSnap = await getDoc(collectionRef);
if (docSnap.exists()) {
return true;
} else {
return false;
@cherabear4
cherabear4 / Snippet-Button.java
Created May 19, 2022 01:51
Mod toggle button for a clickgui
//This is really old code and uses really crappy ways to position things lol, my bad.. Releasing this code because i no longer use it
if(m.isEnabled()) {
GlStateManager.pushMatrix();
GlStateManager.translate(37.0f, -60.0f, 0.0f);
RoundedUtils.drawRoundedRect(this.x + this.w - 40, this.w + y - 2, this.x + this.w - 20, this.w + y + 6, 5, new Color(66, 245, 102).getRGB());
RoundedUtils.drawRoundedRect(this.x + this.w - 30, this.w + y - 2, this.x + this.w - 20, this.w + y + 6, 5, new Color(255, 255, 255, 255).getRGB());
GlStateManager.popMatrix();
} else {
GlStateManager.pushMatrix();
@cherabear4
cherabear4 / GuiLogin.java
Created April 20, 2022 00:50
Cracked Login
package package;
import base.util.SessionChanger;
import net.minecraft.client.gui.*;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import java.io.IOException;