Skip to content

Instantly share code, notes, and snippets.

View zelogik's full-sized avatar
💭
I may be slow to respond.

Cedric M. zelogik

💭
I may be slow to respond.
View GitHub Profile
@azhang
azhang / pxe_on_opnsense.md
Last active January 1, 2024 11:45
PXE on OPNsense

This is a walkthrough of setting up a PXE server to boot Ubuntu server live install .iso over network, all on an OPNsense device. No need for Dnsmasq or http/nfs server! Should be compatible with vanilla FreeBSD and HardenedBSD devices as well.

Guide made with OPNsense 20.7 and Ubuntu 20.04.2, with the assumption that your OPNsense device is at 192.168.1.1.

Thanks to all the other guides out there. 1 2

Notes:

A couple issues I ran into with other guides is that Ubuntu's servers return 404 for older releases. Make sure to check each link used in this guide to make sure they exist! This guide works with BIOS as we use pxelinux.0 but it can be adapted fairly easily for UEFI boot.

Overview:

@tkojitu
tkojitu / HowToUseStructInArduino.cxx
Created February 19, 2012 01:46
How to use struct in Arduino
struct Control {
int pin;
};
void ctrlPinMode(void* control, int mode) {
Control* ctrl = (Control*)control;
pinMode(ctrl->pin, mode);
}
int ctrlDigitalRead(void* control) {