The following are examples of various features.
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
#!/usr/bin/env dotnet run | |
var builder = WebApplication.CreateBuilder(args); | |
var config = builder.Configuration; | |
var connString = config["connectionString"] ?? "Data Source=todos.db"; | |
builder.AddDbContext<TodoDb>(options => options.UseSqlite(connString)); | |
builder.AddSqlite<Todo>(connString) // Higher level API perhaps? | |
var app = builder.Build(); |
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; | |
using System.Threading; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.DependencyInjection; | |
/* | |
- Don't need to support different services per tenant. | |
- Tenant services lifetime outlasts the request. |
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
hostname elliot-01 | |
echo elliot-01 > /etc/hostname | |
bash | |
curl -fsSL https://get.docker.com | bash | |
docker version | |
docker ps | |
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
apt-get update | |
apt-get install kubelet kubectl kubeadm |
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.Buffers; | |
using System.IO.Pipelines; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Configuration; |
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
version: '3' | |
services: | |
sqlserver2019: | |
image: mcr.microsoft.com/mssql/server:2019-CTP3.1-ubuntu | |
environment: | |
ACCEPT_EULA: Y | |
SA_PASSWORD: SqlServer2019! | |
ports: | |
- "41434:1433" |
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/core/aspnet:2.2 AS base | |
WORKDIR /app | |
EXPOSE 80 | |
# DEBUG | |
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS debug | |
WORKDIR /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
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Hosting; | |
public class Program | |
{ | |
public static void Main(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => |
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
cd /home/<user>/ | |
sudo apt-get install unzip | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip sdk-tools-linux-4333796.zip -d Android | |
rm sdk-tools-linux-4333796.zip | |
sudo apt-get install -y lib32z1 openjdk-8-jdk | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
export PATH=$PATH:$JAVA_HOME/bin | |
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc | |
cd Android/tools/bin |
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 abstract class ValueObject<T> | |
where T : ValueObject<T> | |
{ | |
public override bool Equals(object obj) | |
{ | |
var valueObject = obj as T; | |
if (ReferenceEquals(valueObject, null)) | |
return false; | |
NewerOlder