Skip to content

Instantly share code, notes, and snippets.

@Glaived
Glaived / INSTALL.md
Last active August 23, 2025 10:14
YesCasey is a package that includes everything you need to extract files from the Soulworker game

Manual installation of the various software required

  1. Download xor, extract the content, modify the value path[0] to point to the executable xor.exe.

  2. Download 7-Zip, extract the content, modify the value path[1] to point to the executable 7z.exe.

  3. Download quickbms, extract the content, modify the value path[2] to point to the executable quickbms.exe.

  4. Download fmod_extractors, extract the content, modify the value path[3] to point to the executable fmod_extr.exe.

@looopTools
looopTools / Read File to std::vector<uint8_t> in C++
Created February 1, 2019 13:33
How to read a file from disk to std::vector<uint8_t> in C++
inline std::vector<uint8_t> read_vector_from_disk(std::string file_path)
{
std::ifstream instream(file_path, std::ios::in | std::ios::binary);
std::vector<uint8_t> data((std::istreambuf_iterator<char>(instream)), std::istreambuf_iterator<char>());
return data;
}
@CoolOppo
CoolOppo / Cargo.toml
Last active September 15, 2024 10:55
How to compile to a DLL in rust while using it as a normal rust library
[package]
name = "test"
version = "0.1.0"
authors = ["YOU <[email protected]>"]
edition = "2018"
[lib]
crate-type = ["cdylib"]
@prideout
prideout / servewasm.py
Created November 8, 2018 00:44
Python WASM server
#!/usr/bin/env python3
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
'.wasm': 'application/wasm',
@Beefster09
Beefster09 / scale.frag
Last active June 30, 2024 22:32
GLSL: smooth pixel scaling
#version 330 core
in vec2 frag_uv;
uniform sampler2D virtual_screen;
uniform float sharpness = 2.0;
out vec4 frag_color;
float sharpen(float pix_coord) {
@netwerkz
netwerkz / smooth.glsl
Last active August 22, 2020 21:31
smooth point filtering for pixel art rendering
// your inputs and uniforms ...
void antialiasedPixelColor(out vec4 color, in vec2 pixelUV, in sampler2D textureChannel)
{
// basic sampling:
vec2 uv = floor(pixelUV) + 0.5;
// subpixel filtering algorithm:
uv += 1.0 - clamp((1.0 - fract(pixelUV)), 0.0, 1.0);
color = texture(textureChannel, uv / textureChannel.xy);
@ForeverZer0
ForeverZer0 / ReshapeWindow.cs
Last active November 5, 2022 17:12
[C#][OpenGL] Maintain aspect ratio when resizing window
/// <summary>
/// Reshapes the drawing are to maintain aspect ratio when the window is resized,
/// using a target pixel ratio to maintain, and applying "pillars" or "letterbox"
/// effect as needed, allowing the drawing context to shrink/grow uniformly.
/// </summary>
/// <param name="width">The new width of the window/drawing area to fit to.</param>
/// <param name="height">The new height of the window/drawing area to fit to.</param>
public void WindowReshape(int width, int height)
{
// Make the projection matrix active
@russleyshaw
russleyshaw / dracula.reg
Last active January 17, 2022 16:45
Dracula Theme registry file for KiTTY
Windows Registry Editor Version 5.00
; README
; Open REGEDIT on Windows and find the exact name of the session you wish to apply the colors to.
; Then replace "YOUR_SESSION_HERE" with the name you found.
[HKEY_CURRENT_USER\Software\9bis.com\KiTTY\Sessions\YOUR_SESSION_HERE]
"Colour21"="255,255,255"
"Colour20"="248,248,242"
"Colour19"="154,237,254"
@thefloodshark
thefloodshark / .js
Created April 2, 2018 07:36
Tampermonkey Userscript - Website Auto-Refresh Timer
// ==UserScript==
// @name Auto-Refresh
// @include https://www.example.com
// ==/UserScript==
//--- https://stackoverflow.com/questions/25484978/i-want-a-simple-greasemonkey-script-to-reload-the-page-every-minute
setTimeout(function(){ location.reload(); }, 20*1000);
@tmarkovski
tmarkovski / Program.cs
Last active July 24, 2024 17:25
Generate elliptic curve SECP256K1 key pair using Bouncy Castle for .NET
using System;
using System.Linq;
using Org.BouncyCastle.Asn1.X9;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Generators;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Security;
namespace Program
{