Skip to content

Instantly share code, notes, and snippets.

View mrowrpurr's full-sized avatar

Mrowr Purr mrowrpurr

View GitHub Profile
@mrowrpurr
mrowrpurr / _ vcpkg registry manager _.md
Last active April 21, 2023 15:46
vcpkg registry manager (for GitHub)

vcpkg registry manager

for GitHub!

Installation

Copy registry.py into the root of any GitHub repository

Oh, and you'll need Python 3!

class MatchesRegexMatcher {
std::vector<std::string> _patterns;
public:
template <typename... Args>
MatchesRegexMatcher(std::string pattern, Args... args) : _patterns({pattern, args...}) {}
const std::vector<std::string>& GetPatterns() const { return _patterns; }
bool Matches(const std::string& text) const {
@mrowrpurr
mrowrpurr / .clang-format
Last active April 19, 2024 02:48
My Clang Format
---
UseTab: Never
TabWidth: '4'
IndentWidth: '4'
BasedOnStyle: Google
AccessModifierOffset: -4
ColumnLimit: 100
NamespaceIndentation: All
IndentPPDirectives: BeforeHash
FixNamespaceComments: false
#include "logger.h"
class OurEventSink : public RE::BSTEventSink<RE::TESHitEvent>,
public RE::BSTEventSink<RE::TESActivateEvent>,
public RE::BSTEventSink<SKSE::CrosshairRefEvent>,
public RE::BSTEventSink<RE::MenuOpenCloseEvent>,
public RE::BSTEventSink<RE::InputEvent*> {
OurEventSink() = default;
OurEventSink(const OurEventSink&) = delete;
OurEventSink(OurEventSink&&) = delete;
@mrowrpurr
mrowrpurr / settings.json
Created January 17, 2023 21:47
VS Code settings.json
{
"workbench.colorCustomizations": {
"[Just Black]": {
"editorRuler.foreground": "#ff00d0",
"activityBar.inactiveForeground": "#ff00d0",
"menubar.selectionForeground": "#00ffff",
"activityBar.foreground": "#00ffff",
"titleBar.activeForeground": "#00ffff",
"sideBarSectionHeader.foreground": "#ff00d0",
"sideBarTitle.foreground": "#ff00d0",
@mrowrpurr
mrowrpurr / . Mrowr Purr's New PC Setup.md
Last active March 3, 2024 17:12
Mrowr Purr's New PC Setup

Mrowr's PC Setup

  1. Update App Installer (so winget is runnable in the Terminal)

no longer supported

Instead:

@mrowrpurr
mrowrpurr / UI Dialog Boxes (from Windows `.bat` BATCH files) using `PowerShell` commands (into .NET assemblies) .md
Last active January 6, 2023 23:45
UI Dialog Boxes (from Windows `.bat` BATCH files) using `PowerShell` commands (into .NET assemblies)

UI Dialog Boxes (from Windows .bat BATCH files)

using PowerShell commands (into .NET assemblies)

.bat header

@echo off
setlocal EnableDelayedExpansion
# Callable from cmd
powershell Get-Content -Raw Replace.txt | % { $_ -replace "foo", "XXX" } | Set-Variable x; Set-Content Replace.txt $x
auto ReadFile(std::filesystem::path path) {
auto ifs = std::ifstream(path);
return std::string(std::istreambuf_iterator<char>{ifs}, {});
}
@mrowrpurr
mrowrpurr / ! Read Papyrus Pex Docstring Comment.md
Last active January 2, 2023 23:52
Read Papyrus script docstring comment from .pex

Read Papyrus .pex Docstring Comment

Example Script

scriptName MyScript
{This is the text that we are looking for, right here.

Oh, and it can have newlines.}