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
http://anthonygiretti.com/2018/09/06/how-to-unit-test-a-class-that-consumes-an-httpclient-with-ihttpclientfactory-in-asp-net-core/ |
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
//source: https://www.codit.eu/blog/writing-tests-for-azure-event-grid/ | |
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"EventGrid.Topic.Name": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the custom Azure Event Grid topic" | |
} |
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
declare @TableName sysname = 'TableName' | |
declare @Result varchar(max) = 'public class ' + @TableName + ' | |
{' | |
select @Result = @Result + ' | |
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } | |
' | |
from | |
( | |
select |
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
https://docs.microsoft.com/en-us/aspnet/core/signalr/publish-to-azure-web-app?view=aspnetcore-3.1 | |
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-apps/?view=aspnetcore-3.1&tabs=visual-studio#deploy-aspnet-core-preview-release-to-azure-app-service |
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
namespace LuceneExample | |
{ | |
#region Namespaces | |
using System; | |
using System.Globalization; | |
using Lucene.Net.Analysis.Standard; | |
using Lucene.Net.Documents; | |
using Lucene.Net.Index; |
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
DECLARE @LAT VARCHAR(10) | |
DECLARE @LONG VARCHAR(10) | |
DECLARE @GEO2 GEOGRAPHY | |
DECLARE @LAT_B VARCHAR(10) | |
DECLARE @LONG_B VARCHAR(10) | |
SET @LAT='29.0' | |
SET @LONG='-95.612528' |
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
//sample.js | |
window.onload = function () { | |
var setInnerHTML = function (elm, html) { | |
elm.innerHTML = html; | |
Array.from(elm.querySelectorAll("script")).forEach(oldScript => { | |
const newScript = document.createElement("script"); | |
Array.from(oldScript.attributes) | |
.forEach(attr => newScript.setAttribute(attr.name, attr.value)); | |
newScript.appendChild(document.createTextNode(oldScript.innerHTML)); |
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
apiVersion: v1 | |
# The type of workload we are creating | |
kind: Service | |
metadata: | |
# Name of Service - Required | |
name: aks-web-app-service | |
# Specific details about the Service | |
spec: | |
# Type of Service to be deployed | |
type: LoadBalancer |
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
apiVersion: apps/v1 | |
# The type of workload we are creating | |
kind: Deployment | |
metadata: | |
# Name of deployment - Required | |
name: aks-web-app-deployment | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
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
using System; | |
using System.Linq.Expressions; | |
namespace Sample | |
{ | |
public class GenericSpecification<T> | |
{ | |
public Expression<Func<T, bool>> Expression { get; } | |
public GenericSpecification(Expression<T, bool> expression) |