Skip to content

Instantly share code, notes, and snippets.

@remlapmot
remlapmot / 4k-windows-resize-after-sleep-fix.reg
Last active May 6, 2024 17:22
Windows 10 registry entry setting which fixes PrimSurfSize.cx, PrimSurfSize.cy, and Stride values for a 4K monitor, so windows do not resize after sleep (an issue which seems to affect some Dell computers)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\NOEDID_8086_3E98_00000000_00020000_31063^9B5CF2A2AB5D52EABA55D3D249C48521]
"SetId"="NOEDID_8086_3E98_00000000_00020000_31063"
"Timestamp"=hex(b):7c,f5,a9,74,7f,f1,d5,01
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\NOEDID_8086_3E98_00000000_00020000_31063^9B5CF2A2AB5D52EABA55D3D249C48521\00]
"PrimSurfSize.cx"=dword:00000f00
"PrimSurfSize.cy"=dword:00000870
"Stride"=dword:00003c00
@remlapmot
remlapmot / packages.R
Last active December 1, 2021 13:59
Helpful packages and their dependencies to install with a fresh install of R
#' ---
#' title: "Helpful packages and their dependencies to install with a fresh install of R"
#' author: Tom Palmer
#' date: 2020-03-27
#' ---
#' Tested on Ubuntu 18.04
if (Sys.info()["sysname"] == "Linux"){
system('sudo apt-get install -y libcurl4-openssl-dev')
system('sudo apt-get install -y libssl-dev')
@remlapmot
remlapmot / wsl.xlaunch
Created March 1, 2020 11:09
XLaunch config file for X11 forwarding from Windows Subsystem for Linux. Run with VcXsrv for best results.
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="-1" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="-ac" Wgl="True" DisableAC="False" XDMCPTerminate="False"/>
@remlapmot
remlapmot / shortcuts.xml
Last active April 26, 2021 14:38
Shortcuts file for Notepad++. File location %appdata%\Notepad++
<NotepadPlus>
<InternalCommands />
<Macros>
<Macro name="Trim Trailing Space and Save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
<Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
</Macro>
</Macros>
<UserDefinedCommands>
<Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112">https://www.php.net/$(CURRENT_WORD)</Command>
@remlapmot
remlapmot / settings.json
Last active June 27, 2020 16:35
Windows Terminal settings file
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"confirmCloseAllTabs": false,
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
@remlapmot
remlapmot / settings.json
Created January 19, 2020 13:39
VS Code User Settings
{
"workbench.sideBar.location": "right",
"workbench.iconTheme": "vscode-icons",
"editor.fontFamily": "Fira Code Light",
"editor.fontLigatures": true,
"latex-workshop.view.pdf.viewer": "tab",
"editor.minimap.enabled": false,
"editor.wordWrap": "on",
"breadcrumbs.enabled": true,
"editor.fontSize": 11,
Capslock::Shift
+Capslock::Send, % Chr(163)
Capslock::`
+Capslock::~
@remlapmot
remlapmot / autohotkey-commands.ahk
Last active October 9, 2019 08:28
Collection of useful AutoHotkey commands
; Uncomment to monitor which key has been pressed (when running script but not compiled script)
; #InstallKeybdHook
; Press ` (accent grave/backtick) to move up a folder in Explorer in Windows 10 (on an ISO UK keyboard)
#IfWinActive ahk_class CabinetWClass
SC029::
SendInput, {LAlt down}
sleep, 1
SendInput, {Up}
sleep, 1
@remlapmot
remlapmot / capslock-to-shift.ahk
Last active October 8, 2019 08:04
AutoHotkey script to remap Caps Lock to Shift
Capslock::Shift