Skip to content

Instantly share code, notes, and snippets.

View ramonsmits's full-sized avatar

Ramon Smits ramonsmits

View GitHub Profile
@ramonsmits
ramonsmits / Fedora38-VM.ps1
Last active July 24, 2023 12:55 — forked from PatrickLang/Fedora34-VM.ps1
Hyper-V example setup for Fedora Workstation 38
# Echo the commands as they're run
Set-PSDebug -Trace 1
# Dump Windows version
Get-ComputerInfo | Format-Table WindowsVersion, OsVersion
# Create a UEFI VM, secure boot enabled, use the secure boot settings for the
$vm = New-VM -Generation 2 -Name "Fedora 38" -Path .
$vm | Set-VMFirmware -EnableSecureBoot On -SecureBootTemplate "MicrosoftUEFICertificateAuthority"
@ramonsmits
ramonsmits / LogExtensions.cs
Last active February 18, 2016 08:39 — forked from lkaczanowski/ILogExtensions.cs
ILog extension for TRACE and VERBOSE log4net levels
using System;
using System.Globalization;
using log4net.Util;
namespace log4net
{
public static class LogExtentions
{
private static readonly Type ThisDeclaringType = typeof(LogExtentions);
@ramonsmits
ramonsmits / string-format-extension.cs
Last active December 17, 2015 10:19 — forked from terenced/string-format-extension.cs
Added alignment support for named values.
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI;
namespace StringExtensions
{
/// <remarks>
/// http://james.newtonking.com/archive/2008/03/27/formatwith-string-format-extension-method.aspx