Skip to content

Instantly share code, notes, and snippets.

@adultalldabloons
adultalldabloons / GameMaster.sh
Last active October 25, 2025 21:37
Myrient downloader for ArkOS
#!/bin/bash
# Licensed under the MIT License – https://opensource.org/licenses/MIT
DOWNLOAD_LOCATION="/roms"
if mountpoint -q /roms2; then
DOWNLOAD_LOCATION="/roms2"
fi
declare -A system_to_url
@gagarine
gagarine / win11-mouse-scroll-reverse.md
Last active September 5, 2025 13:43
Reverse Mouse Wheel scroll in Windows 11 (Natural Mode like MacOS)

Reverse Mouse Wheel scroll in Windows 11

Chose between natural mode like MacOS or Windows default mode.

Step 1: Open Windows PowerShell in Administrator Mode.

You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.

Step 2: Copy the following code and paste it in the command line of Windows PowerShell:

$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
@odevsa
odevsa / assetto-corsa-steam-install.md
Last active September 15, 2024 08:42
Assetto Corsa Linux Steam Install
@jackm
jackm / can-packages-and-tools.md
Last active October 9, 2025 06:51
Collection of CAN bus packages and tools

Collection of CAN bus packages and tools

This document assumes the use of Linux as the chosen development platform. Items in bold are highly recommended.

It is recommended to use SocketCAN when working with CAN bus on Linux. It is supported by the Linux kernel mainline and follows the Linux interface model, allowing you to use other network tools such as Wireshark. This also allows the creation of virtual CAN interfaces where no physical hardware is required to simulate or replay CAN messages.

@edamov
edamov / index.php
Created October 18, 2016 15:52
PHP token-based (JWT) push notifications to APNS via HTTP/2
<?php
require_once 'vendor/autoload.php';
use Jose\Factory\JWKFactory;
use Jose\Factory\JWSFactory;
$key_file = 'key.p8';
$secret = null; // If the key is encrypted, the secret must be set in this variable
$private_key = JWKFactory::createFromKeyFile($key_file, $secret, [
public class Bresenham implements Drawer<BufferedImage2D> {
@Override
public void line (BufferedImage2D target, int x1, int y1, int x2, int y2, int color) {
int x, y;
int dx, dy;
int incx, incy;
int balance;
if (x2 >= x1) {
dx = x2 - x1;
@JensWalter
JensWalter / FormDataHandler.java
Created October 10, 2015 19:02
FormDataHandler for com.sun.net.httpserver.HttpHandler
package io.trivium.glue.binding.http;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
@luanht
luanht / Win32Monitor.java
Last active October 17, 2022 08:41
Example for catching Windows sessions and power events with JNA
package lht;
import com.sun.jna.WString;
import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HMODULE;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.platform.win32.WinDef.LPARAM;
import com.sun.jna.platform.win32.WinDef.LRESULT;
import com.sun.jna.platform.win32.WinDef.WPARAM;