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
/* div0.c -- Recover from a division by zero. | |
** References: | |
** https://learn.microsoft.com/en-us/cpp/cpp/writing-an-exception-filter | |
** http://ref.x86asm.net/coder64.html | |
** https://www.felixcloutier.com/x86/idiv | |
** AMD64 Architecture Programmer's Manual Volume 3 | |
** Intel Architectures Software Developer's Manual Volume 2 | |
** https://web.archive.org/web/20110304144303/http://www.microsoft.com/msj/0898/bugslayer0898.aspx | |
*/ |
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
## | |
## Generate a list of 256 cryptographically random u64 numbers, arranged in a 64x4 grid. | |
## | |
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create() | |
$bytes = new-object byte[] 8 | |
1..64 |% { $n = (1..4) |% { $rng.GetBytes($b); "0x{0:X16}ull," -f [BitConverter]::ToUint64($b,0) }; $n -join "" } |
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
-- | |
-- Pseudo-random distribution constant calculator. | |
-- | |
-- The constants are calculated by numerically approximating the roots of | |
-- the function f(p) = p - p(c) via Newton-Raphson / bisection. | |
-- Calculating p(c) is easy: evaluate a polynomial and invert it. | |
-- | |
-- For an explanation and visualization of the PRD algorithm, please see | |
-- https://observablehq.com/@manuelblanc/pseudo-random-distribution | |
-- |
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
## | |
## PowerShell script to remove all equipped challenge tokens. | |
## (2023-04-19) Donated to the public domain | |
## Method credit: https://www.reddit.com/r/leagueoflegends/comments/w91xqk/comment/iip126n/ | |
## | |
# Obtain the port & auth code of the LCU local server. | |
$command_line = (Get-WmiObject Win32_Process -Filter "name = 'LeagueClientUx.exe'").CommandLine | |
$command_line -match '--remoting-auth-token=(\w+)' | |
$LOL_AUTH = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("riot:$($matches[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
commit 8f3872a422beafcc9fc4c4d36e7518be58fb6a8b | |
Author: ManuelBlanc <manuel.blanc@estudiante.uam.es> | |
Date: Mon Feb 27 06:59:29 2023 +0100 | |
Implement BC_TRAP and jit.util.setbreakpoint | |
diff --git a/src/lib_debug.c b/src/lib_debug.c | |
index 3af7a353..e02070f1 100644 | |
--- a/src/lib_debug.c | |
+++ b/src/lib_debug.c |
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
-- | |
-- ubmark.lua -- A collection of Lua microbenchmarks | |
-- Targeted at LuaJIT 2.1.0-beta3. | |
-- | |
-- References: | |
-- https://cr.yp.to/talks/2015.04.16/slides-djb-20150416-a4.pdf | |
-- https://github.com/google/caliper/wiki/JavaMicrobenchmarks | |
-- http://www.ellipticgroup.com/html/benchmarkingArticle.html | |
-- http://hugoduncan.org/criterium/ | |
-- http://www.serpentine.com/criterion/ |
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
-- [SERVER] The attack generation. | |
local _attack_gen = 0 | |
-- [SERVER] When the attack animation is initiated, also request an attack ACK. | |
mod:hook_safe(BTAttackAction, "enter", function(self, unit, bb, t) | |
if bb.action.unblockable then return end | |
local mob_id = Managers.state.unit_storage:go_id(unit) | |
local atk_id = _attack_gen | |
mod:network_send("request_attack_ack", mob_id, atk_id) | |
bb._csb_needs_ack, bb._csb_mob_id, bb._csb_atk_id = true, mob_id, atk_id |
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
"lang" | |
{ | |
"english" | |
{ | |
"tokens" | |
{ | |
"#State_Loading" "Loading..." | |
"#State_Inn" "Waiting at the Red Moon Inn" | |
"#State_Tutorial" "Playing the tutorial" | |
"#State_Menus" "In the menus" |
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 type, next, tostring = type, next, tostring | |
local byte, find, format, gsub, concat = string.byte, string.find, string.format, string.gsub, table.concat | |
local function ctlsub(c) | |
if c == "\t" then return "\\t" | |
elseif c == "\n" then return "\\n" | |
elseif c == "\r" then return "\\r" | |
else return byte(c) end | |
end | |
local function serialize_push(b, v, q) | |
local t = type(v) |
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
--[[ | |
MurmurHash2, 64-bit versions, by Austin Appleby and placed in the public domain. | |
The same caveats as 32-bit MurmurHash2 apply here - beware of alignment | |
and endian-ness issues if used across multiple platforms. | |
Ported to Lua by ManuelBlanc (https://github.com/manuelblanc/). | |
Requires a 64-bit bitwise operations library. Eg, https://github.com/ManuelBlanc/lua-bit64 | |
--]] | |
local ffi = require("ffi") |
NewerOlder