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 luajit | |
local argparse = require("argparse")() | |
argparse:argument("input_path") | |
argparse:argument("output_path", nil, "-") | |
argparse:mutex( | |
argparse:option("--password"), | |
argparse:option("--key") | |
) | |
local arguments = argparse:parse() |
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 luajit | |
local argparse = require("argparse") -- https://github.com/luarocks/argparse | |
argparse = argparse(nil, "Decrypt and/or decompress a gluapack file.") | |
argparse:argument("file", "Path to file to read from, or \"-\" for standard input. Should be in \"garrysmod/download/data/gluapack/\".") | |
argparse:argument("key", "Value of \"gluapack_key\" console variable.") | |
argparse:option("--md5", "Value of \"gluapack_md5\" console variable.") | |
argparse:option("--output", "Path to file to write to, or \"-\" for standard output.", "-") | |
argparse:option("--output-at", "Which stage of processing to stop at before outputting.", "decompressed"):choices({ | |
"decrypted", | |
"skipped", |
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
// informed by https://github.com/tmp64/BugfixedHL-Rebased/blob/7538c9ea954133e6c4dd1ca31ed8579861bace54/src/game/client/voice_banmgr.cpp#L15 | |
#include <std/mem.pat> | |
#include <std/string.pat> | |
#include <std/sys.pat> | |
#pragma endian little | |
struct ban_t { | |
char community_id[32]; | |
// https://developer.valvesoftware.com/wiki/SteamID#Steam_ID_as_a_Steam_Community_ID | |
// consists of "[U:1:", some digits, "]", then null bytes pad the rest. | |
}; |
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
// Usage: | |
// 1. Save this file to "tf/cfg/x_mwm.cfg". | |
// 2. Add line "exec x_mwm" to "tf/cfg/autoexec.cfg". | |
// Scroll up to shift up a gear. | |
// Scroll down to shift down a gear. | |
// Gear range is 1 to 3. Default gear is 2. | |
// Gear 1 moves forward. | |
// Gear 2 stands still. | |
// Gear 3 moves backward. | |
// Assumes WASD. W and S behave as normal and additionally set gear to 2. |
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 luajit | |
local argparse = require("argparse")(nil, [[Create a Picotron .p64.rom. | |
Dependencies: | |
sudo apt install liblz4-1 luajit luarocks | |
luarocks install luaposix --local]]) | |
argparse:argument("input_path", "Directory to read files from.") | |
argparse:argument("output_path", "Path to save .p64.rom to.") | |
local arguments = argparse:parse() | |
local input_path = arguments.input_path | |
local output_path = arguments.output_path |
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
--[[ | |
This file provides a library for bitwise operations. It is intended to | |
be compatible with Lua BitOp which itself is intended to be compatible | |
with the "bit" library bundled with LuaJIT. It is *not* compatible with | |
the "bit32" library bundled with Lua 5.2 and higher. For usage, consult | |
the Lua BitOp documentation: | |
https://bitop.luajit.org/api.html | |
https://bitop.luajit.org/semantics.html | |
]] | |
local string_format = string.format |
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 luajit | |
local argparse = require("argparse") -- https://github.com/mpeterv/argparse | |
local parser = argparse("./tdetool2.lua", "Decrypt and reencrypt Teardown's \".tde\" files.") | |
parser:argument("input", "Input file(s)."):args("+") | |
parser:option("-o --output", "Output file.") | |
parser:option("--working-directory"):hidden(true) | |
local args = parser:parse() | |
if #args.input > 1 and args.output ~= nil then | |
parser:error("cannot use output option with more than one input argument") | |
end |
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
#define NULL ((void*) 0) | |
__declspec(dllexport) int hydra5_client_connect_developer(void* _1, void* _2) { | |
return 1; | |
} | |
__declspec(dllexport) int hydra5_client_connect_steam(void* _1, void* _2) { | |
return 1; | |
} | |
__declspec(dllexport) void* hydra5_client_create(void* _1) { | |
return NULL; | |
} |
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 identifier = "x_freecam" | |
local self = _G[identifier] | |
local function unload() | |
local hook_tbl = self.hook_tbl | |
if hook_tbl ~= nil then | |
for hook_name, hook_name_tbl in pairs(hook_tbl) do | |
for hook_id, func in pairs(hook_name_tbl) do | |
hook.Remove(hook_name, hook_id) | |
end | |
end |
NewerOlder