Skip to content

Instantly share code, notes, and snippets.

View jkljajic's full-sized avatar

Jovo Kljajic jkljajic

View GitHub Profile
@jkljajic
jkljajic / mssqld-auth.conf
Created December 17, 2017 13:56
fail2Ban filter for MSSQL LInux
# Fail2Ban filter for unsuccesfull MSSQL authentication attempts
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
@marisks
marisks / CreatedAndModifiedDateInterceptor.cs
Created February 27, 2016 06:46
Entity Framework soft delete, modiefied and created date interceptors
using System;
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure.Interception;
using System.Linq;
public class CreatedAndModifiedDateInterceptor : IDbCommandTreeInterceptor
{
public const string CreatedColumnName = "Created";
public const string ModifiedColumnName = "Modified";
@duncansmart
duncansmart / MailgunUtil.cs
Last active October 20, 2022 06:19
C# implementation of "Securing Webhooks" sample code https://documentation.mailgun.com/user_manual.html#webhooks
using System;
using System.Text;
using System.Security.Cryptography;
class MailgunUtil
{
/// <summary>
/// Authenticates incoming requests to a Mailgun webhook (https://documentation.mailgun.com/user_manual.html#webhooks).
/// </summary>
/// <example>