Skip to content

Instantly share code, notes, and snippets.

@MoreOrLessSoftware
MoreOrLessSoftware / Set-Cyberpunk-2077-Resolution.ps1
Last active October 16, 2025 14:45
Change the Cyberpunk 2077 settings file to make the resolution and max FPS to match that of the primary display
# NOTE: This script requires the DisplayConfig PowerShell module.
# Install it with: Install-Module DisplayConfig
# 1. Get the current display resolution
$displayInfo = Get-DisplayInfo | Where-Object { $_.Primary }
$screenWidth = $displayInfo.Mode.Width
$screenHeight = $displayInfo.Mode.Height
$targetResolution = "${screenWidth}x${screenHeight}"
$targetMaxFps = [System.Math]::Ceiling($displayInfo.Mode.RefreshRate)
@headquarters
headquarters / video-playback-bookmarklet.js
Created February 4, 2023 21:55
Bookmarklet: adjust video playback speed
// Bookmarklet:
javascript:(function()%7Bconst%20template%20%3D%20document.createElement(%22template%22)%3B%0Atemplate.innerHTML%20%3D%20%60%0A%20%20%20%20%20%20%20%20%3Cstyle%3E%0A%20%20%20%20%20%20%20%20%20%20%3Ahost%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20box-sizing%3A%20border-box%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20padding%3A%200.5rem%201rem%201.5rem%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20width%3A%20320px%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20border%3A%202px%20solid%20darkgray%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20box-shadow%3A%20grey%200%200%204px%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20background-color%3A%20white%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20position%3A%20absolute%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20right%3A%2010px%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20top%3A%2010px%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20z-index%3A%2010000%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20font-family%3A%20sans-serif%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%2
@soxrok2212
soxrok2212 / Reolink RLC-810A Homebridge 4K Configuration.md
Last active October 5, 2025 03:13
Reolink RLC-810A Homebridge 4K Configuration
const assert = require('assert');
//========== Helper functions
/**
* Resolves after `ms` milliseconds
*/
function delay(ms) {
return new Promise((resolve, _reject) => {
setTimeout(resolve, ms);
@gaearon
gaearon / reducers.js
Last active December 11, 2020 14:56
How I'd do code splitting in Redux (pseudo code, not tested!)
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
export default function createReducer(asyncReducers) {
return combineReducers({
users,
posts,
...asyncReducers
});
@DenisIzmaylov
DenisIzmaylov / INSTALLATION.md
Last active April 27, 2023 15:44
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content

@nolanlawson
nolanlawson / protips.js
Last active November 19, 2024 02:40
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
/** @jsx React.DOM */
var GameStatus = {
NOTSTARTED: 0,
FINISHED: 1,
INPROGRESS: 2
}
var Suits = ['H', 'D', 'C', 'S'];
var Cards = [];
@steve-jansen
steve-jansen / README.md
Last active December 13, 2024 23:29
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep