Skip to content

Instantly share code, notes, and snippets.

View Be1zebub's full-sized avatar
🚀
gmod.one/discord

Beelzebub Be1zebub

🚀
gmod.one/discord
View GitHub Profile
@Be1zebub
Be1zebub / gmodstore-make-release.js
Created October 29, 2025 22:33
npm run release to generate .zip for your release
import { readdir, readFile, stat, writeFile } from "fs/promises"
import JSZip from "jszip"
import { join } from "path"
const addonName = "one-chat"
const contents = [
"lua",
"materials",
"resource",
"localization.csv",
@Be1zebub
Be1zebub / steam-avatar.js
Created October 17, 2025 09:27
DOMParser based avatarURL scrapper, no api creds needed - designed for clientside apps.
export async function fetchSteamAvatar(steamID64, preferredSize = "full") {
try {
const endpoint = `https://steamcommunity.com/profiles/${steamID64}/?xml=1`
const response = await fetch(endpoint)
if (!response.ok) {
console.error("Error fetching avatar:", response.statusText)
return null
}
/* BitMask usage example:
const PERMISSIONS = {
READ: 1,
WRITE: 2,
EXECUTE: 4,
DELETE: 8,
ADMIN: 16,
}
const permissions = new BitMask()
@Be1zebub
Be1zebub / scrollbar.svelte
Created October 9, 2025 03:48
the idea was make a custom customizable scrollbar track/thumb since default is bad at styling. so we disable defaults rendering & make custom. havent finished it, even idk if this works XD
<script lang="ts">
// WIP! Not finished yet!
import { onDestroy, onMount } from "svelte"
let wrapperNode: HTMLElement
let contentNode: HTMLElement
let showBar = false
let thumbHeight = 0
let thumbTop = 0
@Be1zebub
Be1zebub / gmod_fonts_viewer.lua
Created September 18, 2025 13:48
GMod fonts list & inspector (opentype.js based parser)
local HTML = [[<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
<style>
html, body {
background-color: rgba(0, 0, 0, 0.1);
class BitMask {
constructor(initialValue = 0, useBigInt = false) {
this.useBigInt = useBigInt
this.mask = useBigInt ? BigInt(initialValue) : initialValue
}
static fromArray(values, useBigInt = false) {
const instance = new BitMask(0, useBigInt)
values.forEach((value) => instance.add(value))
return instance
@Be1zebub
Be1zebub / egg-svelte-kit.json
Created April 6, 2025 10:29
A SvelteKit egg for Pterodactyl.
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2025-04-06T10:28:26+00:00",
"name": "SvelteKit",
"author": "[email protected]",
"description": "A SvelteKit egg for Pterodactyl.\r\n\r\nThis will clone a git repo of your SvelteKit project.\r\nInstalls dependencies, builds the project, and runs the server on startup.",
@Be1zebub
Be1zebub / media_hotkeys.ahk
Created March 24, 2025 14:31
put in shell:startup
; AutoHotkey Media Keys
; shift + f1
+F1:: Send "{Media_Prev}"
; shift + f2
+F2:: Send "{Media_Next}"
; shift + f3
+F3:: Send "{Media_Play_Pause}"
@Be1zebub
Be1zebub / winscp_wt_ssh.bat
Last active April 6, 2025 18:18
Run ssh sessions in winscp with openssh + windows terminal (ssh key auth only)
@echo off
REM winscp + wt + openssh
REM Run ssh sessions in winscp with openssh + windows terminal (ssh key auth only)
REM https://gist.github.com/Be1zebub/024acb15e16e2c7231ab484c97a717ce/
REM 1. replace %ProgramFiles%\PuTTY\putty.exe in WinSCP settings (integrations > software > terminal path)
REM with "cmd.exe /c C:/winscp_wt_ssh.bat !@ !# !U !/ !N"
REM 2. add your ssh key to ssh-agent (ssh-add %UserProfile%/.ssh/myShhKey)
-- darkrp textWrap fork
-- adds maxLines arg
local GetTextSize = surface.GetTextSize
local sub, gsub = string.sub, string.gsub
local function charWrap(text, remainingWidth, maxWidth)
local totalWidth = 0
text = gsub(text, ".", function(char)