Skip to content

Instantly share code, notes, and snippets.

View wholroyd's full-sized avatar

William Holroyd wholroyd

  • Google
  • Raleigh, NC
View GitHub Profile
@wholroyd
wholroyd / preparations.md
Last active April 11, 2024 09:17
Getting Minikube on WSL2 Ubuntu working

Windows Preparation

  1. Ensure hypervisor functionality is enabled in BIOS.

    • I know it sounds stupid, but if you already have it enabled, disable it, restart the machine, and enable it again.
    • Otherwise you will hit microsoft/WSL#5363
  2. Launch a PowerShell prompt in Administrator mode [Win+X > Windows PowerShell (Admin)]

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
@wholroyd
wholroyd / dotnetlayout-jenkins.md
Last active January 19, 2023 17:00
.NET project structure, using Jenkinsfile
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  reports/
 src/
@wholroyd
wholroyd / install-attempt2.txt
Last active July 15, 2020 17:50
Installing NextBSD on top of clean FreeBSD 10.x/11.x
## This was based on the 11.x image found at...
## ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20150917-r287930-disc1.iso
pkg install -y git
cd /usr/src
git clone http://github.com/nextbsd/nextbsd .
make buildworld
make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=GENERIC
@wholroyd
wholroyd / genesis_public_key
Created February 22, 2018 15:13
genesis_public_key
04a1d39448fcbf8eac4f80fde2dd0947ccd54bc77104e7a4004c41d082f64eec2e72afd999ecfcfdd945945b0f90cc5e71a0b1a0a8e24a4e7012d30968006fa204
@wholroyd
wholroyd / extensions.md
Last active August 28, 2017 15:38
C# 8 Syntax Suggestions

Current syntax for extensions on a reference type...

public static class PersonExtensionClass
{
  public string FullName(this Person person)
  {
    return $"{person.FirstName} {person.MiddleName} {person.LastName}";
  }
}
@wholroyd
wholroyd / windbg_commands.txt
Created August 10, 2017 19:58
Debugging 32bit dump from 64bit machine
// Install the Windows SDK first for windbg
// Install the soswow64 module from https://github.com/poizan42/soswow64/releases
// Additonal hints at https://theartofdev.com/windbg-cheat-sheet/
// Open the 64bit dump with the 32bit windbg
// Run these commands...
.loadby sos clr
.load wow64exts
.load c:\debugger\soswow64.dll
@wholroyd
wholroyd / nestedapps.js
Created June 19, 2015 18:57
Nested Express apps. How it should be.
// ### The Root application
// ./index.js <- lives here
// ./views/index.hbs <- the view
// ./catsApp <- child app
var express = require('express');
var app = express();
var exphbs = require('express-handlebars');
app.engine('hbs', exphbs({defaultLayout: 'single', extname: '.hbs'}));
app.set('view engine', 'hbs');
@wholroyd
wholroyd / DateTime_parsing.cs
Created May 27, 2016 04:15
Keep the timezone as an offset and not an adjustment
var test = "2016-11-21T23:00:00-05:00";
var temp1 = DateTime.Parse(test);
temp1.Dump(); // Returns: 11/22/2016 4:00:00 AM
var temp2 = DateTimeOffset.Parse(test);
temp2.Dump(); // Returns: 11/21/2016 11:00:00 PM -05:00
var temp3 = DateTimeOffset.Parse(test).DateTime;
temp3.Dump(); // Returns: 11/21/2016 11:00:00 PM
@wholroyd
wholroyd / Example1.cs
Created April 22, 2016 16:36 — forked from davidfowl/Example1.cs
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@wholroyd
wholroyd / gist:864a3596b79cde62bd31d85a98d013bf
Created April 3, 2016 01:14 — forked from jeremypruitt/gist:ca62a5cdc95f579713b9
Modified ansible windows remoting script
# Configure a Windows host for remote management with Ansible
# -----------------------------------------------------------
#
# This script checks the current WinRM/PSRemoting configuration and makes the
# necessary changes to allow Ansible to connect, authenticate and execute
# PowerShell commands.
#
# Set $VerbosePreference = "Continue" before running the script in order to
# see the output messages.
#