This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local string = require("string") | |
local pathlib = require("pl.path") | |
local filelib = require("pl.file") | |
local function split(str, sep) | |
local ret = {} | |
local last_sep = 1 | |
for i = 1, #str do | |
if string.byte(str, i, i) == string.byte(sep) then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimpleVersion(): | |
def __init__(self, major, minor, patch): | |
self.major = major | |
self.minor = minor | |
self.patch = patch | |
@classmethod | |
def fromstring(c, version_str): | |
split = [int(x or "0") for x in version_str.split(".")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import cfscrape # install with `pip install cfscrape` | |
import re | |
import os | |
import json | |
from packaging.version import Version | |
def build_multimc_patch_json(mc_version, optifine_version): | |
patch = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local _sep_chars, sep_chars = { | |
" ", "-", "\t" | |
}, {} | |
for _, c in pairs(_sep_chars) do | |
sep_chars[string.byte(c)] = true | |
end | |
local function wrap_text(text, width) | |
if surface.GetTextSize(text) <= width then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- A net interface that doesn't write to the game's net buffer | |
-- until Send* is called. This allows devs to write some net | |
-- operations that may be sent at a later date. | |
local net = net | |
local unpack = unpack or table.unpack | |
local NETBUFFER = {} | |
NETBUFFER.__index = NETBUFFER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local SET = {} | |
if gmod then debug.getregistry().Set = SET end | |
function SET:Add(item) | |
self._data[item] = true | |
end | |
function SET:Remove(item) | |
self._data[item] = nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Steam Inventory Float Value Displayer | |
// @description Displays the exact wear 'float value' of CS:GO items in Steam inventories. | |
// @namespace zerf | |
// @include http://steamcommunity.com/id/*/inventory* | |
// @include http://steamcommunity.com/profiles/*/inventory* | |
// @include https://steamcommunity.com/id/*/inventory* | |
// @include https://steamcommunity.com/profiles/*/inventory* | |
// @version 1.1 | |
// @grant GM_xmlhttpRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Facepunch GLua Wiki Tokenizer | |
// @namespace zerf | |
// @description Get the power of the GLua Wiki Tokenizer in your Facepunch [lua] tags! | |
// @version 1.5 | |
// @include https://facepunch.com/showthread.php* | |
// @downloadURL https://gist.github.com/bmwalters/6d4cc5499378711de0f46028e565cc8d/raw/master/Facepunch_GLua_Wiki_Tokenizer.user.js | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js | |
// @run-at document-start | |
// @grant GM_xmlhttpRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("superfuncs") | |
-- example_variables | |
local function has_variables() | |
self.call = self.call + 1 | |
print("congratulations! you are has_variables caller number", self.call) | |
end | |
has_variables = f(has_variables) | |
has_variables.call = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Rotato Potato | |
// @namespace zerf | |
// @description Yep | |
// @include * | |
// @version 1.3 | |
// @downloadURL https://gist.github.com/zerfgog/3695d12eac2061f6e29930d7c4fb91ff/raw/master/rotatopotato.user.js | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js | |
// ==/UserScript== |