Skip to content

Instantly share code, notes, and snippets.

View UweKeim's full-sized avatar
😊
www.uwe.co

Uwe Keim UweKeim

😊
www.uwe.co
View GitHub Profile
@leodutra
leodutra / enable-win-git-long-paths.md
Last active June 24, 2025 03:20
Enable long paths on Windows 11 or Windows 10 and Git

Enable Long Paths on Windows

Instructions for Windows 11 and Windows 10

Windows 11

Method 1: Registry Editor (Most Reliable)

  1. Press Win + R, type regedit, and press Enter
  2. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  3. Find LongPathsEnabled (create it if missing as DWORD)
@UweKeim
UweKeim / DayOfCentury.cs
Last active November 14, 2017 06:53
Calculate DayOfCentury for C# DateTime, similar to DayOfYear
/// <description>
/// Calculates the total number of days passed sind first of January 2000
/// until a given Date.
/// </description>
public static long DayOfCentury(DateTime dt)
{
var span = dt.Date - new DateTime(2000, 1, 1);
return (long)span.TotalDays;
}