https://aka.ms/aspnetcore-makeover
- Intro (goals/non-goals/what you'll learn)
- Pick The Right Starting Template
- Web Application (no auth)
- Web API
- SPA
<Target Name="AfterBuild"> | |
<Message Text="@(Content)" Importance="high" Condition="%(Content.Extension) == '.sql'" /> | |
<Error Condition="%(Content.Extension) == '.sql'" Text="Nothing should be marked as Content, check your scripts are marked as Embedded Resource" /> | |
</Target> |
namespace Owin | |
{ | |
using System; | |
using System.Globalization; | |
using System.Threading; | |
using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>; | |
using MidFunc = System.Func< | |
System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>, | |
System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task> | |
>; |
var ClientSecret = "kSRsdf7rU323rf2ff2gfdssfdAnKI1mcOf98djfidIGx38="; // A key you add for your AAD app. | |
var ClientId = "17dfab36-1c33-4ffe-9ddd-533ddddfs378"; // The unique identifier for your AAD app.. | |
var userObjectId = "12345667-1234-1234-1234-123412341234"; // LET'S SAY YOU WANNA GET A USER'S GROUPS... You'll need their ObjectId for querying later. | |
var authority = "https://login.microsoftonline.com/{tenant guid}/oauth2/authorize?api-version=1.0"; // This is the "OAuth Authorize" Endpoint for your AAD app. | |
var authContext = new AuthenticationContext(authority); | |
// Graph endpoint comes from Azure Portal "Graph Connection Endpoint" | |
var client = new ActiveDirectoryClient(new Uri("https://graph.windows.net/{tenant guid}"), () => |
using System; | |
using System.Linq; | |
using Conventional; | |
using Conventional.Conventions; | |
namespace ConventionTests | |
{ | |
public class PropertyNamesOfTypeMustEndWith : ConventionSpecification | |
{ | |
private readonly Type _type; |
# The following won't work as-is, I use '<>' to denote variables you need to replace, including a name so you can keep them straight! | |
# A list of all of them, for searching follows. | |
# app_directory | |
# app_name | |
# ssl_password | |
# ssl_name | |
#base machine is meant to contain IIS as well as asp/.net requirements | |
FROM microsoft/aspnet | |
#Expose port 443 to allow incoming traffic over the default HTTPS port |
https://aka.ms/aspnetcore-makeover
// convert a key string to camelcase | |
function toCamelCase(str) { | |
// when str is not define reuturn | |
if (!str) { | |
return str; | |
} | |
let letters = str.split(""); | |
let idx = letters.indexOf("_"); | |
while (idx > -1) { |
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
// node --experimental-repl-await ./repl.js | |
// OLD API (See below for a newer one) | |
const repl = require('repl'); | |
const playwright = require('playwright'); | |
const config = { | |
headless: false, | |
args: [ | |
// https://tink.uk/playing-with-the-accessibility-object-model-aom/ | |
'--enable-blink-features=AccessibilityObjectModel', | |
], |