This file contains 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
cookie.maymays.leetwords = {destroyed = "rekt"} | |
cookie.maymays.leetpatts = {["(%w+)er"] = "%1or", ["hack(%w+%s)"] = "haxor%1"} | |
cookie.maymays.leetchars = {a = 4, ["4"] = "a", e = 3, ["3"] = "e", o = "0", ["0"] = "o", l = "1", ["1"] = "l", s = "5", ["5"] = "s", t = "7", ["7"] = "t"} | |
cookie.maymays.leet = function(inp) | |
inp = string.lower(inp) | |
for patt, replacement in pairs(cookie.maymays.leetpatts) do | |
inp = string.gsub(inp, patt, replacement) | |
end | |
for word, replacement in pairs(cookie.maymays.leetwords) do | |
inp = string.gsub(inp, " "..word.." ", " "..replacement.." ") |
This file contains 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
import random | |
class _Maybe(object): | |
def __nonzero__(self): | |
return bool(random.getrandbits(1)) | |
def __repr__(self): | |
return repr(self.__nonzero__()) | |
def __str__(self): |
This file contains 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 template_start = [[ | |
LISTEN TO ME VERY CAREFULLY %s | |
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE key | |
GIVE THESE PEOPLE AIR | |
HEY CHRISTMAS TREE val | |
YOU SET US UP 0 | |
HEY CHRISTMAS TREE isKeyEqualToOurCurrentValue | |
YOU SET US UP @I LIED |
This file contains 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 charset = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
function ToBase10(num, curbase) -- tonumber has a static charset, we might want to change it in the future so we roll our own | |
local out = 0 | |
num = tostring(num) | |
for i = 1, #num do -- this goes left to right | |
local cur = string.sub(num, i, i) | |
local val = string.find(charset, cur) | |
if not val then error("Number '" .. cur .. "' in base " .. curbase .. " not supported by charset '" .. charset .. "'") return end |
This file contains 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 function GetB1Count(sid, callback) | |
http.Fetch(string.format("http://steamcommunity.com/profiles/%d/inventory/json/753/6", sid), function(c, b) | |
if c ~= 200 then print("bad code", c) callback(false) return end | |
local data = json.decode(b) | |
if data and data.rgInventory then | |
local count = 0 | |
for _, info in pairs(data.rgInventory) do | |
if info and tonumber(info.classid) == 171857344 then | |
count = count + 1 |
This file contains 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
import requests | |
import re | |
pat_coolness = re.compile(r"<b>Universal Coolness Index</b></a> of <i>([\d\.]+?)%</i>") | |
pat_attribute = re.compile(r"<li>(.+?)[\.!].+?([\d\.]+?)\%") | |
pat_tags = re.compile(r"<[^>]+>") | |
def coolness_to_string(num): | |
if num >= 99: |
This file contains 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== |
This file contains 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 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 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 |
OlderNewer