Skip to content

Instantly share code, notes, and snippets.

@ariscop
ariscop / ifr.txt
Created Apr 17, 2021
Dell G5 SE IFR Dump
View ifr.txt
UEFI Protocol Detected
--------------------------------------------------------------------------------
String Packages
--------------------------------------------------------------------------------
Offset: Language:
--------------------------------------------------------------------------------
0x1395AC en-US (0x0)
0x13A3C2 fr-FR (0x1)
@ariscop
ariscop / blueprint-storage.py
Created Apr 4, 2021
Partially reads blueprint-storage.dat, the file appear to be completely auto generated and its a chore to reverse engineer
View blueprint-storage.py
#!/usr/bin/env python3
from pprint import pprint
from construct import *
class VersionStringAdapter(Adapter):
def _decode(self, obj, context, path):
return ".".join(map(str, obj))
Version = VersionStringAdapter(Int16ul[4])
@ariscop
ariscop / train_pathing_cost.gdb
Created Mar 4, 2021
awful gdb script to measure pathfinder cost by train in factorio
View train_pathing_cost.gdb
file factorio
set $train_id = (int)0
set $start = (unsigned long long)0
set $end = (unsigned long long)0
# for 1.1.26, linux build
break _ZN5Train11requestPathEPK4Rail13RailDirectionPK20InChainSignalSection
commands
@ariscop
ariscop / build.log
Created Feb 9, 2019
Building reactos with gcc 7.3
View build.log
[91/9712] Performing configure step for 'host-tools'
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler using: Ninja
@ariscop
ariscop / with_macro.c
Created Sep 27, 2018
with macro in c
View with_macro.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define with(_init, _fini) for(int _count = ((_init), 1); _count--; (_fini))
#define with_file(var, name, access) with(var = fopen(name, access), (var ? fclose(var) : 0 ))
void
test_macro(char *file)
View 0001-Reactos-changes.patch
From f114131ec986a3ff7f7668df1a31fb60daf980a6 Mon Sep 17 00:00:00 2001
From: Andrew Cook <ariscop@gmail.com>
Date: Sun, 11 Mar 2018 13:18:36 +1100
Subject: [PATCH] Reactos changes
---
Source/CMakeLists.txt | 12 ++
Source/CMakeVersionCompute.cmake | 1 +
Source/cmGeneratorTarget.h | 5 +-
Source/cmGlobalNinjaGenerator.cxx | 24 ++-
View changes.patch
commit 09c06a2f457ec9557bcdf1809ecb4b50b2fb654a
Author: Amine Khaldi <amine.khaldi@reactos.org>
Date: Fri Oct 27 22:18:01 2017 +0100
[CLANG-CL] Initial commit that allows us to compile ReactOS with clang-cl.
diff --git a/sdk/cmake/Platform/Windows-MSVC.cmake b/sdk/cmake/Platform/Windows-MSVC.cmake
index dc09c7479f2..5c3912cfeab 100644
--- a/sdk/cmake/Platform/Windows-MSVC.cmake
+++ b/sdk/cmake/Platform/Windows-MSVC.cmake
@ariscop
ariscop / script
Created Oct 2, 2015
Gdb script for logging backtraces when a function is called
View script
set pagination off
set logging file gdb.txt
set logging on
break sendto_realops_snomask
commands
bt full
c
end
@ariscop
ariscop / notes.txt
Created Sep 26, 2015
Notes from my attempts to RE myobs file format
View notes.txt
Header, 0x80/0x800 long?
first record starts at 0x800
NOT alligned (some things are 2 byte aligned)
From the upgrade guide:
0 - no record header
10 - variable length record header
18 - superfile record header
22 - resource record header