Skip to content

Instantly share code, notes, and snippets.

@Nielk1
Nielk1 / ExtendInput.DataTools.DualSense.TriggerEffectGenerator.cs
Last active September 1, 2024 08:02
Factories for all DualSense trigger effects
/*
* MIT License
*
* Copyright (c) 2021-2022 John "Nielk1" Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@jackdbd
jackdbd / xcb.zig
Last active January 18, 2024 14:29 — forked from NBonaparte/xcb.zig
Minimal XCB + Cairo example in Zig
//! Minimal XCB + Cairo example in Zig
//! Dependencies: libc, xcb, cairo
//! install XCB development files
//! sudo apt-get install libxcb1-dev
//! install cairo development files
//! sudo apt-get install libcairo2-dev
//! build and run with:
//! zig build-exe xcb.zig -lc -lxcb -lcairo && ./xcb
const std = @import("std");
const c = @cImport({
@michaelbutler
michaelbutler / Steam_Proton_Exe.md
Last active July 26, 2024 14:06
How to run another .exe in an existing proton wine prefix

Running games through Steam's Proton is great. But what if there is a secondary exe or configuration application bundled with the game? How can you launch it if Steam itself only launches the game?

Simply run this command in a terminal:

cd /path/to/steam/steamapps/compatdata/20920/pfx

STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
    "$HOME/.steam/root/steamapps/common/Proton 5.0/proton" run ./drive_c/path/to/custom_application.exe
@Andon13
Andon13 / gist:d439d5334d8173e5b959f383f1c49b03
Last active August 31, 2024 10:17
Manually Inject Steam Overlay and Associate With an AppID
#include <string>
const wchar_t*
SK_GetSteamDir (void)
{
static
wchar_t wszSteamPath [MAX_PATH + 2] = { };
DWORD len = MAX_PATH;
LSTATUS status =
@AzureDVBB
AzureDVBB / node_trees.py
Created July 17, 2018 21:22
A simple node tree addon template for blender.
# the little less documented way of adding a custom node tree
# and populate it with nodes of varying types of I/O
# sockets that work together, discombobulated
# first we import the blender API
import bpy
# then we create the UI space, the node tree as it is called
# but in actualy fact this is similar to a UI panel/menu
@texus
texus / Transparent.cpp
Last active September 27, 2023 14:23
Translucent per-pixel alpha window on Windows
#include <SFML/Graphics.hpp>
#if _WIN32_WINNT < 0x0501
#define _WIN32_WINNT 0x0501
#endif
#include <windows.h>
// Set part of the window that can be clicked by removing fully transparent pixels from the region
void setShape(HWND hWnd, const sf::Image& image)
{