I hereby claim:
- I am clintnetwork on github.
- I am clint_network (https://keybase.io/clint_network) on keybase.
- I have a public key ASCed7XJ6h4jKzYO2HcXiOF2U_LaHD0SqHsrpV81DfUEQQo
To claim this, I am signing this object:
| rm -rf quentin/chambre/* |
| public static Guid CreateCryptographicallySecureGuid() | |
| { | |
| using (var provider = new RNGCryptoServiceProvider()) | |
| { | |
| var bytes = new byte[16]; | |
| provider.GetBytes(bytes); | |
| return new Guid(bytes); | |
| } | |
| } |
| public static Guid CreateCryptographicallySecureGuid() | |
| { | |
| using (var provider = new RNGCryptoServiceProvider()) | |
| { | |
| var bytes = new byte[16]; | |
| provider.GetBytes(bytes); | |
| return new Guid(bytes); | |
| } | |
| } |
| public static bool SendConfirmationEmail(string emailAddress, string activationLink) | |
| { | |
| var client = new RestClient("https://api.sendinblue.com/v3/smtp/email"); | |
| var sendInBlueRequest = new RestRequest(Method.POST); | |
| sendInBlueRequest.AddHeader("api-key", "SENDINBLUE_API_KEY"); | |
| sendInBlueRequest.AddHeader("Accept", "application/json"); | |
| sendInBlueRequest.AddHeader("Content-Type", "application/json"); | |
| sendInBlueRequest.AddParameter("undefined", $"{{\"tags\":[\"Activate account for {{emailAddress}}\"],\"sender\":{{\"email\":\"[email protected]\",\"name\":\"You\"}},\"htmlContent\":\"\",\"replyTo\":{{\"email\":\"[email protected]\",\"name\":\"You\"}},\"templateId\":2,\"to\":[{{\"email\":\"{emailAddress}\",\"name\":\"{emailAddress}\"}}],\"params\":{{\"ActivationLink\":\"{activationLink}\"}}}}", ParameterType.RequestBody); | |
| var sendInBlueResponse = client.Execute(sendInBlueRequest); | |
| return sendInBlueResponse.IsSuccessful; |
| [Route("qr/{value}")] | |
| public IActionResult Qr(string value) | |
| { | |
| var memoryStream = new MemoryStream(); | |
| var qrGenerator = new QRCodeGenerator(); | |
| var qrCodeData = qrGenerator.CreateQrCode(value, QRCodeGenerator.ECCLevel.L); | |
| var qrCode = new QRCode(qrCodeData); | |
| qrCode.GetGraphic(20).Save(memoryStream, ImageFormat.Png); | |
| return File(memoryStream.ToArray(), "image/png"); | |
| } |
| sudo apt update && apt upgrade -y | |
| sudo apt install -y nginx git tmux iftop multitail nmap apt-transport-https certbot python-certbot-nginx curl | |
| wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg | |
| sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ | |
| wget -q https://packages.microsoft.com/config/debian/9/prod.list | |
| sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list | |
| sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg | |
| sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list | |
| sudo apt-get update | |
| sudo apt-get install -y dotnet-sdk-2.1 libgdiplus |
I hereby claim:
To claim this, I am signing this object:
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "yarn", | |
| "runtimeExecutable": "yarn", | |
| "runtimeArgs": [ | |
| "serve" |
| # run as 'nginx -p . -c ssl_proxy.config' | |
| daemon off; | |
| http { | |
| server { | |
| listen localhost:8443; | |
| server_name localhost; | |
| ssl on; | |
| ssl_certificate ../pooling-ui/certs/server.crt; |
| using System.Linq; | |
| using Microsoft.AspNetCore.Mvc.ApplicationModels; | |
| namespace MyProgram | |
| { | |
| public class ApiExplorerGetsOnlyConvention : IActionModelConvention | |
| { | |
| public void Apply(ActionModel action) | |
| { | |
| action.ApiExplorer.IsVisible = action.Controller.Attributes.Any(x => x.GetType() == typeof(Microsoft.AspNetCore.Mvc.ApiControllerAttribute)); |