This file contains hidden or 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
function getAadToken(user, password, identifier) { | |
return puppeteer.launch({ headless: true }).then(async browser => { | |
try { | |
const page = await browser.newPage(); | |
await page.goto("SITEURL"); | |
await page.click( | |
"LOGINBUTTON" | |
); |
This file contains hidden or 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 inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' <REPLACE_WITH_CONTAINERID> |
This file contains hidden or 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 ps |
This file contains hidden or 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 run -d -p 8081:8081 api |
This file contains hidden or 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 images |
This file contains hidden or 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 build -t api . |
This file contains hidden or 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
# escape=` | |
FROM microsoft/iis | |
SHELL ["powershell", "-command"] | |
# Install .NET | |
RUN Install-WindowsFeature NET-Framework-45-ASPNET; ` | |
Install-WindowsFeature Web-Asp-Net45 | |
# Configure Website |
This file contains hidden or 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
var b = new byte[32]; | |
new Random().NextBytes(b); | |
Console.WriteLine(Convert.ToBase64String(b)); |
This file contains hidden or 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
Func<Tin, Tout> CreateSelectStatement<Tin, Tout>(string fields) | |
{ | |
var xParameter = Expression.Parameter(typeof(Tout), "o"); | |
var xNew = Expression.New(typeof(Tout)); | |
var bindings = fields.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(o => o.Trim()).Select(o => | |
{ | |
var mi = typeof(Tout).GetProperty(o); | |
var xOriginal = Expression.Property(xParameter, mi); | |
return Expression.Bind(mi, xOriginal); | |
}); |