Skip to content

Instantly share code, notes, and snippets.

View bh3605's full-sized avatar

Bryson Hair bh3605

View GitHub Profile
@bh3605
bh3605 / SendDBEmailwithTabularQuery.sql
Created April 28, 2021 12:54
Sends an email when results are returned from a query
-- =============================================
-- Author: Hair, Bryson
-- Create date: 4/27/2021
-- Description: This stored procedure will send an email from the database with the query results as an html table in the email.
-- =============================================
ALTER PROCEDURE [dbo].[CFT_SendDBEmailwithTabularQuery]
(
@qSELECT NVARCHAR(100), --The select part of the sql statement, which can include top X
@fieldlist NVARCHAR(MAX), --Pipe delimited list of fields, which can include aliases
@qFROM NVARCHAR(MAX), --The from part of the sql statment, which can include joins
@bh3605
bh3605 / Fingerprint.cs
Created January 28, 2022 02:23
Webforms Cache Buster
sing System.Collections.Concurrent;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Web;
/**
* Solution from https://stefanolsen.com/posts/cache-busting-with-asp-net-mvc/
* https://www.madskristensen.net/blog/cache-busting-in-aspnet/
* https://stefanolsen.com/posts/cache-busting-2-0-an-update-for-asp-net-core/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
public class TypeSafeEnum<T> where T : class
{
TypeSafeEnum(string name, T typeSafeEnum)
{
@bh3605
bh3605 / cmd
Created March 15, 2023 19:44
Delete everything quickly and quietly on Windows
DEL /F/Q/S *.* > NUL