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
# Docker image with msssql 2022 with full text search enabled | |
# based on work in: https://github.com/Microsoft/mssql-docker | |
# Base OS layer: Latest Ubuntu LTS | |
FROM --platform=linux/amd64 ubuntu:focal | |
# Install prerequistes since it is needed to get repo config for SQL server | |
RUN export DEBIAN_FRONTEND=noninteractive && \ | |
apt-get update && \ | |
apt-get install -yq curl apt-transport-https gnupg && \ |
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; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Text.RegularExpressions; | |
using Microsoft.EntityFrameworkCore.Migrations; | |
// This class uses extensions from Nuget package https://www.nuget.org/packages/OLT.Extensions.General |
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
public class EstimatedJurJson | |
{ | |
public int RegYear { get; set; } | |
public int Distance { get; set; } | |
} |
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
this.GetType().Implements<IMyInterface>() | |
this.GetType().Implements(typeof(IMyInterface<>)) | |
this.GetType().Implements(typeof(IMyInterface<,>)) |
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 regexIso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; | |
function convertDateStringsToDates(input) { | |
// Ignore things that aren't objects. | |
if (typeof input !== "object") return input; | |
//console.log("transforming", input); | |
for (var key in input) { | |
if (!input.hasOwnProperty(key)) continue; |
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
/** | |
* Calculate Age in C# | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2013, Faisalman <[email protected]> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
using System; |
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
public class UnhandledExceptionFilter : ExceptionFilterAttribute { | |
public override void OnException(HttpActionExecutedContext context) { | |
Elmah.ErrorLog.GetDefault(HttpContext.Current).Log(new Elmah.Error(context.Exception)); | |
} | |
} |