Skip to content

Instantly share code, notes, and snippets.

View michaelvolz's full-sized avatar

Michael A. Volz (Flynn) michaelvolz

View GitHub Profile
@michaelvolz
michaelvolz / gist:88aa1820aea826eef7e91ac472e7cbbe
Created November 11, 2023 18:49
Git version number pre-commit hook
#!/bin/sh
echo "pre-commit started"
version=$(cat redmuffin.Blazor.Static/wwwroot/Version.txt); y=$((version=version+1)); echo $y > redmuffin.Blazor.Static/wwwroot/Version.txt
git add redmuffin.Blazor.Static/wwwroot/Version.txt
cat redmuffin.Blazor.Static/wwwroot/Version.txt
public static class DateTimeExtensions
{
private const int Today = 0;
private const int Yesterday = 1;
private const int Week = 7;
private const int Month = 31;
private const int OneMinute = 60;
private const int OneHour = 3600;
private const int OneDay = 86400;