Skip to content

Instantly share code, notes, and snippets.

View ritchiecarroll's full-sized avatar
🤔
Pondering the nature of the universe...

J. Ritchie Carroll ritchiecarroll

🤔
Pondering the nature of the universe...
View GitHub Profile
@ritchiecarroll
ritchiecarroll / IniJsonConversions.md
Last active February 25, 2024 22:21
INI to/from JSON Conversions in C#

Convert to/from INI and JSON in C#

Code:

using System;
using System.Linq;
using System.Text;
using System.Web;
using Newtonsoft.Json.Linq;
@ritchiecarroll
ritchiecarroll / README.md
Last active February 22, 2024 02:14
Manual Windows Partitions Recovery and Restore from Windows Image Backup

Manual Windows Partitions Recovery and Restore from Windows Image Backup

Steps below iterate how to manually recreate the disk partitions required by Windows and restore a Windows installation from a system image backup created with the "Backup and Restore (Windows 7)" feature, especially when the official steps fail.

These steps were tested with Windows 11, but should work with prior versions of Windows as well:

@ritchiecarroll
ritchiecarroll / README.md
Last active October 3, 2022 14:31
Cron Validation Regular Expression

Cron Validation Regular Expressions

Examples

// C# Cron Validation Regular Expression
//                                   Dash: Minute:                                                                                                Hour:                                                                                                                      Day:                                                                                                                                   Month:                                                                                         Day of Week:
const string CronValidationRegex = @"^\-$|^(\*|(([0-5]?[0-9]|60)(,([0-5]?[0-9]|60))*)|([0-5]?[0-9]|60)\-([0-5]?[0-9]|60)(\/[0-9]+)?|\*\/[0-9]+)\s+(\*|(([0-9]|1[0-9]|2[0-4])(,([0-9]|1[0-9]|2[0-4]))*)|([0-9]|1[0-9]|2[0-4])\-([0-9]|1[0-9]|2[0-4])(\/[0-9]+)?|\*\/[0-9]+)\s+(\*|(([1-9]|[1-2][0-9]|30|31)(,([1-9]|[1-2][0-9]|30|31))*)|([1-9]|[1-2][0-9]|30|31)\-([1-9]|[1-2][0-9]|30|31)(\/[0-9]+)?|\*\/[0-9]+)\s+(\*|(([1-
@ritchiecarroll
ritchiecarroll / README.md
Last active October 3, 2022 14:30
Adds GitHub markdown link style anchors to GitHub Pages

GitHub markdown link style anchors for GitHub Pages

image

Example: https://gemstone.github.io/expressions/Test

Add the default.html file, below, to the myrepo/docs/_layouts/ folder, creating the folder if needed.

This requires the anchor_headings.html in the myrepo/docs/_includes/ folder from here: