Skip to content

Instantly share code, notes, and snippets.

View arbruijn's full-sized avatar

Arne de Bruijn arbruijn

View GitHub Profile
diff --git a/src/3rdparty/webkit/Source/WebKit.pro b/src/3rdparty/webkit/Source/WebKit.pro
index 9be0f4a..abbccf7 100644
--- a/src/3rdparty/webkit/Source/WebKit.pro
+++ b/src/3rdparty/webkit/Source/WebKit.pro
@@ -3,14 +3,8 @@ CONFIG += ordered
include(WebKit.pri)
-!v8 {
- exists($$PWD/JavaScriptCore/JavaScriptCore.pro): SUBDIRS += JavaScriptCore/JavaScriptCore.pro
#!/usr/bin/perl -p0777
# Usage: coff-to-djgpp.pl < windows-coff.o > djgpp-coff.o
#
# renames .rdata section to .text, changes relative relocation format
# get coff header
my($magic, $nsec, $tim, $sym, $nsym, $optsz) = unpack("vvVVVv", $_);
# loop over all sections
for ($i = 0; $i < $nsec; $i++) {
$ofs = 20 + $optsz + $i * 40;
@arbruijn
arbruijn / fix_indirect_stdcall.patch
Created September 29, 2020 10:28
fix_indirect_stdcall.patch
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc
index b6fc42db8..45244b4da 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc
@@ -1206,8 +1206,16 @@ int4 ActionDeindirect::apply(Funcdata &data)
if (!fc->isInputLocked()) {
// We use isInputLocked as a test of whether the
// function pointer prototype has been applied before
+ int extraPopWasUnknown = fc->getExtraPop() == ProtoModel::extrapop_unknown;
fc->forceSet(data,*fp);
@arbruijn
arbruijn / watcom9-gs-patch.sh
Last active March 14, 2021 11:49
Patch out watcom 9 gs segment access to make it work in wine
perl -pe 's/\x31\x41\x0f\xb5\x45\x14\x8b\x55\xec\x01/\x31\x41\x90\x8b\x45\x14\x8b\x55\xec\x01/;s/\x1a\x47\x65\x88\x18\x40\x4e\x42\x41\xeb\xe0/\x1a\x47\x90\x88\x18\x40\x4e\x42\x41\xeb\xe0/;s/\x59\xff\xff\xff\x8e\x6d\x18\x03\x7d\x14\x31\xc0\x65\xc6\x07\x00/\x59\xff\xff\xff\x90\x90\x90\x03\x7d\x14\x31\xc0\x90\xc6\x07\x00/'
@arbruijn
arbruijn / lxexe.ksy
Created April 24, 2021 11:17
LX/LE exe file format for Kaitai Struct
meta:
id: lxexe
title: LX_executable
endian: le
file-extension:
- exe
- vxd
license: CC0-1.0
doc: |
The LX/LE executable file format is used by OS/2, the DOS/4G DOS extender and Windows VxD drivers.
@arbruijn
arbruijn / dualheadsdl.c
Last active October 15, 2021 17:57
Dual Head fbdev SDL hack
// Access both /dev/fb0 and /dev/fb1 with SDL
// Uses dlmopen to load a separate libSDL in another dynamic loader namespace
#define _GNU_SOURCE
#include <dlfcn.h>
#include <SDL/SDL.h>
typedef int (*SDL_Init_t)(Uint32);
typedef SDL_Surface *(*SDL_SetVideoMode_t)(int, int, int, Uint32);
typedef int (*SDL_Flip_t)(SDL_Surface *);
typedef void (*SDL_Quit_t)(void);
@arbruijn
arbruijn / install-python2-scons.sh
Last active December 12, 2021 20:17
install python2 scons
PYTHONIOENCODING=UTF-8 python2 -mensurepip
pip install scons

(copied from https://etherpad.gnome.org/p/hHCbgC0w4P4ZrSDiaoGB)

USB Audio on PP/PPP

Why?

  • Because USB Audio supports Bluetooth devices (and anything other, like USB-OTG, etc.)
  • Because USB Audio supports audio filters (like echo cancellation)
  • Because USB Audio supports call recording
  • Because you will experience less clicks
@arbruijn
arbruijn / make_portable.sh
Created October 12, 2022 13:22 — forked from Birch-san/make_portable.sh
Make a macOS executable binary or .dylib portable
#!/usr/bin/env bash
# Licensed by author Alex Birch under CC BY-SA 4.0
# https://creativecommons.org/licenses/by-sa/4.0/
# Example input:
# ./make_portable.sh mycoolbinary
# where mycoolbinary is a mach-o object file
# (for example an executable binary or a .dylib)
#