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 / 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 / output.txt
Last active September 17, 2015 02:21
xunit runner hanging after all tests ran/failed/skipped
xUnit.net DNX Runner (64-bit DNX 4.5.1)
Discovering: fake-dnx.tests
Discovered: fake-dnx.tests
Starting: fake-dnx.tests
fake_dnx.tests.HomeControllerTests.TestingTheDnxTestCommand [FAIL]
Assert.True() Failure
Expected: True
Actual: False
Stack Trace:
at fake_dnx.tests.HomeControllerTests.TestingTheDnxTestCommand () [0x00000] in <filename unknown>:0
@wholroyd
wholroyd / vbscript.json
Created January 14, 2016 19:59
vscode-vbscript
{
"comment": "Modified from the original ASP bundle. Originally modified by Thomas Aylott subtleGradient.com",
"fileTypes": [
"vbs",
"vbe",
"wsf",
"wsc",
"acm",
"acr",
"acf"
@wholroyd
wholroyd / github_clone.txt
Last active January 21, 2016 20:22
Ansible missing modules in 2.0.0.2
[wholroyd@wholroyd-fedora ansible]$ find ./*.py -printf "%f\n"
__init__.py
cloudtrail.py
dynamodb_table.py
ec2_ami_copy.py
ec2_elb_facts.py
ec2_eni.py
ec2_eni_facts.py
ec2_remote_facts.py
ec2_vpc_igw.py
# install 7-zip, curl and vim
# (Windows 2012 comes with .NET 4.5 out-of-the-box)
# Then use the EC2 tools to create a new AMI from the result, and you have a system
# that will execute user-data as a PowerShell script after the instance fires up!
# This has been tested on Windows 2012 64bits AMIs provided by Amazon (eu-west-1 ami-a1867dd6)
#
# Inject this as user-data of a Windows 2012 AMI, like this (edit the adminPassword to your needs):
#
# <powershell>
# Set-ExecutionPolicy Unrestricted
@wholroyd
wholroyd / ec2-user-data.ps1
Created April 3, 2016 01:13 — forked from mefellows/ec2-user-data.ps1
Packer Community Plugins - Example Windows 2012 Setup
<powershell>
write-output "Running User Data Script"
write-host "(host) Running User Data Script"
cmd.exe /c net user /add vagrant FooBar@123
cmd.exe /c net localgroup administrators vagrant /add
Set-ExecutionPolicy -ExecutionPolicy bypass -Force
# RDP
@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.
#
@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 / 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 / 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