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
@CalvinHartwell
CalvinHartwell / ubuntu-18.04-lts-preseed.cfg
Last active Nov 26, 2019
ubuntu-18.04-lts-preseed.cfg
View ubuntu-18.04-lts-preseed.cfg
### Preseed for Ubuntu 18.04
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Usage
# We recommend to use the build-iso.sh script to build an image with embedded
# preseed and other required files. In that case the preseed file gets loaded
# automatically and all additional files are available to the installer.
### Unattended Installation
d-i auto-install/enable boolean true
@AdamNaj
AdamNaj / configuration.yaml
Last active Jan 16, 2020
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
@robinsmidsrod
robinsmidsrod / elive.ipxe
Created Jul 7, 2016
Booting Elive 2.6.18 beta using iPXE and NFS
View elive.ipxe
:elive
echo Starting Elive ${elive-version} for ${initiator-iqn}
# Get the ISO from http://www.elivecd.org/download/beta/
set base-url elive-${elive-version}
set kernel-args \
boot=live swap=off \
ip=dhcp root=/dev/nfs nfsroot=${nfs-server}:${nfs-root}${base-url} \
config username=eliveuser
kernel ${base-url}/live/vmlinuz1 ${kernel-args}
initrd ${base-url}/live/initrd1.img
@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
@robinsmidsrod
robinsmidsrod / signjar.cmd
Last active Mar 1, 2016
Batch file for cmd.exe for signing an existing Java archive (.jar file)
View signjar.cmd
@echo off
set startdir=%cd%
set tmpdir="C:\Temp\signjar.tmp"
set notepadpp="C:\Program Files (x86)\Notepad++\notepad++.exe"
set veracrypt="C:\Program Files\VeraCrypt\VeraCrypt.exe"
set vc_volume="\\nas\company\kunder\Fagbokforlaget V&B AS\code-signing\FVB.hc"
set vc_drive="K"
@robinsmidsrod
robinsmidsrod / sysrcd.ipxe
Last active Jan 8, 2020
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
@voxpelli
voxpelli / README.md
Last active Jul 19, 2016
How to get references to all PR:s on a "git fetch origin" – forgot where I found this, but rediscovered the setup in one of my local repos
View README.md

In the .git/config file add the fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to the remote you want to fetch references to PR:s from.

@robinsmidsrod
robinsmidsrod / inventory.ipxe
Created Jul 16, 2015
iPXE hardware inventory script (from svenx)
View inventory.ipxe
# 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.
@gayanvirajith
gayanvirajith / clear-cache.sh
Created May 19, 2015
Ez publish 5 clear cache shell script
View clear-cache.sh
#!/bin/bash
# Clear production and dev cache of symfony
php ezpublish/console cache:clear --env=prod; php ezpublish/console cache:clear
# Change directory to ezpublish_legacy and clear the legacy cache
cd ezpublish_legacy; php bin/php/ezcache.php --clear-all --purge;
# Change the directory back
cd ..
@robinsmidsrod
robinsmidsrod / pci_inventory_busdevfn.ipxe
Last active Dec 15, 2015
iPXE script which makes an inventory of all PCI devices and ship it off using HTTP POST
View pci_inventory_busdevfn.ipxe
#!ipxe
params
:pciscan pciscan addr || goto pciscan_done
param pci-dev-${addr:busdevfn} ${pci/${addr}.0.2}:${pci/${addr}.2.2}
goto pciscan
:pciscan_done
chain http://server.domain.lan/inventory.php##params
You can’t perform that action at this time.