Skip to content

Instantly share code, notes, and snippets.

@rfht
rfht / lwjgl3-build-openbsd.log
Created May 25, 2019 17:52
Build log of lwjgl3 patched for OpenBSD
Buildfile: /home/thfr/obsd/ports/lwjgl/lwjgl3/build.xml
clean:
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/core/src/generated
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/bullet/src/generated
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/bgfx/src/generated
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/assimp/src/generated
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/egl/src/generated
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/cuda/src/generated
[delete] Deleting directory /home/thfr/obsd/ports/lwjgl/lwjgl3/modules/lwjgl/glfw/src/generated
@rfht
rfht / patch-man_mono_1.diff
Created June 7, 2019 00:54
Add MONO_IGNORE_BAD_COMPARER to man page
diff --git a/man/mono.1 b/man/mono.1
index 37f786073c5..3aaaf145e35 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -1532,6 +1532,10 @@ unix). MONO_GAC_PREFIX should point to the top directory of a prefixed
install. Or to the directory provided in the gacutil /gacdir command. Example:
.B /home/username/.mono:/usr/local/mono/
.TP
+\fBMONO_IGNORE_BAD_COMPARER\fR
+When set, ignores bad IComparer implementation instead of throwing an error.
@rfht
rfht / csharp.log
Created June 25, 2019 16:02
Ubuntu mono Directory.GetFiles() / Path.GetFullPath() bug
thfr@thfr-MS-7B79:~/.steam/steam/steamapps/common/Dead Pixels II$ uname -a
Linux thfr-MS-7B79 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
thfr@thfr-MS-7B79:~/.steam/steam/steamapps/common/Dead Pixels II$ pwd
/home/thfr/.steam/steam/steamapps/common/Dead Pixels II
thfr@thfr-MS-7B79:~/.steam/steam/steamapps/common/Dead Pixels II$ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> using System.IO;
csharp> Directory.GetFiles("Content/data/fonts");
@rfht
rfht / GetFullPathBugDemo.cs
Created June 25, 2019 16:43
Path.GetFullPath() bug demo
using System;
using System.IO;
class GetFullPathBugDemo
{
public static void Main(string[] args)
{
Console.WriteLine("Test with rooted path:");
Console.WriteLine(Path.GetFullPath(Directory.GetCurrentDirectory() + @"/test//test//test//"));
Console.WriteLine("Test with relative path:");
@rfht
rfht / GetFilesBugDemo.cs
Created June 25, 2019 16:58
Directory.GetFiles() bug demo
using System;
using System.IO;
public class GetFilesBugDemo
{
public static void Main(string[] args)
{
Directory.CreateDirectory("test/test");
File.Create("test/test/testfile");
Console.WriteLine("Test with rooted path:");
@rfht
rfht / devilutionX-clang-CRLF-file.diff
Last active June 29, 2019 06:31 — forked from brynet/devilutionX-clang.diff
devilutionX clang fixes
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56bf70f9..884ed0e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ if(NIGHTLY_BUILD)
set(FASTER ON)
endif()
-if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
+if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD OR ${CMAKE_SYSTEM_NAME} STREQUAL OpenBSD)
@rfht
rfht / .fvwm2rc
Created April 30, 2020 09:50
.fvwm2rc
# be sure to customize these paths for your installation:
ModulePath /usr/local/libexec/fvwm/2.6.9
# PixmapPath and IconPath are deprecated. Use ImagePath instead
ImagePath /usr/local/share/pixmaps/fvwm
Colorset 23 Transparent, fg rgb:ff/ff/c4, bg darkgray # not working with base fvwm
Colorset 41 RootTransparent buffer, fg white, bg average, \
Tint yellow 15, bgTint yellow 15 # tint is optional
Colorset 42 RootTransparent buffer, fg white, bg average, \
Tint gray 15, bgTint gray 15 # tint is optional
@rfht
rfht / compton.conf
Created April 30, 2020 09:52
compton.conf
backend = "xrender"; # glx (faster) or xrender
#################################
# GLX backend
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
glx-copy-from-front = false;
@rfht
rfht / compton.conf
Created April 30, 2020 09:52
compton.conf
backend = "xrender"; # glx (faster) or xrender
#################################
# GLX backend
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
glx-copy-from-front = false;
@rfht
rfht / tolower.sh
Last active June 18, 2020 13:47
turn all filenames in $PWD to lowercase recursively
#!/bin/sh
if [ -z "$1" ] ; then
WD=.
else
WD="$1"
fi
lower=
lowercase()
{