Skip to content

Instantly share code, notes, and snippets.

@DevAX1T
DevAX1T / Lua51AllOpcodeCases.lua
Created January 10, 2025 01:54 — forked from TheGreatSageEqualToHeaven/Lua51AllOpcodeCases.lua
Lua 5.1 Opcode Case Test File
-- load
local math = math -- GETGLOBAL
local newproxy = newproxy -- GETGLOBAL
local ipairs = ipairs -- GETGLOBAL
local floor = math.floor -- GETTABLE KST(C)
local pi = math.pi -- GETTABLE KST(C)
local _nil = nil -- LOADNIL B -> C (1)
local _true = true -- LOADBOOL B(1)
local _false = false -- LOADBOOL B(0)
@GTANAdam
GTANAdam / Precompiled Headers Linux (Visual Studio 2019)
Last active February 9, 2023 13:25
Using Precompiled headers for Linux (WSL) development in Visual Studio
Precompiled headers basically improve build times by reducing the amount of code compiling each time a build
command is invoked.
This feature is available in Visual Studio for Windows C/C++ development
via project "Properties" -> "C/C++" -> "Precompiled Headers",
but this feature is missing for Linux C/C++ Development (Visual Studio) and
requires a workaround since GCC/Clang support pch.
The workaround:
- Creating a "precompile.sh" bash script and appending the content above.
- Set in your project's properties in "Properties" -> "Build Events" -> "WSL Pre-Build Event", the following:
@iMoD1998
iMoD1998 / FixGPLR.py
Last active November 29, 2025 13:10
FixGPLR - Xbox 360 GPLR remover for IDA decompiler
import idautils
import ida_bytes
import ida_funcs
import ida_ida
import ida_kernwin
import ida_search
import ida_idp
import idaapi
import idc
import pprint
@xupengzhuo
xupengzhuo / pipe.py
Last active February 8, 2025 08:03
transfer pickle using pipe
##########
#parent.py
##########
import subprocess
import pickle
process = subprocess.Popen(
['python', 'child.py'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
bufsize=0
@AgentOak
AgentOak / youtube_formats.md
Last active November 10, 2025 02:34
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@xPaw
xPaw / steam_quick_queue.user.js
Last active October 12, 2025 04:37
⚠ This script has been integrated into SteamDB browser extension!
// ==UserScript==
// @name Steam Queue Auto Discoverer
// @description Discover the Steam queue three times to get the sale cards
// @version 2.3.0
// @namespace https://gist.github.com/xPaw/73f8ae2031b4e528abf7
// @icon https://store.steampowered.com/favicon.ico
// @match https://store.steampowered.com/explore*
// @grant none
// ==/UserScript==
@YellowAfterlife
YellowAfterlife / pallete.cpp
Created May 19, 2013 18:43
Outputs a "pallete" of colors achievable via WinAPI SetConsoleTextAttribute
/// Outputs a "pallete" of colors achievable via WinAPI SetConsoleTextAttribute
/// Full article:
/// http://ru.yal.cc/cpp-colored-text-via-winapi/ (Russian)
/// http://yal.cc/cpp-colored-text-via-winapi/ (English)
#include <stdio.h>
#include <Windows.h>
int main(int argc, char* argv[]) {
// foreground and background flags:
int fb[4] = { FOREGROUND_RED, FOREGROUND_GREEN, FOREGROUND_BLUE, FOREGROUND_INTENSITY };
int bb[4] = { BACKGROUND_RED, BACKGROUND_GREEN, BACKGROUND_BLUE, BACKGROUND_INTENSITY };
@dai-shi
dai-shi / benchmark-startswith.js
Created February 14, 2013 03:51
benchmark of String.startsWith equivalents in Node.js
var Benchmark = require('benchmark');
Benchmark.prototype.setup = function() {
a = ["test"];
for (var i = 0; i < 10000; i++) {
a.push("some other stuff");
}
s = a.join();
re1 = new RegExp("^test");
re2 = new RegExp("^not there");
};