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 bool IsValidEmail(string email) | |
{ | |
if (string.IsNullOrWhiteSpace(email)) | |
return false; | |
try | |
{ | |
// Normalize the domain | |
email = Regex.Replace(email, @"(@)(.+)$", DomainMapper, | |
RegexOptions.None, TimeSpan.FromMilliseconds(200)); |
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
using System; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
DateTime assignDateStart = DateTime.Now.AddDays(5).Date; | |
DateTime assignDateEnd = DateTime.Now.AddDays(6).Date; | |
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
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env | |
WORKDIR /app | |
# Copy everything | |
COPY . ./ | |
# Restore as distinct layers | |
RUN dotnet restore | |
# Build and publish a release | |
RUN dotnet publish -c Release -o 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
$ ECR Login | |
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin {{Your_ECR_Url}} | |
# example | |
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 084965179264.dkr.ecr.ap-southeast-1.amazonaws.com | |
# Docker Build | |
docker build -t helloworld:v1 . | |
#example | |
docker build -t {{image_name}}:{{version}} . |