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
// PCL difference between devices | |
switch (Device.RuntimePlatform) | |
{ | |
case Device.iOS: | |
Padding = new Thickness(0, 20, 0, 0); | |
break; | |
case Device.Android: | |
Padding = new Thickness(0, 20, 0, 0); | |
break; | |
case Device.UWP: |
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
// Send mail c# | |
public static class Mail | |
{ | |
public const string Host = "smtp.gmail.com"; | |
//public const string Host = "exchange.tgroupcc.com"; | |
public static MailAddress FromAddress { get; set; } = new MailAddress("greeti.albania@gmail.com", "GREETi"); | |
public static string FromPassword { get; set; } = "Greeti2019"; | |
public static string Subject { get; set; } = "GREETi: You have visitors."; | |
public static async void SendMail(MailAddress toAddress, string visitor) |
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
1. Login | |
POST: https://172.28.150.60:8443/api/login | |
Body: | |
{ | |
"username": "", | |
"password": "", | |
"remember": true | |
} | |
2. Get all sites info |
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
// .NET CORE | |
CreateDefaultBuilder method functions: | |
1. Set up the web server | |
2. Load host and app configuration from config sources | |
3. Configure logging | |
AspNetCoreHostingModel: | |
1. OutOfProcess (default) |
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 ####### | |
docker build . // create image from the current directory | |
docker run -p 3000:3000 xxxxx // run the image, open up port 3000 in host and 3000 on container, xxxxx id of the image | |
docker ps // list running containers | |
docker ps -a // all | |
docker stop xxxxxxx // stop container xxxxxxx |