π¦
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
\.(?:ToList|ToArray)\(\)\s*\.|Select\(. => [^)]*\)|ForEach\(. => [^)]*\)|(?:ToList|ToArray)\(\)\s*\.Count > 0 | |
// https://www.youtube.com/live/LaoRkzSE5tI?si=uejA0fmTeNj_1a9- |
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
#!/bin/sh | |
# -------------------------------------------------------- | |
# Run Elasticsearch and Kibana for local testing | |
# Note: do not use this script in a production environment | |
# -------------------------------------------------------- | |
# | |
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | |
# or more contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright | |
# ownership. Elasticsearch B.V. licenses this file to you under |
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
#!/bin/bash | |
REPOSITORIES=( | |
cloud.analytics | |
cloud.applications | |
) | |
BRANCH=main | |
for REPOSITORY in ${REPOSITORIES[*]} | |
do |
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
#!/bin/bash | |
REGISTRY={{name}} | |
REPOSITORIES=$(az acr repository list --name $REGISTRY --output tsv | grep '^prefix') | |
for REPOSITORY in ${REPOSITORIES[*]} | |
do | |
echo ======================================================================= | |
echo Creating task for repository: $REPOSITORY | |
echo ======================================================================= | |
PURGE_CMD="acr purge --filter '$REPOSITORY:.*' --ago 7d --untagged --keep 7" |
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
private static X509Certificate2 LoadCertificate(string certName) | |
{ | |
using var store = new X509Store(StoreLocation.CurrentUser); | |
store.Open(OpenFlags.ReadOnly); | |
var certificateCollection = store.Certificates.Find(X509FindType.FindBySubjectName, certName, false); | |
if (certificateCollection.Count == 0) | |
{ | |
throw new Exception($"No matching certificate found for subject '{deviceName}'"); | |
} |
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
// Example for question https://stackoverflow.com/questions/53488184/asp-net-core-controllers-route-attribute-inheritance-and-abstract-controllers-ac#53488184 | |
public abstract class BaseApiController : Controller | |
{ | |
[HttpGet] | |
[Route("")] | |
public virtual IActionResult GetAll() | |
{ | |
return Ok("GetAll action from base"); | |
} |