Skip to content

Instantly share code, notes, and snippets.

View wayneburlingame's full-sized avatar

Wayne Burlingame wayneburlingame

View GitHub Profile
using System;
using System.Diagnostics;
using System.IO;
public interface IHtmlToPdfConverter
{
byte[] Convert(string basePath, string htmlCode, FormatType formatType, OrientationType orientationType);
}
public class HtmlToPdfConverter : IHtmlToPdfConverter
@wayneburlingame
wayneburlingame / SimpleHttpServerWithTcpListener.cs
Created August 25, 2022 22:19 — forked from NikolayIT/SimpleHttpServerWithTcpListener.cs
Simple HTTP server in .NET Core using TcpListener
namespace SimpleHttpServer
{
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public static class Program
{
public static void Main(string[] args)
@wayneburlingame
wayneburlingame / gist:715aa90518b72cbd126a524276c8182c
Created August 16, 2022 23:36 — forked from nemf/gist:3794614
dhcp configuration for ipxe
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
### iPXE-specific options
#
# http://www.ipxe.org/howto/dhcpd
#
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;
option ipxe.priority code 1 = signed integer 8;
@wayneburlingame
wayneburlingame / remote_logging.conf
Created August 13, 2022 00:19 — forked from robinsmidsrod/remote_logging.conf
rsyslogd setup for remote logging
$ cat /etc/rsyslog.d/remote_logging.conf
# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
# Limits reception to our subnet
$AllowedSender UDP, 10.1.1.0/24
$AllowedSender TCP, 10.1.1.0/24
@wayneburlingame
wayneburlingame / README.md
Created August 13, 2022 00:19 — forked from robinsmidsrod/README.md
Testing out the upcoming NFS support in iPXE
@wayneburlingame
wayneburlingame / _README.md
Created August 13, 2022 00:19 — forked from robinsmidsrod/_README.md
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

Go into your git checkout folder of ipxe.

Save the below file as nic-menu.ipxe.

Build iPXE like this:

cd src && make EMBED=../nic-menu.ipxe && cd ..

Requirements: current iPXE as of 2013-08-01 (for proper behavior of autoboot with a network device specified, netX feature, PCI vendor/device ID display and inc command)

@wayneburlingame
wayneburlingame / coreos.ipxe
Created August 13, 2022 00:05 — forked from robinsmidsrod/coreos.ipxe
CoreOS iPXE recipe
#!ipxe
set coreos-version 72.0.0
echo Booting CoresOS ${coreos-version}
set base-url http://storage.core-os.net/coreos/amd64-generic/${coreos-version}
kernel ${base-url}/coreos_production_pxe.vmlinuz
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
imgargs coreos_production_pxe.vmlinuz root=squashfs: state=tmpfs: sshkey="ssh-dss AAAAB3NzaC1kc3MAAAEBAL/ga3he0R/MiWa8LM0L/i29m3v6cxv65h6vFwrR4UYkAtqW6H597YBNKwi0Egw5KUC0Cw/BaRY0rAP9IKD7BQ+uh1r8kiGDRO71qrTdXYSfZs4UWjzwN41GrFJMPu2tb4kFOZqsOgmGA9RjapgWRKUWzCgBmq36R2VeF2uf4MWFZWFCpiNv4lekahn3Vch0iWNDZXyUrAAj/iSRgYV2cdzUgmz8IzIODc5wdRBflB9M+osiL8+7/9cUoyv3SFx5uqnozSan0wR+Y4FcLWcqJ7PYvYv3MqHmdp9cd3Py+wmRza+xan+XYCOkO/K/yahVb+j3MQ9AT8KKx48Yq0iiBGsAAAAVANkbdfmZMTo1tNDT3Up0AWPpmCYbAAABADbLWxgYPl8lG7VNpDZGBOmz6djY4ZDX8lx50kL09T37wZWUCGVzKcEwozoekgTxs1hYIfki7+AsqhqlMA66A0hHCCmKYqqErbRAq6OKmdDdpjwwPfsH4ghbqRyIwoXL4uydlYfgEBeqB+a1j6UErtzKPb8thNPcMz42j9eZAg5Lu7fv5yZsxP5KtfGlBuun0trmTCDksA2D38JHY6Ktu11bMIq8++J3wNMUobl9JpVnh2BQZn2pJ4SNIUO+EhXRBDjxRVsSM1fcfnN2IgPFEFlflsutyJt
@wayneburlingame
wayneburlingame / inventory.ipxe
Created August 12, 2022 23:44 — forked from robinsmidsrod/inventory.ipxe
iPXE hardware inventory script (from svenx)
# Run a PCI/SMBios/net inventory scan and upload the results. This gives us a
# way of tracking nodes to some extent, leaving us less blind than usual.
#
# We use the iPXE pciscan command to enumerate the PCI bus. For each device, we
# check the 'header type' register at offset 0x0e. If it's type 0 (endpoint),
# we can read the subsystem vendor and device registers too. Unfortunately, if
# the 7th bit of the header type field is set (0x80), it indicates a
# multi-function device. So to check the type, this bit should be masked out.
# Masking is not possible with iPXE commands, so we have to duplicate some of
# the iseq tests.
@wayneburlingame
wayneburlingame / dhcpd.conf
Created August 12, 2022 23:44 — forked from robinsmidsrod/dhcpd.conf
Simplest way of chainloading iPXE for both UEFI and legacy BIOS with ISC dhcpd
option arch code 93 = unsigned integer 16;
next-server X.X.X.X;
if option arch = 00:07 {
filename "ipxe.efi";
}
else {
filename "undionly.kpxe";
#filename "ipxe.pxe"; # if you prefer native drivers
}
@wayneburlingame
wayneburlingame / dhcpd.conf
Created August 12, 2022 23:44 — forked from robinsmidsrod/dhcpd.conf
Simple chainloading config loading iPXE for ISC dhcpd which supports both legacy BIOS and UEFI
option client-arch code 93 = unsigned integer 16;
subnet 10.8.8.0 netmask 255.255.255.0 {
range 10.8.8.100 10.8.8.199;
option routers 10.8.8.1;
option domain-name-servers 10.8.8.1;
next-server 10.8.8.1;
if exists user-class and option user-class = "iPXE" {
filename "http://10.8.8.11/ipxeroot/bootstrap.ipxe";
} elsif option client-arch != 0 {
filename "ipxe.efi";