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
@willurd
willurd / web-servers.md
Last active Aug 18, 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
@robinsmidsrod
robinsmidsrod / dhcpd.conf
Last active Aug 18, 2019
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
View dhcpd.conf
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN (private network)
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active Aug 16, 2019
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)
View _INSTALL.md

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

@AdamNaj
AdamNaj / configuration.yaml
Last active Aug 15, 2019
Z Wave Graph for Home Assistant
View configuration.yaml
panel_custom:
- name: zwavegraph2
sidebar_title: Z-Wave Graph
sidebar_icon: mdi:access-point-network
url_path: zwave
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@eqhmcow
eqhmcow / hfsc-shape.sh
Last active Jun 20, 2019
HFSC - linux traffic shaping's best kept secret
View hfsc-shape.sh
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
@robinsmidsrod
robinsmidsrod / _README.md
Last active Jun 19, 2019
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)
View _README.md

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)

@robinsmidsrod
robinsmidsrod / sysrcd.ipxe
Last active Jun 9, 2019
SystemRescueCD iPXE menu script and monkeypatch for preloading sysrcd.dat with iPXE instead of loading from local storage
View sysrcd.ipxe
#!ipxe
set sysrcd-version 4.7.1
echo Booting SystemRescueCD ${sysrcd-version} x86 for ${initiator-iqn}
# Kernel command-line options are documented here:
# http://www.system-rescue-cd.org/Sysresccd-manual-en_Booting_the_CD-ROM#Network_boot_using_PXE
set base-url sysrcd-${sysrcd-version}-x86/
kernel ${base-url}isolinux/altker${archs} setkmap=no net.ifnames=0 backstore=off
initrd ${base-url}isolinux/initram.igz
initrd ${base-url}sysrcd.dat /sysrcd.dat
# Load the ramdisk again as a file inside the ramdisk, so our custom init script
@john-clark
john-clark / i.pxe
Last active Jun 7, 2019
ipxe php boot system
View i.pxe
#!ipxe
#
# This file gets compiled into undionly.kpxe
################################################################
:vars
set next-server 192.168.2.121
cpuid --ext 29 && set arch amd64 || set arch x86
:netconfig
dhcp net0 || goto ipxeshell
:prompt
@robinsmidsrod
robinsmidsrod / nic-menu.ipxe
Created Apr 7, 2016
iPXE embedded menu that tries to boot each network adapter in turn
View nic-menu.ipxe
#!ipxe
set timeout 1000
:menu
menu Network boot options for ${uuid}
item --key a default Try to boot (a)ll network adapters in turn
item
item --gap -- --- Detected network adapters ---
set i:int8 0
You can’t perform that action at this time.