Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <vector>
#include <string>
#include <iconv.h>
#include <filesystem>
static const iconv_t iconv_toutf = iconv_open("UTF-8", "CP932");
static std::string iconv_convert(const char* src, size_t len, iconv_t conv) {
std::string out;
char buffer[512];
@TellowKrinkle
TellowKrinkle / IntelForceHighPower.cpp
Created September 21, 2022 04:27
Intel Force High Power
// Force Intel GPUs into max power state on macOS
// Based off decompilation of Apple's MTLReplayer GTPMService.xpc
// clang++ -std=c++17 -O3 -framework IOKit IntelForceHighPower.cpp -o IntelForceHighPower
#include <cstdio>
#include <optional>
#include <IOKit/IOKitLib.h>
enum AGPMType {
AGPMTypeIG = 2,