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
<div class="container"> | |
<h1>MYOB Status Page Concept</h1> | |
<div class="accordion"> | |
<dl> | |
<dt><a class="accordionTitle" href="#">MYOB Advanced</a></dt> | |
<dd class="accordionItem accordionItemCollapsed"> | |
<div class="accordionStatusItem itemN"><p>SYSTEM STATUS: NORMAL</p> | |
<br><p>2 days, 3 hours, 6 minutes and 11 seconds. </p></div> | |
<hr> | |
<div class="accordionStatusItem"><p>UPTIME OVERVIEW</p></div> |
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
public async Task<APIGatewayProxyResponse> FunctionHandlerException(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) | |
{ | |
return await new ChaosWrap<InjectException>().Execute(async () => | |
{ | |
var location = await GetCallingIP(); | |
var body = new Dictionary<string, string> | |
{ | |
{"message", "hello world"}, | |
{"location", location} | |
}; |
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
[InjectDelayPolicy] | |
public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest apigProxyEvent, | |
ILambdaContext context) | |
{ | |
var location = await GetCallingIP(); | |
var body = new Dictionary<string, string> | |
{ | |
{"message", "hello world"}, | |
{"location", location} | |
}; |
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
private static async Task<T> WrapAsync<T>(Func<object[], object> target, object[] args, string name) | |
{ | |
try | |
{ | |
return await new ChaosWrap<InjectException>().Execute<T>(() => (Task<T>) target(args)); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine($"Async method `{name}` throws {e.GetType()} exception."); | |
return 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
static void Main(string[] args) | |
{ | |
var prog = new Program(); | |
prog.MainAsync().Wait(); | |
} | |
private async Task MainAsync() | |
{ | |
var kmsClient = new AmazonKeyManagementServiceClient(RegionEndpoint.EUCentral1); |
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
#Requires -Modules @{ModuleName='AWSPowerShell.NetCore';ModuleVersion='3.3.343.0'} | |
$rulesRemoved = 0 | |
Get-EC2SecurityGroup | ForEach-Object -Process { | |
$securityGroupId = $_.GroupId | |
$_.IpPermission | ForEach-Object -Process { | |
if($_.ToPort -eq 3389) { |
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
Install-Module AWSLambdaPSCore -Scope CurrentUser | |
Get-AWSPowerShellLambdaTemplate | |
New-AWSPowerShellLambda -ScriptName RDPLockDown -Template Basic | |
Publish-AWSPowerShellLambda -ScriptPath .\RDPLockDown.ps1 -Name RDPLockDown -Region us-east-1 |
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
using Amazon.Lambda.Core; | |
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. | |
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] | |
namespace demoLambda | |
{ | |
public class Function | |
{ |
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
new Bucket(this, "MyFirstBucket", new BucketProps | |
{ | |
Versioned = true | |
}); |
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
using Amazon.S3; | |
using Amazon.S3.Model; | |
using System; | |
using System.Threading.Tasks; | |
namespace Amazon.DocSamples.S3 | |
{ | |
class UploadObjectTest | |
{ | |
private const string bucketName = "*** bucket name ***"; |
NewerOlder