Skip to content

Instantly share code, notes, and snippets.

View martinjlowm's full-sized avatar
🌮
HACKERMAN

Martin Jesper Low Madsen martinjlowm

🌮
HACKERMAN
View GitHub Profile
This file has been truncated, but you can view the full file.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@martinjlowm
martinjlowm / recursive-search-replace-notion.js
Created June 30, 2023 08:39
Walks through a whole workspace and replaces `<search-term>` with `<replace-term>` for various text blocks
const { Client } = require("@notionhq/client");
const notion = new Client({
auth: process.env.NOTION_TOKEN,
});
const searchValue = "<search-term>";
const newValue = "<replace-term>";
(async () => {
@martinjlowm
martinjlowm / monofyRepo.sh
Created May 21, 2019 09:17
Migrate a repository to a mono repo
monofyRepo() {
repository=$(basename $PWD)
if [[ ! -d ".git" ]]; then
echo "! $repository is not a git repository."
return
fi
echo "» Monofying repository ($repository)...\n"
@martinjlowm
martinjlowm / index.html
Last active August 29, 2015 14:21 — forked from funrep/index.html
<meta charset="UTF-8">
<html>
<head>
<title>vitracker</title>
<script type="text/javascript" charset="utf-8" src="xm.js"></script>
</head>
<body>
<p>Hello, world</p>
</body>
</html>
@martinjlowm
martinjlowm / rawinput159.patch
Created July 20, 2012 21:05
Raw input patch for Wine 1.5.9 '(UINT)-1 -> result'
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 1ffce8d..9f498eb 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -476,23 +476,229 @@ BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
*/
UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT puiNumDevices, UINT cbSize)
{
- FIXME("(pRawInputDeviceList=%p, puiNumDevices=%p, cbSize=%d) stub!\n", pRawInputDeviceList, puiNumDevices, cbSize);
+ BOOL ret = FALSE;
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.5.9.ebuild,v 1.1 2012/07/18 08:42:29 tetromino Exp $
EAPI="4"
inherit autotools eutils flag-o-matic multilib pax-utils
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
Const HKCU=&H80000001 'HKEY_CURRENT_USER
Const HKLM=&H80000002 'HKEY_LOCAL_MACHINE
Const REG_SZ=1
Const REG_EXPAND_SZ=2
Const REG_BINARY=3
Const REG_DWORD=4
Const REG_MULTI_SZ=7
Const HKCU_IE_PROXY = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
@martinjlowm
martinjlowm / Age of Empires II - The Conquerors with native DirectPlay
Created May 28, 2012 23:38
A server log w/ 'WINEDEBUG=+winsock,+dplay' on Wine 1.5.5
trace:winsock:DllMain 0x7e700000 0x1 0x1
trace:winsock:DllMain 0x7e700000 0x2 (nil)
trace:winsock:DllMain 0x7e700000 0x2 (nil)
trace:winsock:DllMain 0x7e700000 0x3 (nil)
trace:winsock:DllMain 0x7e700000 0x3 (nil)
fixme:system:SystemParametersInfoW Unimplemented action: 110 (SPI_GETSHOWIMEUI)
fixme:win:EnumDisplayDevicesW ((null),0,0x33bf64,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x33b8f8,0x00000000), stub!
fixme:x11drv:X11DRV_desktop_SetCurrentMode Cannot change screen BPP from 32 to 8
err:d3d_surface:d3dfmt_p8_init_palette This code should never get entered for DirectDraw!, expect problems
@martinjlowm
martinjlowm / ALSA_log.txt
Created April 7, 2012 22:04
Output of several commands used to set up ALSA.
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC883 Analog [ALC883 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC883 Digital [ALC883 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
# ~/.asoundrc
#menu ul{list-style:none;}
#menu ul li{float:left;width:103px;height:43px;border:5px solid green;}
#menu ul li #menu1 {border:solid 2px red; height: 100%;box-sizing:border-box;}