Skip to content

Instantly share code, notes, and snippets.

View aidapsibr's full-sized avatar

AIDA aidapsibr

View GitHub Profile
@aidapsibr
aidapsibr / AzureCredentialSqlAuthenticationProvider.cs
Created February 14, 2021 00:21
Demonstrates replacing the Managed Identity authentication strategy to do custom authentication such as Azure CLI login as a fall-back.
using Azure.Core;
using Azure.Identity;
using Microsoft.Data.SqlClient;
using System.Threading.Tasks;
namespace Example
{
public class AzureCredentialSqlAuthenticationProvider : SqlAuthenticationProvider
{
public async override Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenticationParameters parameters)
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
#AZ CLI installed at the base layer so that Developer login works in debug mode
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
using System;
using Xunit;
using System.Threading;
using System.Threading.Tasks;
namespace Resiliency.Tests.Functions
{
using static ResilientOperation;
public class ResilientFunctionsReturnTests
using static ResilientOperation;
int failureCount = 0;
var result = await Try(() =>
{
// Fail 3 times
// return 404 (which is somehow transient, think getting a transient 404)
// after 4 retries finally get the correct value: 5 on iteration 5
I'm writing to let you know of this change in federal policy and the uncertainty it causes all transgender employees regarding fair and equitable access to not only gender-affirming care, but all care at discretion of insurers and providers.
https://www.npr.org/sections/health-shots/2020/06/12/868073068/transgender-health-protections-reversed-by-trump-administration
Additionally, any day we expect a ruling on a challenge of Title VII protections for gender identity and expression in the workplace from the Supreme Court in R.G. & G.R. Harris Funeral Homes Inc. v. Equal Employment Opportunity Commission
It would be very helpful to hear an official [your company] position on renewed commitment to protections, federal rollbacks aside.
Thanks for your consideration,
@aidapsibr
aidapsibr / nuget-cache-projects.yml
Created January 20, 2020 10:47
Example using actions/cache to create a cache for all nuget packages based on project files (assumes PackageReference is used)
- uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} #hash of project files
restore-keys: |
${{ runner.os }}-nuget-
@aidapsibr
aidapsibr / ssl-stacktrace
Created October 24, 2019 22:17
SSL failure ASPNETCORE Solus 4
dbug: Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets[6]
Connection id "0HLQOPU32O463" received FIN.
dbug: Microsoft.AspNetCore.Server.Kestrel[39]
Connection id "0HLQOPU32O464" accepted.
dbug: Microsoft.AspNetCore.Server.Kestrel[1]
Connection id "0HLQOPU32O464" started.
dbug: Microsoft.AspNetCore.Server.Kestrel[39]
Connection id "0HLQOPU32O465" accepted.
dbug: Microsoft.AspNetCore.Server.Kestrel[1]
Connection id "0HLQOPU32O465" started.
@aidapsibr
aidapsibr / SampleAggregateByResourceId.json
Last active March 26, 2019 06:25
Given an existing aggregate record, When an event is published, Then aggregate is updated by SUM
{
"subscriptionId" : "8758a65a-1e46-4468-a2e2-f80d4bdfba7c",
"resourceSetId" : "53d43eff-a5a2-41f1-a361-75b7c7b508bb",
"entityStatistics" : {
"folders" : {
"scanned" : 1,
"added" : 1,
"modified" : 0,
"deleted" : 0
},
@aidapsibr
aidapsibr / Psibr-CLA.md
Last active April 18, 2018 00:34
CLA for Psibernetic Solutions (Psibr)

Terms of the Agreement

This Contributor License Agreement (“Agreement”) is entered into between Donovan "Ovan" Crone (“Psibernetic Solutions,” “we” or “us” etc.) and you (as defined and further identified below). Accordingly, you hereby agree to the following terms for your past, present and future contributions submitted to Psibernetic Solutions:

1. Definitions:

(a) “You” (or “your”) shall mean the contribution copyright owner (whether an individual or organization) or legal entity authorized by the copyright owner that is making this Agreement with Psibernetic Solutions.

(b) “Contribution(s)” shall mean the code, documentation or other original works of authorship, including any modifications or additions to an existing work, submitted by you to Psibernetic Solutions for inclusion in, or documentation of, any of the products or projects owned or managed by Psibernetic Solutions (the “work(s)”). For the purposes of this definition, “submitted” means any form of electronic, verbal, or written comm

{Processing data from remote server outlook.office365.com failed with the following error message: <!DOCTYPE html>
<html>
<head>
<title>Runtime Error</title>
<meta name="viewport" content="width=device-width" />
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }