Skip to content

Instantly share code, notes, and snippets.

@nathan130200
nathan130200 / script.cpp
Last active August 3, 2020 20:13
Dead By Daylight Prototype in Overwatch Workshop
settings
{
lobby
{
Map Rotation: Paused
Max Team 1 Players: 10
Max Team 2 Players: 2
Return To Lobby: Never
Swap Teams After Match: No
}
@nathan130200
nathan130200 / script.cs
Created July 24, 2020 00:36
Dummy Bots: Mercy Helper
settings
{
lobby
{
Map Rotation: Paused
Max Team 1 Players: 3
Max Team 2 Players: 3
Return To Lobby: Never
Swap Teams After Match: No
}
@nathan130200
nathan130200 / script.c
Last active July 21, 2020 00:35
Tiny overwatch - Workshop mode.
settings
{
lobby
{
Allow Players Who Are In Queue: Yes
Match Voice Chat: Enabled
}
modes
{

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@nathan130200
nathan130200 / TraceRoute.cs
Created July 1, 2020 12:14
.NET Async tracert with events.
using System.Net.Http;
namespace System.NetworkInformation
{
public class TraceRouteEventArgs
{
public TraceRoute Tracer { get; internal set; }
}
public class TraceRoutedEventArgs : TraceRouteEventArgs
@nathan130200
nathan130200 / EventHandlerList.cs
Last active April 1, 2020 23:27
Thread-safe event handler system in C# using dynamic delegate
using System.Collections.Generic;
namespace System.Event
{
public class EventHandlerList
{
private class DelegateBinder
{
public readonly object Key;
private List<Delegate> Handlers;
@nathan130200
nathan130200 / BinaryStream.cs
Created March 17, 2020 13:58
C# Binary Stream with endianess.
namespace System.IO
{
public enum BinaryEndianess
{
BigEndian,
LittleEndian
}
public class BinaryStream : Stream
{
@nathan130200
nathan130200 / EventEmitter.cs
Last active January 9, 2020 15:34
DSharpPlus Remote Event Handlers.
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using DSharpPlus;
package test;
import cn.nukkit.network.Network;
import cn.nukkit.network.protocol.BatchPacket;
import cn.nukkit.network.protocol.DataPacket;
import cn.nukkit.network.protocol.ProtocolInfo;
import cn.nukkit.raknet.protocol.EncapsulatedPacket;
import cn.nukkit.utils.Zlib;
import java.util.Arrays;
@nathan130200
nathan130200 / CooldownVisualizer.cs
Created December 29, 2019 11:58
DSharpPlus: command cooldown visualizer using simple message update loop.
using System;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DSharpPlus;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
using System.Threading;