Skip to content

Instantly share code, notes, and snippets.

View Be1zebub's full-sized avatar
❤️
Incredible-GMod.ru

Beelzebub Be1zebub

❤️
Incredible-GMod.ru
View GitHub Profile
@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)
@Be1zebub
Be1zebub / flaticon_dark_theme.js
Last active November 20, 2024 02:43
Ugly dark theme for flaticon.com - im too lazy to make better styles
// https://gist.github.com/Be1zebub/8e525de39d81b7a2bdb672dd8b7df10d
// tampermonkey userscript
// https://www.tampermonkey.net/
// ==UserScript==
// @name Ugly dark theme for flaticon.com
// @namespace https://www.flaticon.com/
// @version 0.1
// @description Ugly - but better than nothing, at least now i dont get flashbang. im too lazy to make better styles.
// @author https://t.me/be1zebub
@Be1zebub
Be1zebub / size_finder.lua
Created October 3, 2024 09:45
Утилита для поиска целочисленного размера изображения, на вход подается близкая к желаемой ширина и соотношение сторон.
local target_width = 180
local aspect_ratio = 16 / 9
local bounds = 32
local function calc(w)
local h = w / aspect_ratio
if math.floor(h) == h then
print(w ..", ".. h)
return true
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-08-30T14:11:19+00:00",
"name": "nodejs minimal",
"author": "[email protected]",
"description": "a generic egg for nodejs",
@Be1zebub
Be1zebub / ffi-terminal-size.lua
Created July 18, 2024 21:56
Функция для получения размера терминала. Я использую её для создания cli-ui
local ffi = require("ffi")
local terminalSize
if package.config:sub(1, 1) == "\\" then -- windows
local kernel32 = ffi.load("kernel32")
ffi.cdef([[
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
uint16_t dwSizeX;
uint16_t dwSizeY;
uint16_t dwCursorPositionX;
@Be1zebub
Be1zebub / joy-cursor.lua
Created June 23, 2024 14:53
не ищите в этом смысла, я просто веселился
local traceRainbowSpeed = 360 / 2
local traceLength = 360 / 4
local trace = {}
local prevX, prevY = input.GetCursorPos()
local function DrawTrace()
local x, y = input.GetCursorPos()
do
local dx = x - prevX
-- unfinished markdown parser & renderer
local markdown = {}
do
local markdown_rules = {
{
"%*%*%*(.-)%*%*%*", "bolditalic", 3
},
{