This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
////////////////////////////////////////////////////////////////////// | |
// ASYNC | |
////////////////////////////////////////////////////////////////////// | |
"Node callback": { | |
"prefix": "cb", | |
"body": [ | |
"function (err, ${1:value}) {$0}" | |
] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it --rm -v ${PWD}:/src -w /src node:8.6.0-alpine /bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See list of docker virtual machines on the local box | |
$ docker-machine ls | |
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS | |
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1 | |
# Note the host URL 192.168.99.100 - it will be used later! | |
# Build an image from current folder under given image name | |
$ docker build -t gleb/demo-app . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Query Kind="Program"> | |
<NuGetReference>Microsoft.AspNetCore</NuGetReference> | |
<NuGetReference>Microsoft.AspNetCore.Mvc.Core</NuGetReference> | |
<NuGetReference>Microsoft.AspNetCore.Mvc.Formatters.Json</NuGetReference> | |
<NuGetReference>System.ValueTuple</NuGetReference> | |
<Namespace>Microsoft.AspNetCore</Namespace> | |
<Namespace>Microsoft.AspNetCore.Builder</Namespace> | |
<Namespace>Microsoft.AspNetCore.Hosting</Namespace> | |
<Namespace>Microsoft.AspNetCore.Mvc</Namespace> | |
<Namespace>Microsoft.Extensions.DependencyInjection</Namespace> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Query Kind="Program"> | |
<Namespace>System.Globalization</Namespace> | |
</Query> | |
void Main() | |
{ | |
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); //Separate double digits with dot not comma - please! | |
var data = new[] {22.61, 22.59, 22.63, 22.60, 22.62, 22.58, 22.61, 22.62, 22.60, 22.64, 22.69, 22.62, 22.65, 22.62, 22.61, 22.65, 22.63, 22.61, 22.65, 22.63, 22.59, 22.62, 22.59, 22.64, 22.58, 22.61, 22.63, 22.61, 22.61, 22.69, 22.62, 22.59, 22.65, 22.65, 22.64, 22.63, 22.63, 22.63, 22.59, 22.61, 22.67, 22.57, 22.60, 22.61, 22.61, 22.61, 22.60, 22.61, 22.64, 22.62, 22.63, 22.67, 22.65, 22.65, 22.61, 22.63, 22.63, 22.61, 22.62, 22.69, 22.62, 22.59, 22.59, 22.61, 22.61, 22.58, 22.61, 22.65, 22.61, 22.63, 22.68, 22.62, 22.64, 22.62, 22.62, 22.64, 22.64, 22.63, 22.65, 22.61, 22.60, 22.63, 22.59, 22.62, 22.61, 22.59, 22.63, 22.62, 22.60, 22.69, 22.62, 22.61, 22.63, 22.65, 22.64, 22.63, 22.63, 22.65, 22.58, 22.60}; | |
RenderLineGraph("Time", "P1", data); |
OlderNewer