Skip to content

Instantly share code, notes, and snippets.

@Mashpoe
Mashpoe / include-filter
Created April 21, 2023 08:34
File Explorer include folder filter query
NOT ext:.h AND NOT kind:folders
@Mashpoe
Mashpoe / friend.cpp
Created November 13, 2022 08:27
Hide private members from a friend class
#include <iostream>
// forward declare Foo so we can make it a friend of FooPrivate
class Foo;
// allows us to hide instance members from friends of Foo,
// but still allows Foo itself to access them.
class FooPrivate
{
private:
@Mashpoe
Mashpoe / download-audio-only.bat
Created July 31, 2022 01:56
YouTube video downloader scripts for Windows (place these in a folder with youtube-dl.exe)
@echo off
set /p Input=Enter YouTube video URL:
@echo on
youtube-dl -f bestaudio -o "output-audio-only/%%(title)s-%%(id)s.%%(ext)s" %Input%
@echo off
set /p DUMMY=Press ENTER to continue...
@Mashpoe
Mashpoe / RunMinecraftServer.bat
Last active June 13, 2022 23:20
Starts up a Minecraft server and restarts it whenever it crashes. If you type "stop" in the server console, the server will close without restarting.
@echo off
:loop
java -jar server.jar nogui
echo ERROR CODE: %errorlevel%
if not %errorlevel%==0 goto :loop
@Mashpoe
Mashpoe / main.c
Last active April 14, 2024 02:51
ASCII Tesseract Rotation C Program
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <windows.h>
// width and height of screen
#define ww 100
#define wh 50
void clr(CHAR_INFO* d)