// https://dlang.org/changelog/2.101.0.html#logger
static if(__traits(compiles, (){ import std.logger; } )) {
import std.logger;
} else {
// logger was in 'std.experimental' for a long time but you could optionally check that too
import std.experimental.logger;
}| $baseUrl = 'http://api.domain.com/some-service/' | |
| Get-ChildItem -Path ".\*.jpg" | Sort-Object Name | % { | |
| $response = try { | |
| Invoke-RestMethod -uri "$baseUrl/image" -Method Post -Infile $_.Name -ContentType 'image/jpeg' -ErrorAction Stop | |
| } catch [System.Net.WebException] { | |
| Write-Error "Media Service returned $($_.Exception.Response.StatusCode.Value__) : $($_.Exception.Message)" | |
| Exit 1; | |
| } |
| # Amazon Linux with Amazon Corretto and the aws-cli tools for use in the UK (Amazon Linux uses yum) | |
| FROM amazon/aws-cli:latest | |
| # Set the default region for aws-cli | |
| RUN mkdir /root/.aws && echo -e "[default]\nregion = eu-west-1" >> /root/.aws/config | |
| # Set the locale to UK | |
| ENV LANG en_GB.UTF-8 | |
| ENV LANGUAGE en_GB:en | |
| ENV LC_ALL en_GB.UTF-8 |
CloudWatch is really powerful. As well as just searching your logs you can quickly aggregate and visualise data from your logs.
In this example we use a regex make a capture group for loglevel based on lines such as 2022-10-26T16:00:00.000Z ERROR something bad happened! then count how many times the logs contained a WARN or ERROR in the log file in a 30 minute interval. This query can be used in conjunction with the Visualization tab in CloudWatch (select Line from the dropdown).
With a little editing based on your use case, this query wiil help build an overview of your error rate
| import org.mockito.ArgumentMatcher; | |
| // javax.json:javax.json-api | |
| //import javax.json.Json; | |
| //import javax.json.JsonStructure; | |
| //import javax.json.stream.JsonGenerator; | |
| // jakarta.json:jakarta.json-api | |
| import jakarta.json.Json; | |
| import jakarta.json.JsonStructure; |
These instructions cover the following topics
- Generating/updating GPG keys
- Publishing GPG keys
- Adding GPG keys to GitHub
- Using GPG keys to sign git commits
- Using GPG keys to sign maven artifacts
- Publishing maven artifacts to OSSRH (Open Source Software Repository Hosting)
It's recommended to also read the following documentation
It's worth getting Doom 3 from the Steam store as it includes:
- The original DOOM 3
- Resurrection of Evil Expansion
- DOOM 3: BFG Edition
This guide assumes you are setting up AWS for the first time either for personal use of for a small business (couple of users). The steps will also scale to a large organisation but it's likely that you will want to think through a more complex structure for grouping users into accounts and the permissions they have.
From the top-right drop-down, select Billing and Cost Management, then Budgets, then Create budget. Here you can define a budget or use a premade template. When starting out you may want to try sticking to the Zero spend budget for example.