Skip to content

Instantly share code, notes, and snippets.

View mcd1992's full-sized avatar

Aaron mcd1992

View GitHub Profile

Slider

You've probably seen the slider in the options GUI a lot. But what you might not know is that you can't use it directly in your GUI if you so wished. The slider is hardcoded to work with the options GUI and to be able to use it, we have to make our own slider.

The easiest way to do this is to copy the contents of GuiSlider and pasting it into a new class which can be called GuiSliderFixed for example. After you've pasted the code, the first thing you need to do is change the class name and constructor name from GuiSlider to GuiSliderFixed.

After you're done with that, we can go over what's making the slider un-usable in the first place. The constructor has a parameter called EnumOptions par4EnumOptions. This parameter decides which option the slider is going to modify, and if left to null, it will cause a NullPointerException, since further down in the code the parameter is being used. To fix this, we need to remove all references to EnumOptions in the class. After you're done with that the sl

@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active December 20, 2025 20:58
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup