Skip to content

Instantly share code, notes, and snippets.

View michael-wolfenden's full-sized avatar

Michael Wolfenden michael-wolfenden

View GitHub Profile
@michael-wolfenden
michael-wolfenden / launch.bat
Created October 3, 2017 22:36
ConEmu launch multiple consoles #ConEmu
@echo off
start D:\utils\conEmu\ConEmu64.exe -cmdlist ^
D:\dev\TicketSolutions.OnlineOutlet\src\TicketSolutions.OnlineOutlet.Service\bin\Debug\net461\TicketSolutions.OnlineOutlet.Service.exe -cur_console:f:t:"Outlet-Service" ^|^|^| ^
D:\dev\TicketSolutions.OnlineOutlet\src\TicketSolutions.OnlineOutlet.Web\bin\Debug\net461\TicketSolutions.OnlineOutlet.Web.exe -cur_console:f:t:"Outlet-Web" ^|^|^| ^
D:\dev\TicketSolutions.Bank\src\TicketSolutions.Bank.Service\bin\Debug\net461\TicketSolutions.Bank.Service.exe -cur_console:f:t:"Bank-Service" ^|^|^| ^
D:\dev\TicketSolutions.Bank\src\TicketSolutions.Bank.Web\bin\Debug\net461\TicketSolutions.Bank.Web.exe -cur_console:f:t:"Bank-Web" ^|^|^| ^
D:\dev\TicketSolutions.Reservations\src\TicketSolutions.Reservations.Service\bin\Release\net461\TicketSolutions.Reservations.Service.exe -cur_console:f:t:"Reservations-Service" ^|^|^| ^
D:\dev\TicketSolutions.Fulfillment\src\TicketSolutions.Fulfillment.Service\bin\Release\net461\TicketSolutions.Fulfillment.Service.exe -cur_consol
@michael-wolfenden
michael-wolfenden / TestHelper.cs
Created September 26, 2017 02:32 — forked from sinairv/TestHelper.cs
String Comparison Unit Test Helper
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, DiffStyle.Full, Console.Out);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, DiffStyle diffStyle)
{
ShouldEqualWithDiff(actualValue, expectedValue, diffStyle, Console.Out);
// 2147483647 -> 8fs-Kx
public static class ShortUrl
{
// removed ambiguous characters ('I', 'l', '1', 'O' and '0')
// removed vowels (to prevent offensive words)
public static readonly string Alphabet = "23456789bcdfghjkmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ-_";
public static readonly int Base = Alphabet.Length;
public static string Encode(int toEncode)
{
@michael-wolfenden
michael-wolfenden / javascript.json
Last active October 23, 2015 03:35
turbo-javascript snippets for vscode
{
//////////////////////////////////////////////////////////////////////
// ASYNC
//////////////////////////////////////////////////////////////////////
"Node callback": {
"prefix": "cb",
"body": [
"function (err, ${1:value}) {$0}"
]
},
@michael-wolfenden
michael-wolfenden / index.js
Last active October 8, 2015 01:43
Node - Simple round robin load balancer
// cmd> node index.js
// requests to port 8080 will round robin between ports 8081 & 8082
var http = require('http');
var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer();
var servers = [
'http://127.0.0.1:8081',
'http://127.0.0.1:8082'
# Type(<scope>): <subject>
# <body>
# <footer>
# Type should be one of the following:
# * feat (new feature)
# * fix (bug fix)
# * docs (changes to documentation)
# * style (formatting, missing semi colons, etc; no code change)
# * refactor (refactoring production code)