Skip to content

Instantly share code, notes, and snippets.

View beinimaliesi's full-sized avatar
🎯
Focusing

Rex Stegner beinimaliesi

🎯
Focusing
View GitHub Profile
@statico
statico / gpu.cpp
Last active May 5, 2025 13:07
Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
#ifdef _WIN32
// Use discrete GPU by default.
extern "C" {
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
​
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 5, 2025 01:35
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ancestral
ancestral / ASCII JS Keyboard Map
Created July 6, 2012 04:33
ASCII keyboard map for JavaScript keycodes (Mac)
/*
* JavaScript Keyboard Map (Mac layout)
*
*
* escβ€”β€” F1β€”β€”β€” F2β€”β€”β€” F3β€”β€”β€” F4β€”β€”β€” F5β€”β€”β€” F6β€”β€”β€” F7β€”β€”β€” F8β€”β€”β€” F9β€”β€”β€” F10β€”β€” F11β€”β€” F12β€”β€” F13β€”β€”β€”β€”β€”+
* | 27 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | ??? |
* ` β€”β€”β€” 1β€”β€”β€”β€” 2β€”β€”β€”β€” 3β€”β€”β€”β€” 4β€”β€”β€”β€” 5β€”β€”β€”β€” 6β€”β€”β€”β€” 7β€”β€”β€”β€” 8β€”β€”β€”β€” 9β€”β€”β€”β€” 0β€”β€”β€”β€” - β€”β€”β€” = β€”β€”β€” deleteβ€”β€”+
* | 192 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
* tabβ€”β€”β€”β€” Qβ€”β€”β€”β€” Wβ€”β€”β€”β€” Eβ€”β€”β€”β€” Rβ€”β€”β€”β€” Tβ€”β€”β€”β€” Yβ€”β€”β€”β€” Uβ€”β€”β€”β€” Iβ€”β€”β€”β€” Oβ€”β€”β€”β€” Pβ€”β€”β€”β€” [ β€”β€”β€” ] β€”β€”β€” \ β€”β€”β€”β€”+
* | 9 | 81 | 87 | 69 | 82 | 84 | 89 | 85 | 73 | 79 | 80 | 219 | 221 | 220 |