Skip to content

Instantly share code, notes, and snippets.

View openglfreak's full-sized avatar

Torge Matthies openglfreak

View GitHub Profile
From 43389f82e96cc6b238602a9a2a351e392bbef800 Mon Sep 17 00:00:00 2001
From: Torge Matthies <openglfreak@googlemail.com>
Date: Sat, 2 Apr 2022 02:15:55 +0200
Subject: [PATCH] [Split] Implement CREATE_NO_WINDOW process creation flag.
---
dlls/kernelbase/console.c | 2 ++
dlls/kernelbase/process.c | 9 +++++----
dlls/ntdll/unix/loader.c | 2 ++
dlls/ntdll/unix/process.c | 4 ++--
From 43006f56c8ea2d5f3c450ece9a14fa42fb7d2c9a Mon Sep 17 00:00:00 2001
From: Torge Matthies <openglfreak@googlemail.com>
Date: Thu, 31 Mar 2022 10:53:43 +0200
Subject: [PATCH] kernelbase: Semi-stub CREATE_NO_WINDOW process creation flag.
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
---
dlls/kernelbase/process.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
w_try_mv()
{
mv_src="${*: -2:1}"
mv_dst="${*: -1:1}"
if [ "${mv_src^^}" != "${mv_dst^^}" ]; then
w_try mv "$@"
return
fi
static void test(void)
{
GLenum glerr;
bool has_error = false;
GLuint tex[2];
PFNGLXCOPYIMAGESUBDATANVPROC p_glXCopyImageSubDataNV;
#define check() \
while ((glerr = glGetError()) != GL_NO_ERROR) { \
has_error = true; \
@openglfreak
openglfreak / disable-sincos.patch
Created May 13, 2021 20:24
Fix for MinGW GCC 11.1 generating calls to sincos.
diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
index 0cec6b0..4fcf719 100644
--- a/gcc/config/i386/mingw-w64.h
+++ b/gcc/config/i386/mingw-w64.h
@@ -98,9 +98,3 @@ along with GCC; see the file COPYING3. If not see
%{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
" LINK_SPEC_LARGE_ADDR_AWARE "\
%(shared_libgcc_undefs)"
-
-/* Enable sincos optimization, overriding cygming.h. sincos, sincosf
@openglfreak
openglfreak / tablet-area.sh
Created August 27, 2020 07:03
A small shell script for setting the area of a tablet through xinput/libinput, and making the setting permanent in xfconf (XFCE).
#!/bin/sh
: <<'EOF'
Copyright © 2020 Torge Matthies <openglfreak@googlemail.com>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
EOF
### Settings ###
@openglfreak
openglfreak / fwaitm.py
Last active May 23, 2020 21:30
Python module for using Linux's futex() syscall, and in particular the FUTEX_WAIT_MULTIPLE operation.
#!/usr/bin/env python3
# Copyright (c) 2020 Torge Matthies
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
@openglfreak
openglfreak / efistubmgr.conf
Last active April 2, 2021 17:17
My own EFISTUB setup/update script - Development has moved to https://github.com/openglfreak/efistubmgr
VERBOSE=1
_cmdline_quiet='quiet vga=current loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3'
_cmdline_misc='rw splash add_efi_memmap threadirqs sysrq_always_enabled=1 systemd.unified_cgroup_hierarchy=1'
_cmdline_nospec='pti=off nopti spectre_v1=off nospectre_v1 spectre_v2=off nospectre_v2 spectre_v2_app2app=off nospectre_v2_app2app l1tf=off nol1tf kvm-intel.vmentry_l1d_flush=never spec_store_bypass_disable=off nospec_store_bypass_disable no_stf_barrier mitigations=off clearcpuid=514'
_cmdline_perf='nowatchdog nmi_watchdog=0 intel_iommu=igfx_off workqueue.power_efficient=0 intel_pstate=hwp_only libahci.ignore_sss=1 scsi_mod.use_blk_mq=1 cryptomgr.notests elevator=bfq noreplace-smp page_alloc.shuffle=1 rcupdate.rcu_expedited=1 skew_tick=1'
_cmdline_gfx='i915.fastboot=1 i915.modeset=1 i915.enable_fbc=0 i915.enable_guc=0 i915.alpha_support=1 i915.disable_power_well=1 i915.lvds_channel_mode=2 nouveau.modeset=0 nvidia-drm.modeset=1'
_cmdline_fixes='acpi_osi=Linux acpi_sleep=nonvs iomem=relaxed slab_c
@openglfreak
openglfreak / sed_escape_replacement.sh
Created January 31, 2019 11:58
Escape a string for use as/in a sed replacement.
# Escapes a string for use as/in a sed replacement
# https://stackoverflow.com/a/2705678
sed_escape_replacement() {
sed -e 's/[\/&]/\\&/g' -e 's/$/\\n/g' | tr -d '\n' | head -c -2
}
#!/bin/sh
:<<'EOF'
Copyright © 2018 Torge Matthies <openglfreak@googlemail.com>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
EOF
# Lists the UUIDs of installed Nvidia GPUs (including the leading "GPU-")
#