Skip to content

Instantly share code, notes, and snippets.

@JakeGinnivan
JakeGinnivan / gist:9247018
Created February 27, 2014 09:29
VSTest.Console
Extensions/*
ActivateApplication.exe
EntityFramework.dll
Microsoft.TeamFoundation.TestPlatform.Client.dll
Microsoft.TestTools.Cpp.targets
Microsoft.VisualStudio.MSTest.TestWindow.dll
Microsoft.VisualStudio.TestPlatform.BuildTasks.dll
Microsoft.VisualStudio.TestPlatform.Client.dll
Microsoft.VisualStudio.TestPlatform.Common.dll
Microsoft.VisualStudio.TestPlatform.Core.dll
@xcud
xcud / SimpleGAC.cs
Created February 5, 2013 12:58
A simple wrapper for GAC.cs from Microsoft KB Article KB317540
// System.GAC (a .Net wrapper for Fusion) implementation was too messy. Simplified here.
//
// Note, installing an assembly with the REFRESH flag specified does NOT work as advertised.
// Overwriting old GAC'd assemblies must be done manually as implemented below.
//
using System.Reflection;
using System.Text;
namespace Xcud.System.GAC
@LuciferSam86
LuciferSam86 / network drive to UNC.cs
Last active July 14, 2020 13:08
Converting a mapped drive letter to a network path using C#
// Source: https://www.wiredprairie.us/blog/index.php/archives/22
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;
namespace WiredPrairie.Samples
@SeargeDP
SeargeDP / ScriptEngine.cs
Last active July 18, 2022 15:54
Sandboxed scripting environment for C# based on Mono.CSharp for .NET 3.5 (works in Unity3D projects)
// Written by Michael 'Searge' Stoyke in 03/2015
// Released as public domain, do whatever you want with it!
using System;
using System.IO;
using System.Reflection;
using System.Text;
using Mono.CSharp;
namespace GameLibrary {
@nitred
nitred / optimal_mtu.md
Last active March 21, 2024 22:52
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active March 29, 2024 00:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example