Skip to content

Instantly share code, notes, and snippets.

View Alf21's full-sized avatar
🎯
Focusing

Alf21

🎯
Focusing
View GitHub Profile
@meepen
meepen / non-powerof2-png-gmod.lua
Last active February 22, 2021 17:40
Loads non power of 2 PNG into a Garry's Mod texture without fucking over scaling.
local function wait_png(matstr)
local html = vgui.Create("DHTML")
html:AddFunction("console", "memeify", function()
html.done = true
end)
local mat = Material(matstr)
local rw, rh = mat:GetInt "$realwidth", mat:GetInt "$realheight"
local f = file.Open("materials/"..matstr, "rb", "GAME")
local cont = f:Read(f:Size())
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 7, 2024 14:54
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings