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
import json | |
from datetime import datetime | |
from typing import List | |
from fastapi import FastAPI, Request, HTTPException | |
from starlette.responses import JSONResponse | |
import httpx | |
app = FastAPI() | |
BLACKLIST_PATHS: List[str] = [ |
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
function Test-DnsResolve($name, $server) { | |
<# | |
.SUMMARY | |
DNS Resolver tester | |
.PARAMETER Name | |
The host name to resolve | |
.PARAMETER Server | |
The DNS Server to be used | |
#> |
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
function Get-PasswordComplexity { | |
<# | |
.SYNOPSIS | |
Testing if a given password is complex | |
.DESCRIPTION | |
Based on the given SecureString or Credential the function tests if the password used is complex enough. | |
The complexity is calculated based on the number of character classes use in the password. | |
The classes are lower case letter, upper case letters, numbers and special characters. | |
Each class gets a complexity point and the password must include at least 3 classes. |
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
# Description: Boxstarter Script | |
# Author: Jess Frazelle <[email protected]> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
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
// method was added to the Action.cs in the sample | |
// https://github.com/Azure-Samples/MipSdk-Dotnet-File-Quickstart/blob/master/mip-sdk-dotnet-quickstart/Action.cs | |
public bool SetProtection(FileOptions options) | |
{ | |
try | |
{ | |
var handler = CreateFileHandler(options); | |
var newRights = new List<UserRights> | |
{ |
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
# Setup | |
Import-Module WebAdministration | |
# create 2 site root directories | |
$a = 'C:\inetpub\AspNetCoreSampleA' | |
$b = 'C:\inetpub\AspNetCoreSampleB' | |
$siteRoot = 'C:\inetpub\aspnetcoresample' | |
$siteName = 'AspNetCoreSample' | |
$poolName = "aspnetcore" | |
New-Item -Type Directory $a | |
New-Item -Type Directory $b |
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
<Query Kind="Program"> | |
<NuGetReference Prerelease="true">Microsoft.Diagnostics.Runtime</NuGetReference> | |
<Namespace>Microsoft.Diagnostics.Runtime</Namespace> | |
<Namespace>System</Namespace> | |
<Namespace>System.IO</Namespace> | |
<Namespace>System.Linq</Namespace> | |
<Namespace>System.Text</Namespace> | |
<Namespace>Microsoft.Diagnostics.Runtime.Utilities</Namespace> | |
</Query> |
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
javascript:void !function(e,t,n,r,i,s){while(n--&&(i=t[n])>e);s=r.style,s.position="fixed",s.zIndex=-1>>>1,s.top=s.left="50%",s.marginTop=s.marginLeft=i/-2+"px",r.src="http://chart.apis.google.com/chart?cht=qr&chld=H|0&chs="+i+"x"+i+"&chl="+escape(location)}(Math.min(top.innerHeight,top.innerWidth),[100,150,200,250,300,350,400,500],8,document.body.appendChild(new Image)) |
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
[CmdletBinding()] | |
param( | |
[switch] | |
$Update | |
) | |
if ($update.IsPresent -and $Update){ | |
Write-Warning "running in update mode will not delete existing folders which might lead to issues" | |
} | |
else { | |
Write-Warning "Running in the default clean install mode. Slower but the safest option!" |
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
########################################################### | |
# | |
# 'PSDesiredStateConfiguration' logic module | |
# | |
########################################################### | |
data LocalizedData | |
{ | |
# culture="en-US" | |
ConvertFrom-StringData -StringData @' | |
CheckSumFileExists = File '{0}' already exists. Please specify -Force parameter to overwrite existing checksum files. |