Skip to content

Instantly share code, notes, and snippets.

View LouisBrunner's full-sized avatar
🤖

Louis Brunner LouisBrunner

🤖
View GitHub Profile
@LouisBrunner
LouisBrunner / kernel_slide.d
Last active January 5, 2023 20:42
Calculate the macOS Kernel slide using DTrace
// Run using `dtrace -s ./kernel_slide.d -c ls`
// README:
// 1. You might need to run it twice to get your kernel version and the proc_ucred offset within kauth_cred_proc_ref.
// 2. Then fill up KauthCredProcRef and ProcUcredOffsetInKauthCredProcRef and run it again.
// 3. ???
// 4. Profit!
#pragma D option quiet
// Use nm -A /System/Library/Kernels/kernel.release.YOUR_VERSION
@LouisBrunner
LouisBrunner / region-dpts-France.py
Last active March 1, 2023 20:41 — forked from mlorant/region-dpts-France.py
Liste des régions et départements français (dict. Python)
REGIONS = {
'Auvergne-Rhône-Alpes': ['01', '03', '07', '15', '26', '38', '42', '43', '63', '69', '73', '74'],
'Bourgogne-Franche-Comté': ['21', '25', '39', '58', '70', '71', '89', '90'],
'Bretagne': ['35', '22', '56', '29'],
'Centre-Val de Loire': ['18', '28', '36', '37', '41', '45'],
'Corse': ['2A', '2B'],
'Grand Est': ['08', '10', '51', '52', '54', '55', '57', '67', '68', '88'],
'Guadeloupe': ['971'],
'Guyane': ['973'],
'Hauts-de-France': ['02', '59', '60', '62', '80'],
@LouisBrunner
LouisBrunner / CEGUI-0.8-Mac.diff
Last active December 23, 2015 12:12
Fix compilation under Mac for CEGUI 0.8
diff --git a/cmake/FindFreeImage.cmake b/cmake/FindFreeImage.cmake
--- a/cmake/FindFreeImage.cmake
+++ b/cmake/FindFreeImage.cmake
@@ -3,14 +3,25 @@
################################################################################
include(FindPackageHandleStandardArgs)
-find_path(FREEIMAGE_H_PATH NAMES FreeImage.h)
-find_library(FREEIMAGE_LIB NAMES freeimage libfreeimage FreeImage libFreeImage PATH_SUFFIXES dynamic)
-find_library(FREEIMAGE_LIB_DBG NAMES freeimaged libfreeimaged FreeImage_d libFreeImage_d PATH_SUFFIXES dynamic)
@LouisBrunner
LouisBrunner / Ogre-1.9-Mac.diff
Last active December 24, 2015 13:46
Fix compilation under Mac for Ogre 1.9
diff --git a/CMake/Packages/FindFreetype.cmake b/CMake/Packages/FindFreetype.cmake
--- a/CMake/Packages/FindFreetype.cmake
+++ b/CMake/Packages/FindFreetype.cmake
@@ -59,3 +59,5 @@
# Reset framework finding
set(CMAKE_FIND_FRAMEWORK "FIRST")
+
+set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_REL} ${FREETYPE_LIBRARY_DBG})
diff --git a/CMakeLists.txt b/CMakeLists.txt
@LouisBrunner
LouisBrunner / Add-mtime-in-mod_dav_svn.diff
Created November 18, 2015 14:22
Add a mtime value for files in mod_dav_svn (subversion 1.6.17)
Index: subversion/mod_dav_svn/repos.c
===================================================================
--- subversion/mod_dav_svn/repos.c (revision 1712076)
+++ subversion/mod_dav_svn/repos.c (working copy)
@@ -2758,7 +2758,7 @@
bytes"), but many browsers have grown to expect "text/plain"
to mean "*shrug*", and kick off their own MIME type detection
routines when they see it. So we'll use "text/plain".
-
+
@LouisBrunner
LouisBrunner / mupen64 Xbox360 Controller config
Last active April 17, 2023 02:53
Configuration for the Xbox360 controller to use with Nintendo 64 emulator mupen64
[Xbox 360 Wired Controller]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = "button(3)"
DPad L = "button(2)"
DPad D = "button(0)"
DPad U = "button(1)"
@LouisBrunner
LouisBrunner / fix-sbg6580.html
Last active August 29, 2015 14:18
Fix SBG6580 Wi-Fi issues
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fix SBG6580 Wifi Issues</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<style>
body {
@LouisBrunner
LouisBrunner / FindxUnitpp.cmake
Created February 9, 2015 08:06
CMake Find file for xUnit++ (C++ unit test framework)
include(FindPackageHandleStandardArgs)
set(ENV_XUNITPP_HOME $ENV{XUNITPP_HOME})
if (ENV_XUNITPP_HOME)
string(REGEX REPLACE "\\\\" "/" ENV_XUNITPP_HOME ${ENV_XUNITPP_HOME})
endif ()
set(XUNITPP_PREFIX_PATH
${XUNITPP_HOME} ${ENV_XUNITPP_HOME}
)
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
OLD_DIR=`pwd` && \
WDIR=~/sources/ && \
OPENSSL_VER=1.0.1h && \