Skip to content

Instantly share code, notes, and snippets.


  • Posadas, Misiones, Argentina
Block or report user

Report or block fakuivan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fakuivan /
Created Feb 11, 2020
jq based bash script used to configure zerotier's rule engine via the controller API
#!/usr/bin/env bash
run_on_ztncui () {
(source ~/containers/ && ztncui-compose exec -T ztncui bash -c "$1"); return $?
NETWORKS="$(run_on_ztncui 'curl -s -X GET --header "X-ZT1-Auth: $ZT_TOKEN" "$ZT_ADDR"/controller/network')"
for rules_file in ./rules/*.ztrules; do
nwid="$(python3 -c "import pathlib, sys; print(pathlib.Path(sys.argv[1]).stem)" "$rules_file")" &&
fakuivan /
Last active Oct 11, 2019
Simple CSV parser function and example plotter program compatible with _some_ RIGOL oscilloscopes
#!/usr/bin/env python3
from oscilloscope import parse_csv_export, ParsedCSV
import argparse
from io import TextIOWrapper
import matplotlib.pyplot as plt
def main():
parser = argparse.ArgumentParser(description="Example plotter")
parser.add_argument("infile", type=argparse.FileType('r'))
#!/usr/bin/env bash
# Returns an eval-safe representation of the bash function that when evaluated prints its name,
# useful when redefining functions
function_copy_rnd () {
local rand_prefix="$(head /dev/urandom | tr -dc A-Za-z | head -c 8)_"
local name="$1"
local decl;
decl="$(declare -f "$name")" || return $?
echo "${rand_prefix}${decl}; echo $(printf "%q" "${rand_prefix}${name}")"
fakuivan / dishonored2_internal-swap-licenses.ct
Last active Aug 1, 2019
Swaps licenses for the dev version of dishonored 2
View dishonored2_internal-swap-licenses.ct
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="27">
<Description>"Havok license bypasses"</Description>
<LastState Value="" RealAddress="00000000"/>
View recursive.cpp
#include <iostream>
int factorial(int);
int fibonacci(int);
int sum_of_terms(int);
int main() {
int n;
std::cout << "n: ";
std::cin >> n;
fakuivan /
Last active Sep 29, 2019
HP Prime CAS "programs" I made to solve multivariable calculus, statistics and physics 2 exercises


These are scripts I use to serialize some of the practice exercises we get on multivariable calculus, statistics and physics 2 class, they are not meant to be easy to understand or a tutorial on how to write CAS programs on the HP Prime graphing calculator but rather a set of solutions I was able to come up with, for some a valuable resource nonetheless.

Calculus 2

Multivariable Taylor series

View changes.patch
diff --git a/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h b/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h
index bc8e206..b44950a 100644
--- a/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h
+++ b/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h
@@ -30,8 +30,8 @@
namespace IGCS::GameSpecific
// Mandatory constants to define for a game
- #define GAME_NAME "Dishonored 2, v1.77+"
- #define CAMERA_VERSION "1.0.0"
fakuivan / dishonored2_cvars.txt
Last active Apr 1, 2019
All cvars for Dishonored 2 as of version ````, in the format: <cvar struct address> | <cvar name> = <cvar default value> | <cvar int value address> -> <current int value>\n<cvar description>
View dishonored2_cvars.txt
Dishonored2.exe+3BFC7F0 | aas_subdivisionSize = 64 | Dishonored2.exe+3BFC818 -> 64
the size of subdivisions to use for debug drawing
Dishonored2.exe+340CC20 | achievements_Verbose = 0 | Dishonored2.exe+340CC48 -> 0
debug spam for achievements
Dishonored2.exe+3BFA570 | ai_debugCam = 0 | Dishonored2.exe+3BFA598 -> 0
enable debug camera
Dishonored2.exe+3BFA470 | ai_debugScript = -1 | Dishonored2.exe+3BFA498 -> 4294967295
fakuivan / command_extract_rip_relative_address.lua
Created Jan 11, 2019
Cheat engine lua script that creates an auto assembler command used to extract and make absolute a RIP-relative address in an instruction
View command_extract_rip_relative_address.lua
-- Reads a RIP-relative address from an instruction
-- All parameters should be integers
function extractRIPRelativeAddress(address, offset, offset_size)
address = getAddressSafe(address)
if address == nil then return nil end
local instruction_size = getInstructionSize(address)
if instruction_size == nil then return nil end
readOffset = ({
[1] = function(address_) return readBytes(address_, 1, false) end,
fakuivan / struct_tree_walker.lua
Last active Jan 9, 2019
Use Cheat Engine's LUA engine to walk a struct to find offsets that match a given value and recursively walk potential structure pointers found within
View struct_tree_walker.lua
function scanTree(address, maxOffset, comparator, structValidator, maxDepth)
local offsetTree = {}
address = getAddress(address)
for currentOffset = 0, maxOffset, 1 do
local currentAddress = address + currentOffset
if comparator(currentAddress) then
offsetTree[currentOffset] = true
if maxDepth > 0 then
local nextNode = readPointer(currentAddress)
You can’t perform that action at this time.