Skip to content

Instantly share code, notes, and snippets.

@citizenmatt
citizenmatt / .ideavimrc
Created September 4, 2019 19:23
.ideavimrc file
" See runtime/defaults.vim
" vim 8.0+ adds runtime/defaults.vim that gets loaded if there is no .vimrc
set history=200
set scrolloff=5
set incsearch
set nrformats-=octal
" vim-sensible settings that work in IdeaVim
@citizenmatt
citizenmatt / UdpTest.cs
Created May 20, 2019 18:53
Unity UDP broadcast listener
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
namespace UdpTest
{
internal class Program
@citizenmatt
citizenmatt / stats.ps1
Last active February 1, 2023 08:50
Unity YAML file stats
# Count of .cs.meta files. Prefab, scene and asset file counts can be inferred from file lists
# Yeah, this is ugly. Don't care, you're only going to run it once
Write-Output "*.cs.meta: $((Get-ChildItem -recurse -filter *.cs.meta).Count)"
# Individual sizes of .unity, .prefab and .asset files
$results = Get-ChildItem -recurse | where {$_.extension -in ".unity", ".prefab", ".asset"} | Select-Object Name, Extension, Length
$results | Sort-Object -Property Extension | Out-Host
# | Out-File $destination
@citizenmatt
citizenmatt / grammar.md
Created January 5, 2018 18:47
YAML Grammar
title
YAML Spec

  1. c-printable ::= ...
  2. nb-json ::= #x9 | [#x20-#x10FFFF]
  3. c-byte-order-mark ::= #xFEFF
@citizenmatt
citizenmatt / Whatever.sln
Last active June 24, 2016 13:58
Sample solution and .xproj file for .net core RC2
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Whatever", "Whatever\Whatever.xproj", "{A2B3B3E1-6D88-4BF8-A709-4F2F3296E21E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@citizenmatt
citizenmatt / cc.cs
Created April 22, 2016 10:58
Cyclomatic Complexity testing
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CyclomaticComplexityTest
{
class Result
{

Keybase proof

I hereby claim:

  • I am citizenmatt on github.
  • I am citizenmatt (https://keybase.io/citizenmatt) on keybase.
  • I have a public key ASAtfaQASdAEkt3Is_SoaicG6Ws2-pcbM_VWR5yFATcx4wo

To claim this, I am signing this object:

@citizenmatt
citizenmatt / deduplicate_references.proj
Created January 19, 2016 11:14
De-duplicate msbuild references
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- For some reason, msbuild will sometimes duplicate all references in @(ReferencePath),
which, given a particularly meaty nuget package (*cough*JetBrains.ReSharper.SDK*cough*),
can overwhelm the command line. This little hack will de-duplicate references to
reduce the pressure, but it's still going to hurt at some point...
I'd really like to figure out why msbuild is duplicating. Given a simple test with
just e.g. nunit, it works as expected. Perhaps it's something to do with the ReSharper
SDK nuget, but I can't see it -->
<PropertyGroup>
@citizenmatt
citizenmatt / corefx_build.log
Created February 5, 2015 09:29
Console output when running build.cmd for dotnet/corefx
Restoring build tools...
Restoring all package dependencies...
Restoring all package dependencies...
C:\Users\matt\Code\forks\GitHub\dotnet\corefx\packages\Microsoft.DotNet.BuildTools.1.0.22-prerelease\lib\packageresolve.targets(25,5): warning : Unable to resolve the assets of System.Runtime: Couldn't find a matching group [C:\Users\matt\Code\forks\GitHub\dotnet\corefx\src\Microsoft.Win32.Primitives\src\Microsoft.Win32.Primitives.csproj]
C:\Users\matt\Code\forks\GitHub\dotnet\corefx\packages\Microsoft.DotNet.BuildTools.1.0.22-prerelease\lib\packageresolve.targets(25,5): warning : Unable to resolve the assets of System.Runtime.InteropServices: Couldn't find a matching group [C:\Users\matt\Code\forks\GitHub\dotnet\corefx\src\Microsoft.Win32.Primitives\src\Microsoft.Win32.Primitives.csproj]
C:\Users\matt\Code\forks\GitHub\dotnet\corefx\packages\Microsoft.DotNet.BuildTools.1.0.22-prerelease\lib\packageresolve.targets(25,5): warning : Unable to resolve the assets of System.Resources.ResourceManager: Couldn't
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>SpecsFor.Templates</id>
<title>SpecsFor File &amp; Live Templates</title>
<version>2.0.0</version>
<authors>Matt Honeycutt</authors>
<owners>Matt Honeycutt</owners>
<licenseUrl>https://github.com/MattHoneycutt/SpecsFor/blob/master/LICENSE.md</licenseUrl>
<projectUrl>http://specsfor.com/</projectUrl>