Skip to content

Instantly share code, notes, and snippets.

Robin Smidsrød robinsmidsrod

Block or report user

Report or block robinsmidsrod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robinsmidsrod
robinsmidsrod / dhcpd.conf
Last active Aug 30, 2017
Booting an Apple Mac into iPXE using simulated Apple Boot Server on ISC DHCPD
View dhcpd.conf
next-server 10.0.3.2;
if ( substring(option vendor-class-identifier, 0, 9) = "AAPLBSDPC"
and substring(option vendor-class-identifier, 10, 4) = "i386" ) {
# This needs to be there to tell the client we're an Apple boot server
option vendor-class-identifier "AAPLBSDPC";
# Normally the client asks for a list, we respond, they tell us what we want,
# then we send a select back with the information of that image.
# This skips all that and forces the select down to the client.
option vendor-encapsulated-options 01:01:02;
# Use ipxe.efi for native drivers, or snponly.efi for underlying UNDI
@robinsmidsrod
robinsmidsrod / README.md
Last active Oct 14, 2017
iPXE recipe for booting XenServer without using mboot.c32 or pxelinux.0
View README.md
  1. Mount the XenServer ISO.

  2. Create a directory in which to place some of the files. Change into that directory.

  3. Assuming the ISO is mounted in /media/cdrom, then do:

    # zcat /media/cdrom/boot/xen.gz > xen
    # zcat /media/cdrom/boot/vmlinuz > vmlinuz
    # cp /media/cdrom/install.img install.img
    
@robinsmidsrod
robinsmidsrod / gist:788eb37babc0fff5b18f
Last active Mar 23, 2017
Games menu for my iPXE menu example
View gist:788eb37babc0fff5b18f
############################ GAMES MENU #########################
:menu-games
menu Games for ${initiator-iqn}
item invaders Invaders (Space Invaders clone)
item tint Tint (Tetris clone)
item mineassemble MineAssemble (Minecraft clone, not working)
item
item --key 0x08 back Back to top menu...
iseq ${menu-default} menu-games && isset ${submenu-default} && goto menu-games-timed ||
@robinsmidsrod
robinsmidsrod / enchanting.txt
Last active Aug 29, 2015
Elder Scrolls Online enchanting construction and deconstruction skill increase notes
View enchanting.txt
Glyph deconstruction
=================================================
3880 blue glyph from player 35-45 (average)
3104 green glyph from player 35-45 (average) x4
2817 blue glyph from player 25-35 (lesser)
2636 green glyph from player 30-40 (moderate) x2
2254 green glyph from player 25-35 (lesser) x7
1857 green glyph from player 20-30 (minor) x2
1536 green glyph from player 15-25 (slight)
991 white glyph from wild 45-50 (great) x8
@robinsmidsrod
robinsmidsrod / gist:9326960
Last active Aug 29, 2015
Problematic URI parsing in iPXE, redirect2 ends up as a query param to url3, it should stay with url2
View gist:9326960
#!ipxe
set url1 http://boot.smidsrod.lan/path1?key1=value1#frag1
set url2 http://boot.smidsrod.lan/path2?key2=value2&redirect2=${url1:uristring}#frag2
set url3 http://boot.smidsrod.lan/path3?key3=value3&redirect3=${url2:uristring}#frag3
chain ${url3} ||
shell
Result: http://boot.smidsrod.lan/path3?key3=value3&redirect3=http%3A//boot.smidsrod.lan/path2%3Fkey2=value2&redirect2=http%3A//boot.smidsrod.lan/path1%3Fkey1=value1#frag1%23frag2%23frag3
Expected url2: http://boot.smidsrod.lan/path2?key2=value2&redirect2=http%3A%2F%2Fboot.smidsrod.lan%2Fpath1%3Fkey1%3Dvalue1%23frag1#frag2
@jdeblese
jdeblese / tccs.pl
Last active Dec 31, 2017
Modified version of tccs (http://tccs.sourceforge.net/) to add support for hfsc classes
View tccs.pl
#!/usr/bin/perl -w
# copyright 2005-2008 Tomasz Pala <gotar@pld-linux.org>
# Contributions by Jan-willem De Bleser, 2013
# license: GPL
# usage:
# watch -d -n1 'tc -s c ls dev imq1 | tccs -f 10 2>/dev/null'
# tccs.rc file format:
@robinsmidsrod
robinsmidsrod / etc_clamav_clamd.conf
Last active Dec 27, 2015
Postfix/DSPAM/ClamAV/Dovecot with MySQL mail server setup (all encrypted with SSL/TLS)
View etc_clamav_clamd.conf
#Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
TCPSocket 3310
TCPAddr 127.0.0.1
# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible
User clamav
AllowSupplementaryGroups true
ScanMail true
@robinsmidsrod
robinsmidsrod / gist:6175108
Last active Dec 20, 2015
Dynamically loading PCI information with iPXE scripting
View gist:6175108
#!ipxe
set spaces:hex 20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20
clear addr
:load pciscan addr || goto load_done
set vendor ${pci/${addr}.0.2}
set device ${pci/${addr}.2.2}
chain -a pci/${vendor}.ipxe ||
chain -a pci/${vendor}/${device}.ipxe ||
@robinsmidsrod
robinsmidsrod / firefly.ipxe
Created Jun 14, 2013
Firefly IllumOS recovery environment netbooted using iPXE
View firefly.ipxe
#!ipxe
echo Booting Firefly 0613 for ${initiator-iqn}
set base-url ${boot-url}/firefly-0613/boot
# http://alexeremin.blogspot.no/2013/05/firefly-failsafe-image-for-illumos.html
# http://sourceforge.net/projects/fireflyfailsafe/files/
# Download ISO, unpack ISO and copy files to boot-url
# The ramdisk is compressed with gzip, which must be unpacked
# to work with iPXE
# mv firefly firefly.gz
# gunzip firefly.gz
@willurd
willurd / web-servers.md
Last active Aug 16, 2019
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
You can’t perform that action at this time.