Skip to content

Instantly share code, notes, and snippets.

Avatar

Cameron MacFarland distantcam

View GitHub Profile
View Cam's Celtic City Block Rails
0eNrtnU1vJEeSpv9Kg5e9FIXwb3cdp08L7GkwhwEWi0aVRGiILlUVWCxhGg3+92UmM1mpTLOI94nM1GgGvHRDVOQjD3cLd3Nzc3v/efPh47e7Lw/3nx7/9uHz57/f/PjP73/5evPj/z34x82/+/rp/Zfbx8+3vzzc/7z55/+8+TFM07ubf2z//+ndzfsPXz9//PZ4d7t58sv9p19ufnx8+Hb37ub+p8+fXoBf73/59P7j5teP//hyd/PjzW/3D4/fnv/y7ubT+183f3h54vZ/3zwD7z/9fLf5rzy9M355/3j36/efPby//3jwk8h/kpSffP7w+cvnh8eDn+Wn//fu5u7T4/3j/d3LO27/4R9/+/Tt1w93D8+t//5qv77/+PH24/tfvzwTv3z++vyTz592PXmbfyjbrrytP5SnTVOOMFHCLFGSRBllAZMlTJiWmlO0vql7TLYx9RXz4f6X27uPdz89Ptz/dPvl88c7g7ZjlecxfLbLT88P32/N8583YfM/D3c/Hw7jxtbbwX9z889x2gz6Lw93d5+UR5+sNjfSZt7ketSOMB03LLjvIP3WfKkujefScA6JktICJkyki9P5ZhGSbBabR80eDNp0kZb6MGjzRV3sxEQ6sfJOPDGuUN1eNJ+1u1GboepiN2oz1FjsRjRFjRXdmI675mQmGn6/Sj+2OxrNY2Fa8WbH01HyZ1/zWbvdXVzCFi1ksDXMwcRpxRp2xnoQw9EfSpbXA/O3Zi/HwFc58FLxeD44Mdt83NLivuU6mP3aEa2Dnkkktg56mLxiGSSDcGwN0Z/AzWftLixsHfRevq5YvsjLZ32WNZ+1X76x1ct7+c4WLw8zVqxdpA/r6ap+MosffXkzvbyOZo5DmtYsbuTVx9LCW/3FTvux/WIBrn6OaaTINrferjShza1HyWxz62EK3Nx6nHoaNjihxBdEtAlNILRZQicGvJkvNqhuotAs0OIMKk+/i8Hc7oIup+M9dj2cwg+bj+rn+4eXb2oX3znGwkjLZuE0m8d
@distantcam
distantcam / extensions.json
Created Mar 28, 2019
Presentation settings for vscode
View extensions.json
{
"recommendations": [
"saviorisdead.theme-githubcleanwhite",
"evilz.vscode-reveal"
]
}
View CompositeParallelJobSystem.cs
using Unity.Entities;
using Unity.Jobs;
public abstract class CompositeParallelJobSystem<T1, T2> : JobComponentSystem
where T1 : struct, IJobParallelFor
where T2 : struct, IJobParallelFor
{
protected ComponentGroup group;
protected abstract ComponentGroup CreateGroup();
@distantcam
distantcam / JobHelper.cs
Last active Sep 9, 2020
Unity Job system with async
View JobHelper.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Unity.Jobs;
public static class JobHelper
{
@distantcam
distantcam / Sample.csproj
Created Oct 19, 2017
Example new project
View Sample.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net462</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DebugType>full</DebugType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
@distantcam
distantcam / SimpleConfig.cs
Created Oct 12, 2017
Simple config class
View SimpleConfig.cs
public static class SimpleConfig
{
static string configFilePath;
public static void InitializeInLocalApplicationData(string name)
{
Initialize(Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
name,
"config.xml"
View PropertyChangedArgBenchmarks.cs
using System.ComponentModel;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Exporters;
using BenchmarkDotNet.Running;
[MemoryDiagnoser]
[MarkdownExporter]
public class PropertyChangedArgBenchmarks
{
@distantcam
distantcam / CUI.cs
Last active Feb 14, 2017
CUI - A simple Console UI
View CUI.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using static System.Console;
using static System.ConsoleColor;
namespace CUI
{
public class ConsoleApplication<TScreen>
View Puzzle.cs
using System;
using System.Threading.Tasks;
class Program
{
static void Main()
{
Util.Method(() => ActionMethod());
Util.Method(ActionMethod); // Error CS0121 The call is ambiguous between the following methods or properties: 'Util.Method(Action)' and 'Util.Method(Func<Task>)'
}
You can’t perform that action at this time.