I hereby claim:
- I am thepirat000 on github.
- I am thepirat000 (https://keybase.io/thepirat000) on keybase.
- I have a public key ASCP0JH2OxXK17p1mvdjeoSk0WvpF9dg5H5p_yk-kSbEvAo
To claim this, I am signing this object:
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <clear /> | |
| <rule name="Reverse Proxy Rewrite URL"> | |
| <match url="proxy/(.+)" /> | |
| <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> | |
| <action type="Rewrite" url="https://{R:1}" logRewrittenUrl="true" /> | |
| </rule> |
| public class InMemoryProducerDataProvider : AuditDataProvider | |
| { | |
| private readonly BlockingCollection<AuditEvent> _events; | |
| public int Count => _events.Count; | |
| public InMemoryProducerDataProvider() | |
| { | |
| _events = new BlockingCollection<AuditEvent>(); | |
| } |
| using Audit.Core; | |
| using Polly; | |
| using Polly.Fallback; | |
| namespace test | |
| { | |
| public static class FallbackActionArgumentsExtensions | |
| { | |
| public static async ValueTask<Outcome<object>> FallbackToDataProvider(this FallbackActionArguments<object> args, AuditDataProvider fallbackDataProvider) | |
| { |
| # Will JPEG compress (quality ~80%) and replace in-place all the images on the current folder and subfolders | |
| # Keeping the same image dimension, dates and metadata. | |
| # Will process only image files > 1MB | |
| $savedSpace = 0 | |
| $counter = 0 | |
| $tmpDir = "D:\tmp\img-proc\" | |
| if (-not(Test-Path $tmpDir)) { | |
| New-Item $tmpDir -ItemType Directory |
| # Kill all non-essential processes | |
| Add-Type -TypeDefinition @" | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| public static class WinProcess |
| # Install sber-swap pre-requisites for Windows 10 on an Azure VM of type NC (GPU) | |
| # NVIDIA TeslaK80 / Radeon | |
| Set-ExecutionPolicy Bypass -Scope Process -Force; | |
| # Install chocolatey | |
| iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); | |
| refreshenv |
I hereby claim:
To claim this, I am signing this object: