Skip to content

Instantly share code, notes, and snippets.

@BluBb-mADe
BluBb-mADe / boost_container_static_vector.natvis
Created July 15, 2024 22:17
A basic vizualizer for the boost container static vector. It's not great but its a lot better than nothing.
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="boost::container::static_vector&lt;*&gt;">
<DisplayString>{{ size={m_holder.m_size} }}</DisplayString>
<Expand>
<Item Name="[size]" ExcludeView="simple">m_holder.m_size</Item>
<Item Name="[capacity]" ExcludeView="simple">static_capacity</Item>
<ArrayItems>
<Size>m_holder.m_size</Size>
<ValuePointer>($T1*)m_holder.storage.data</ValuePointer>
@BluBb-mADe
BluBb-mADe / theil_sen_estimator.hpp
Created September 3, 2023 15:09
Simple Theil-Sen estimator example
#pragma once
template<int Limit, std::floating_point ValueType, std::ranges::sized_range Range, ValueType Epsilon = std::numeric_limits<ValueType>::epsilon() * Limit>
requires std::convertible_to<std::ranges::range_value_t<Range>, std::pair<ValueType, ValueType>>
auto theil_sen_slope(Range value_pairs) {
if (value_pairs.size() <= 1) {
return ValueType{0};
}
std::vector<std::pair<ValueType, ValueType>> sample_holder;
@BluBb-mADe
BluBb-mADe / coro20_beast_ws_echo_server.cpp
Last active August 4, 2023 19:32
Simple c++20 coroutine boost beast websocket echo server example
#include <exception>
#include <iostream>
#include <coroutine>
#include <string_view>
#include <chrono>
#include <boost/asio.hpp>
#include <boost/beast.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/iostreams/stream.hpp>
@BluBb-mADe
BluBb-mADe / potato_patcher.py
Last active July 14, 2024 07:09
Generic Voicemeeter Potato in-memory patch
import os
import sys
import time
import subprocess
import traceback
from pymem import Pymem, process, exception
#############################################################################################
# This is an in-memory patch that launches and patches Voicemeeter Potato in memory on startup.
@BluBb-mADe
BluBb-mADe / patch_unity_202x.py
Created February 23, 2023 16:59
Half-baked unity patcher that doesn't support the most recent versions
import os, sys, shutil, ctypes, time, re, operator
# Usage:
# This script always makes sure it makes backups of everything it changes so you can always revert by renaming the backup files to their original names.
# If you only have one version of unity installed it will just search for the first unity version it can find there and try to patch that if you run it.
# You can adjust the default_path variable inside this script if necessary.
# Alternatively you can just drag and drop the Unity.exe onto this script if you have properly associated the python script file extension with a working interpreter.
# Or you can pass the path to the Unity.exe as the only argument to the script in a shell by hand.
#
# I have only tested this script on windows and I haven't checked if even the signatures could work on other platforms. But probably not.
@BluBb-mADe
BluBb-mADe / azure_tts_length_unlock.user.js
Last active March 18, 2023 00:41
[IRRELEVANT] This will keep the play button on microsoft azures cutting edge text to speech demo page unlocked beyond the 1k char limit as the backend allows much longer texts.
/* THIS HAS BECOME IRRELEVANT BECAUSE MICROSOFT TOOK DOWN THE PUBLIC DEMO */
// ==UserScript==
// @name ms azure tts text length unlock
// @version 1
// @grant none
// @run-at document-idle
// @include https://azure.microsoft.com/en-us/products/cognitive-services/text-to-speech/*
// ==/UserScript==
const playBtn = document.getElementById("playbtn");
@BluBb-mADe
BluBb-mADe / tazti.md
Last active August 4, 2023 19:37
Tazti 3.x License Key activation

The activation of this app is so adorably cute I can not help but describe it somewhere.

The activation window inside the application just concatenates the E-Mail and the Order ID input fields and hashes them with md5.

import hashlib
email = b"me@example.com"
order_id = b"00001"
hashlib.md5(email + order_id).hexdigest()

The resulting hash is the activation key you have to enter as "Your Code".

@BluBb-mADe
BluBb-mADe / iplog.py
Last active April 20, 2022 09:03 — forked from ezklap/iplog.py
Apex Legends IP logger
#!venv/Scripts/python
from scapy.all import sniff, get_working_if
from pynput import keyboard
import colorama
import sys
import time
from datetime import datetime
import threading
@BluBb-mADe
BluBb-mADe / toggle_vpn.ps1
Created April 26, 2020 23:45
Quickly toggle windows 10 vpn connection on and off and enable or disable ipv6 at the same time
if(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
break
}
$con_state = (rasdial) | Out-String
if($con_state.StartsWith("Connected to")) {
echo "Disconnecting from vpn..."
rasdial /disconnect
@BluBb-mADe
BluBb-mADe / animate.py
Last active August 2, 2018 18:29
Vapoursynth Animate
import functools
import vapoursynth as vs
def interp(a, b, c):
s = (b - a) / c
for _ in range(c):
yield a
a += s
yield b