Skip to content

Instantly share code, notes, and snippets.

% BibTeX standard bibliography style `unsrt'
% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
% Copyright (C) 1985, all rights reserved.
% Copying of this file is authorized only if either
% (1) you make absolutely no changes to your copy, including name, or
% (2) if you do make changes, you name it something other than
% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
% This restriction helps ensure that all standard styles are identical.
% The file btxbst.doc has the documentation for this style.
_filedir_xspec()
{
local cur prev words cword
_init_completion || return
_tilde "$cur" || return
local IFS=$'\n' xspec=${_xspecs[${1##*/}]} tmp
local -a toks
local newest=0
@compholio
compholio / git-wchar-grep
Created April 1, 2019 14:00
git grep for WCHAR strings
#!/bin/bash
PATTERN="$1"
NEW_GREP="";
for (( i=0; i<${#PATTERN}; i++ )); do
if [ "${i}" -ne "0" ]; then
NEW_GREP="${NEW_GREP},"
fi
NEW_GREP="${NEW_GREP}'${PATTERN:$i:1}'"
done
@compholio
compholio / gist:c7a7a774bf888d1467ad
Created June 9, 2015 21:36
Update struct on memory read
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/ptrace.h>
struct region
@compholio
compholio / gist:749bbec6ff1b4d096bc1
Last active August 29, 2015 14:16
winex11: Return the actual refresh rate for NVIDIA cards with Dynamic TwinView enabled.
From 5b9a41a5cfd0297b5fc1a226d37693a9dec34625 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Tue, 3 Mar 2015 10:33:38 -0700
Subject: winex11: Return the actual refresh rate for NVIDIA cards with Dynamic
TwinView enabled.
---
dlls/winex11.drv/xrandr.c | 53 ++++++++++++++++++++++++++++++++++-------------
1 file changed, 39 insertions(+), 14 deletions(-)
@compholio
compholio / gist:c26ad151f1e3b5990dfb
Created March 3, 2015 18:50
winex11: Display a helpful warning when Dynamic TwinView is enabled.
From 04bd31c1830e1b9c1b5ab3afebd44cdd3807101d Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Mon, 2 Mar 2015 23:18:10 -0700
Subject: winex11: Display a helpful warning when Dynamic TwinView is enabled.
---
configure.ac | 20 +++++++++++++++++++-
dlls/winex11.drv/xrandr.c | 22 ++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletion(-)
@compholio
compholio / gist:6c7274314ae4cade3cb7
Created March 2, 2015 18:01
strmbase: Fix MediaSeekingPassThru_GetPositions return when the pins are unconnected.
From 7f801adb195ca665ee1caa3453bc76326dc759cd Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Mon, 2 Mar 2015 11:01:22 -0700
Subject: strmbase: Fix MediaSeekingPassThru_GetPositions return when the pins are
unconnected.
---
dlls/strmbase/pospass.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
@compholio
compholio / gist:f54120f4b304a730c98f
Created February 3, 2015 09:15
Grim Remastered Font Hack
diff --git a/engines/grim/lua_v1.cpp b/engines/grim/lua_v1.cpp
index 01f302e..a507a0b 100644
--- a/engines/grim/lua_v1.cpp
+++ b/engines/grim/lua_v1.cpp
@@ -696,6 +696,9 @@ void Lua_V1::LockFont() {
lua_Object param1 = lua_getparam(1);
if (lua_isstring(param1)) {
const char *fontName = lua_getstring(param1);
+if(!strcmp(fontName, "koloss52.laf") || !strcmp(fontName, "koloss69.laf") || !strcmp(fontName, "koloss100.laf") || !strcmp(fontName, "meredith38.laf") || !strcmp(fontName, "meredith46.laf")) {
+fontName = "treb13bs.laf";
From 6901671908f0f95b6e262943de7c8fb8bcdbdca1 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Tue, 27 Jan 2015 15:02:21 -0700
Subject: lstat hack
---
dlls/ntdll/file.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
@compholio
compholio / gist:7e06399cd021b3880698
Last active August 29, 2015 14:14
wined3d: Normalize the bitdepth scale rather than the constant.
From bd0e4c89c74dd5b791e7e382321b69bfa5b57b0a Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Mon, 26 Jan 2015 19:31:24 -0700
Subject: wined3d: Normalize the bitdepth scale rather than the constant.
---
dlls/wined3d/state.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c