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
dotnet dev-certs https -ep "dev-cert.pfx" -p "d@nK3w1lhELm" | |
dotnet dev-certs https --trust |
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.AspNetCore.Http; | |
using Microsoft.AspNetCore.Routing; | |
namespace Example | |
{ | |
public class ByteRangesRouteConstraint : IRouteConstraint | |
{ | |
public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection) | |
{ | |
if (!values.TryGetValue("url", out var url) || url == null) |
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
DECLARE @t1 DATETIME; | |
DECLARE @t2 DATETIME; | |
SET @t1 = GETDATE(); | |
-- Query to measure | |
SET @t2 = GETDATE(); | |
SELECT DATEDIFF(millisecond,@t1,@t2) AS elapsed_ms; |
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
.easteregg { | |
animation: rainbow 1s infinite linear; | |
-moz-animation: rainbow 1s infinite linear; | |
-webkit-animation: rainbow 1s infinite linear; | |
-o-animation: rainbow 1s infinite linear; | |
-webkit-transition: color; | |
-moz-transition: color; | |
-o-transition: color; | |
transition: color | |
} |
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.Collections; | |
using System.Web; | |
using Elmah; | |
namespace Project | |
{ | |
/// <summary> | |
/// A custom implementation of the elamh provided <see cref="SqlErrorLog" />. | |
/// </summary> | |
public class CustomSqlErrorLog : SqlErrorLog |
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
class TaxonomySearchResult { | |
id: string; | |
label: string; | |
termSetId: string; | |
parentTermId: string; | |
constructor(resultValue: string) { | |
const informationParts = resultValue.split(";"); | |
for (let i = 0; i < informationParts.length; i++) { |
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
... | |
protected override void OnModelCreating(ModelBuilder builder) | |
{ | |
builder.Entity<User>().ForSqlServerToTable("Users"); | |
builder.Entity<IdentityRole>().ForSqlServerToTable("Roles"); | |
builder.Entity<IdentityUserRole<string>>().ForSqlServerToTable("UserRoles"); | |
builder.Entity<IdentityUserClaim<string>>().ForSqlServerToTable("UserClaims"); | |
builder.Entity<IdentityRoleClaim<string>>().ForSqlServerToTable("RoleClaims"); | |
builder.Entity<IdentityUserLogin<string>>().ForSqlServerToTable("UserLogins"); | |
builder.Entity<IdentityUserToken<string>>().ForSqlServerToTable("UserTokens"); |
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 Xamarin.Forms.Xaml; | |
[assembly: XamlCompilation(XamlCompilationOptions.Compile)] |
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
SELECT DB_NAME(database_id) AS DatabaseName, name AS LogicalFileName, physical_name AS PhysicalFileName | |
FROM sys.master_files AS mf |
NewerOlder