View AutocompleteTextbox.css
This file contains 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
/* Hide the bootstrap dropdown-menu if it has no children */ | |
.dropdown-menu:empty { | |
display: none !important; | |
} |
View settings.json
This file contains 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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"alwaysShowTabs" : true, | |
"copyOnSelect" : false, | |
"defaultProfile" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
View asp-dot-net-identity-to-asp-dot-net-core-identity-migration-script.sql
This file contains 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
-- STEP 1 : Change name of existing tables | |
EXEC sp_rename 'AspNetRoles', 'AspNetRoles_old'; | |
EXEC sp_rename 'AspNetUserClaims', 'AspNetUserClaims_old'; | |
EXEC sp_rename 'AspNetUserLogins', 'AspNetUserLogins_old'; | |
EXEC sp_rename 'AspNetUserRoles', 'AspNetUserRoles_old'; | |
EXEC sp_rename 'AspNetUsers', 'AspNetUsers_old'; | |
View arm-template.json
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"cosmosAccountName": { | |
"type": "string" | |
} | |
}, | |
"variables": { | |
"cosmosDbApiVersion": "2015-04-08" |
View profile.ps1
This file contains 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
### | |
## NOTE: This assumes the folliwng: | |
## - PS 5.x | |
## - posh-git (https://github.com/dahlbyk/posh-git) 1.x is installed | |
### | |
### | |
## Helper Functions | |
### |
View RateLimitingHandler.cs
This file contains 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.Net; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace MyApi.Infrastructure | |
{ | |
public class RateLimitingHandler : DelegatingHandler | |
{ | |
private const string RateLimitHeaderName = "X-MyApi-Rate-Limit-Remaining"; |
View Program.cs
This file contains 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 Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.RetryPolicies; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AzureStorageRetry | |
{ |
View ExponentialBackoff.cs
This file contains 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
var resource = new MyRemoteResource(); | |
int initialRetryInterval = 2000; // 2 seconds | |
int maxAttempts = 5; | |
int currentRetryInterval = initialRetryInterval; | |
// If the connection fails then we'll try reconnecting a maximum number of 5 times | |
// before throwing the exception. The interval between retries will double each time. | |
for(int i = 1; i <= maxAttempts; i++) | |
{ |
View Cache.cs
This file contains 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 Newtonsoft.Json; | |
using StackExchange.Redis; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Web; | |
namespace CacheAsideDemo.Data | |
{ |
View Sample.cs
This file contains 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
#region IDisposable Implementation | |
private bool disposed; | |
public void Dispose() | |
{ | |
Dispose(true); | |
GC.SuppressFinalize(this); | |
} | |
protected virtual void Dispose(bool disposing) |