This file contains hidden or 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 void HumanFriendlyCode(string testString) | |
{ | |
var dt = $"{DateTime.UtcNow}:MMM-yy"; | |
var period = string.IsNullOrWhiteSpace(testString) | |
? dt | |
: $"{dt} {testString}"; | |
} |
This file contains hidden or 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 void EffectiveCode(string testString) | |
{ | |
var dt = DateTime.UtcNow; | |
var period = string.IsNullOrWhiteSpace(testString) | |
? $"{dt:MMM-yy}" | |
: $"{dt:MMM-yy} {testString}"; | |
} |
This file contains hidden or 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 void OriginalCode(string testString) | |
{ | |
var dt = DateTime.UtcNow; | |
var period = string.IsNullOrWhiteSpace(testString) ? $"{dt:MMM}-{dt:yy}" : $"{dt:MMM}-{dt:yy} {testString}"; | |
} |
This file contains hidden or 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
rem a simple commiter every 5 secons | |
:start | |
@echo off | |
timeout 5 > NUL | |
echo %time% | |
git add * | |
git commit -am "%time%" | |
goto start |
This file contains hidden or 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 void Zip() | |
{ | |
// An int array with 7 elements. | |
IEnumerable < int > numbers = new [] | |
{ | |
1, 2, 3, 4, 5, 6, 7 | |
}; | |
// A char array with 6 elements. | |
IEnumerable < char > letters = new [] | |
{ |
This file contains hidden or 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
using Akka.Actor; | |
using Akka.Event; | |
using ASimpleApiwithActor; | |
using System.Text; | |
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development"; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Configuration | |
.AddJsonFile("appsettings.json") |
This file contains hidden or 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
using Akka.Actor; | |
using Akka.Event; | |
using ASimpleApiwithActor; | |
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development"; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Configuration | |
.AddJsonFile("appsettings.json") | |
.AddJsonFile($"appsettings.{environment}.json", optional: true) |
This file contains hidden or 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
using System.Diagnostics; | |
using Akka.Actor; | |
using Akka.Cluster.Hosting; | |
using Akka.Event; | |
using Akka.Hosting; | |
using Akka.Routing; | |
using Akka.Remote.Hosting; | |
using ASimpleApiwithActor; | |
using Microsoft.EntityFrameworkCore; | |
using System.Collections.Concurrent; |
This file contains hidden or 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
using System.Diagnostics; | |
using Akka.Actor; | |
using Akka.Cluster.Hosting; | |
using Akka.Event; | |
using Akka.Hosting; | |
using Akka.Routing; | |
using Akka.Remote.Hosting; | |
using ASimpleApiwithActor; | |
using Microsoft.EntityFrameworkCore; | |
This file contains hidden or 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
using System.Diagnostics; | |
using Akka.Actor; | |
using Akka.Cluster.Hosting; | |
using Akka.Event; | |
using Akka.Hosting; | |
using Akka.Remote.Hosting; | |
using ASimpleApiwithActor; | |
using Petabridge.Cmd.Cluster; | |
using Petabridge.Cmd.Cluster.Sharding; | |
using Petabridge.Cmd.Host; |