Skip to content

Instantly share code, notes, and snippets.

View SwadicalRag's full-sized avatar
👨‍⚕️
working :)

swadical SwadicalRag

👨‍⚕️
working :)
View GitHub Profile
function net.InlineMessage(id,fn)
local thread = coroutine.create(fn)
coroutine.resume(thread)
net.Receive(id,function(...)
if coroutine.status(thread) == "suspended" then
coroutine.resume(thread,...)
end
end)
end
@SwadicalRag
SwadicalRag / Quotes.md
Last active January 12, 2024 19:07
John Lua - In Memoriam

#The Wisdoms of John Lua

“An error doesn't become a mistake until you refuse to correct it.” - John Lua

“In the beginning was the Statement, and the Statement was with Lua, and the Statement was Lua.” - John Lua

“Lua was the answer to my prayers.” - John Lua

@SwadicalRag
SwadicalRag / gist:a3a9b29b88229384046d
Created January 19, 2016 04:23
720p ASCII mandelbrot
This file has been truncated, but you can view the full file.
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░▒▒▒▒▒▒▒▓▓▓▓░░░░░░▒▒▓▓▒▓▒░▒▒▒░░▓▒▒░░░░░░▒▒▒▓▓▓▓▓░░░░░▒▒░░▓▒░░░▓▒▒░░░░░░░▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
@SwadicalRag
SwadicalRag / A E S T H E T I C 2.js
Created March 9, 2016 23:35
rainbow navbar on FLO and Student Admin
// ==UserScript==
// @name A E S T H E T I C 2
// @namespace https?://stuadmin.flinders.edu.au/*
// @version 1
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none
// ==/UserScript==
waitForKeyElements("#divBanner",function() {
var clk = 0;
@SwadicalRag
SwadicalRag / repoloader.lua
Last active May 14, 2023 23:30
Load gmod addons from github repositories
local function FetchSync(url)
local this = coroutine.running()
http.Fetch(url,function(...)
local suc,err = coroutine.resume(this,...)
if not suc then error(err) end
end,function(...)
-- local suc,err = coroutine.resume(this,...)
-- if not suc then error(err) end
end)
INLINE_EXTERNAL_UNSANDBOXED(function() OUT = true hook.Remove("InternalText","d_s_relay") SandboxProtector.isInitialising = true end) hook.Remove("ChatMessage","relay") INLINE_EXTERNAL_UNSANDBOXED(function() SandboxProtector.isInitialising = false end)
@name EGPE2Finder
@inputs EGP:wirelink E2:array
@persist
if(first()|dupefinished()){
EGP:egpBox(hash("base"),vec2(255,255),vec2(475,475))
EGP:egpColor(hash("base"),vec(100,100,100))
}
interval(100)
if(findCanQuery()) {
@SwadicalRag
SwadicalRag / keybase.md
Created February 25, 2017 00:39
keybase.md

Keybase proof

I hereby claim:

  • I am swadicalrag on github.
  • I am swadicalrag (https://keybase.io/swadicalrag) on keybase.
  • I have a public key whose fingerprint is 285E 50AF 9AB6 D9A5 646C B9FE 2134 FD0C 8FA7 1EF6

To claim this, I am signing this object:

@SwadicalRag
SwadicalRag / varg.lua
Last active March 2, 2017 13:18
simple vararg lib
local unpack = unpack or table.unpack
local select = select
local varg_internal_meta = {}
local varg = setmetatable({},varg_internal_meta)
varg.meta = {}
varg.meta.__index = varg.meta
function varg.meta:Unpack(from,to)
@SwadicalRag
SwadicalRag / poll.lua
Last active March 26, 2017 05:26
Example code that uses nana2's rich message api
function cookie.poll(question,options,time)
assert(#options > 1,"Need more than 1 option!")
assert(#options <= 9,"No more than 9 options!")
time = time or 15
local emoteMap = {
["1"] = "one",
["2"] = "two",
["3"] = "three",