Skip to content

Instantly share code, notes, and snippets.

@douglasparker
douglasparker / README.md
Last active December 29, 2024 02:36
Disable & Enable MPO via the Windows Registry

Disable & Enable MPO via the Windows Registry

There is a well known issue where GPU drivers are crashing with multi-monitor setups due to an interaction with Windows MPO and both Nvidia and AMD GPUs.

Until this bug is fixed, the only solution is to disable MPO via the Windows Registry.

Disable MPO

To apply the fix, simply run mpo_disable.reg and reboot your computer.

@opastorello
opastorello / sublime text 4143 license key
Last active December 29, 2024 02:35
sublime text 4143 license key
> * Go to [hexed.it](https://hexed.it/)
> * Click "Open File" and choose your sublime_text.exe **(DON'T FORGET TO BACKUP YOUR EXE FILE)**
> * Go to Search and in "Search for" put: 80 78 05 00 0F 94 C1
> * In Search Type select "Enable replace" and put: 80 78 05 00 0F 94 C1
> * Click "Find next" then "Replace"
> * Do the same thing with: C6 40 05 01 48 85 C9 => C6 40 05 01 48 85 C9
> * Click "Save as" then name it: sublime_text
> * Copy your modified sublime_text.exe to directory Sublime Text
@andersr
andersr / gist:11004954
Last active December 29, 2024 02:33
Explain to an alien how to make a PBJ Sandwich

#Alien Sandwich A numbered list of instructions for explaining to an alien how to make a peanut butter and jelly sandwich

###Collect and define items needed to make a Peanut Butter and Jelly Sandwich.

  • "PBJ-sandwich" = Peanut Butter and Jelly Sandwich (the thing we will be making)
  • "pb-jar" = the cylindrical object in front of you containing a brown substance
  • "jelly-jar" = the cylindrical object in front of you containing a red substance
  • "plate" = the flat white object in front of you
  • "bread-loaf" = the brown, rectangle-shaped thing in front of you that is soft to the touch
  • "knife" = the narrow, silver-colored thing in front you with one side that is sharp to the touch. The side that is not sharp is the side you grasp. The knife can be used for two purposes: cutting and spreading. When used for cutting, grasp the knife and face the sharp part downward. When used for spreading, grasp the knife and and turn the knife so that the sharp part is horizontal.
@brianmed
brianmed / EmailQueueHostedService.cs
Created April 16, 2022 02:14
Example BackgroundService with C# ASP.Net Core
using Microsoft.EntityFrameworkCore;
namespace Joy.HostedServices;
public class EmailQueueHostedService : BackgroundService
{
private IServiceScopeFactory ScopeFactory { get; init; }
public EmailQueueHostedService(IServiceScopeFactory scopeFactory)
{
@Thesola10
Thesola10 / nix your reality.txt
Last active December 29, 2024 02:25
Sung to the tune of "Your Reality" from Doki Doki Literature Club
Every day, I imagine a future where I can be with you.
In my hand, is a pen that'll write derivations of me and you.
The bytes flow down into a hash table
Just move your PATH, link the way into this art.
But in this world of indefinite builds,
What will it take just to find stability?
What will it take just to find... that special day?
Have I found every package a derivation that works today?
@zajdee
zajdee / jool-init.sh
Last active December 29, 2024 02:20
Init Jool in a namespace
#!/bin/bash
# Save the file as e.g. /usr/sbin/jool-init.sh
# Edit to match your translation prefix
NAT64_PFX=64:ff9b::/96
# Edit to match your dual-stack interface
DUALSTACKIFACE=ens5
modprobe jool
# add namespace and devices to link the two namespaces
@niksumeiko
niksumeiko / disable-html-form-input-autocomplete-autofill.md
Last active December 29, 2024 02:19
Disable HTML form input autocomplete and autofill

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@staltz
staltz / introrx.md
Last active December 29, 2024 02:17
The introduction to Reactive Programming you've been missing
@Euro-pol
Euro-pol / AC_DDoS_Protection.md
Last active December 29, 2024 02:16
Assetto Corsa self-hosted DDoS protection tutorial (proxy)

Introduction

Hey guys, I've been hosting an Asseto Corsa server on my Raspberry Pi 4, but been wondering how to set up DDoS protection. I've been searching for any self-hosted proxies for AC, but couldn't find any so I dug deeper. I found out that nginx can work with UDP and TCP connections, so I'm writing this little guide.

Requirements

  • A VPS with Ubuntu Server (or similar)
  • Nginx with stream (on Ubuntu, install libnginx-mod-stream)
  • An already setup Asseto Corsa server
  • Your home server's ports open (for the AC server to be accessible)

How-to

@MaskRay
MaskRay / johnson.cc
Last active December 29, 2024 02:12
Johnson's algorithm - Finding All the Elementary Circuits of a Directed Graph
#include <algorithm>
#include <cstdio>
#include <type_traits>
#include <vector>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (remove_cv<remove_reference<decltype(b)>::type>::type i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)