Skip to content

Instantly share code, notes, and snippets.

View valentimarco's full-sized avatar

valentimarco

View GitHub Profile
@Delivator
Delivator / mhwshadercleanup.sh
Last active September 30, 2025 14:03
his script removes the Monster Hunter Wilds shader cache
#!/bin/bash
# This script removes the Monster Hunter Wilds shader cache and then
# executes the command passed to it.
# Recommended to put this script somewhere in your PATH, for example:
# ~/.local/bin/mhwshadercleanup
# Remove the shader cache file.
# The '2>' part redirects standard error to /dev/null, so it doesn't
@jstefanelli
jstefanelli / simple_json.hpp
Last active February 25, 2025 16:52
Super Primitive, header-only (almost), no-dependency, C++ JSON output "thing"
#pragma once
#include <variant>
#include <string>
#include <vector>
#include <unordered_map>
namespace json {
inline std::string util_replace(std::string haystack, const std::string_view& needle, const std::string_view& replaced_data) {
@cnlohr
cnlohr / battery_monitor_overlay.c
Last active July 9, 2025 16:52
How to make a monitor overlay in OpenVR in C
// WARNING: THIS EXAMPLE HAS BEEN SUPERSEDED BY THIS PROJECT. PLEASE MIGRATE. https://github.com/cnlohr/openvr_overlay_model
// Battery Watcher for OpenVR (make an overlay with the battery left for all connected devices on your left hand)
//
// Compile with:
// tcc battery_monitor_overlay.c -o bmo.exe -luser32 -lgdi32 -lkernel32 -lopengl32 C:\windows\system32\msvcrt.dll openvr_api.dll
// System headers for any extra stuff we need.
#include <stdbool.h>
@harveyconnor
harveyconnor / jwtVerify.ts
Created August 10, 2020 05:55
Async JWT Verify for TypeScript/JS
export async function jwtVerify(token: string, secret: string): Promise<any> {
return new Promise((resolve, reject) => {
verify(token, secret, (err, decoded) => {
if (err) return reject(err);
resolve(decoded);
});
});
}
@leopoldodonnell
leopoldodonnell / Readme.md
Last active October 20, 2025 08:54
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active January 24, 2026 23:38
Conventional Commits Cheatsheet
@pubkey
pubkey / corsair_headset_linux.bash
Last active September 7, 2025 16:51
Corsair Gaming VOID Headset on Linux
# Corsair headsets will stuck the apps on your linux system. This is due to wrong usb-mapping.
# thx to http://www.c0urier.net/2016/corsair-gaming-void-usb-rgb-linux-fun
# 1. open terminal
# 2. type this and search the line with your headset
lsusb
# Get the USB ID of the headset and add it to xorg.conf:
@MinerCraftGuy
MinerCraftGuy / gist:c3b98e8938286a67ce667d1c2ff6f1cb
Last active August 19, 2024 21:34
Transformation Functions
func_100008_d isDurationMax
func_100009_j_ getFacing
func_100011_g getIsPotionDurationMax
func_100012_b setPotionDurationMax
func_100015_a isKeyDown
func_102007_a canInsertItem
func_102008_b canExtractItem
func_102012_a insertStackFromInventory
func_102013_b canExtractItemFromInventory
func_102015_a canInsertItemToInventory
using System;
using System.Runtime.InteropServices;
// ReSharper disable SuspiciousTypeConversion.Global
// ReSharper disable InconsistentNaming
namespace VideoPlayerController
{
/// <summary>
/// Controls audio using the Windows CoreAudio API
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer