Skip to content

Instantly share code, notes, and snippets.

View Helios-vmg's full-sized avatar

Víctor M. González Helios-vmg

  • Nektra S.A.
  • Buenos Aires, Argentina
View GitHub Profile
template <typename T>
void format_size(char *dst, T size){
const char *prefixes[] = {
"",
"Ki",
"Mi",
"Gi",
"Ti",
"Pi",
"Ei",
struct MemoryPage{
uintptr_t base_address;
size_t size;
bool read;
bool write;
bool execute;
};
std::vector<MemoryPage> list_memory_pages(){
std::vector<MemoryPage> ret;
#include <iostream>
#include <string>
#include <vector>
#include <optional>
#include <sstream>
#include <stdexcept>
#include <functional>
#include <Windows.h>
typedef std::function<bool(HWND)> enumerate_windows_cb;
#include <vector>
#include <string>
#include <random>
#include <iostream>
#include <ctime>
const char *first_names = "AMBER.ARMORED.ASHEN.ASSASSIN.BASTARD.BITING.BITTER.B"
"LACK.BLAZING.BLOODY.BLUE.BRASS.BRUTAL.BULLET.CANNIBAL.CHARGING.CODE.COPPER.CRA"
"WLING.CREEPING.CRIMSON.CRYING.CRYSTAL.CUNNING.DANCING.DARK.DEATH.DEVIL.DIRE.DI"
"ZZY.DOOM.EMERALD.FIRE.FLAMING.FRANTIC.FRIGID.GARNET.GLACIER.GOBLIN.GOLDEN.GRAY"
#define _USE_MATH_DEFINES
#include <fstream>
#include <cmath>
#include <random>
#include <map>
#include <functional>
#include <vector>
const double pi = M_PI;
const double tau = pi * 2;