Skip to content

Instantly share code, notes, and snippets.

View robinsmidsrod's full-sized avatar

Robin Smidsrød robinsmidsrod

View GitHub Profile
@robinsmidsrod
robinsmidsrod / vmware-installer.ipxe
Created May 22, 2012 14:26
Booting the VMware installer manually using iPXE multiboot support
# Based on details from http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.upgrade.doc_50%2FGUID-2F0D4696-3681-4C13-9552-5280C6406376.html
set base-url http://XXX.XXX.XXX.XXX/
kernel ${base-url}tboot.b00
imgargs tboot.b00 ks=${base-url}ks.cfg
module ${base-url}b.b00
module ${base-url}useropts.gz
module ${base-url}k.b00
module ${base-url}a.b00
module ${base-url}s.v00
module ${base-url}weaselin.v00
#!/usr/bin/perl
# Usage: upgrade-cpan.pl 5.14.0 | sort -u | cpanm
use strict;
use File::Find::Rule;
use JSON;
my $old = shift;
my @files = File::Find::Rule->file->name('install.json')->in("$ENV{HOME}/perl5/perlbrew/perls/perl-$old/lib/site_perl/$old");
for my $file (@files) {
@madsen
madsen / yapc-vlc.pl
Created June 13, 2012 20:00
Watch YAPC::NA with VLC
#! /usr/bin/perl
# USAGE: yapc-vlc ROOM
# where ROOM is L, V, 313, or 325
# Based on the work of Christoph Jokubonis:
# http://mail.pm.org/pipermail/vienna-pm/2012-June/003125.html
use strict;
use warnings;
use IPC::Cmd qw[can_run];
@robinsmidsrod
robinsmidsrod / gist:2930760
Created June 14, 2012 14:42
Problems dealing with installing ZeroMQ on various platforms
sudo aptitude install python-software-properties
sudo add-apt-repository ppa:chris-lea/libpgm
sudo add-apt-repository ppa:chris-lea/zeromq
sudo aptitude update
sudo aptitude install uuid-dev libzmq-dev uuid libzmq1
cpan ZeroMQ
I then cloned the zguide git repo to try out some examples
git clone git://github.com/imatix/zguide.git
@robinsmidsrod
robinsmidsrod / id_dsa.pub
Created July 3, 2012 13:52
My public SSH key
ssh-dss AAAAB3NzaC1kc3MAAAEBAL/ga3he0R/MiWa8LM0L/i29m3v6cxv65h6vFwrR4UYkAtqW6H597YBNKwi0Egw5KUC0Cw/BaRY0rAP9IKD7BQ+uh1r8kiGDRO71qrTdXYSfZs4UWjzwN41GrFJMPu2tb4kFOZqsOgmGA9RjapgWRKUWzCgBmq36R2VeF2uf4MWFZWFCpiNv4lekahn3Vch0iWNDZXyUrAAj/iSRgYV2cdzUgmz8IzIODc5wdRBflB9M+osiL8+7/9cUoyv3SFx5uqnozSan0wR+Y4FcLWcqJ7PYvYv3MqHmdp9cd3Py+wmRza+xan+XYCOkO/K/yahVb+j3MQ9AT8KKx48Yq0iiBGsAAAAVANkbdfmZMTo1tNDT3Up0AWPpmCYbAAABADbLWxgYPl8lG7VNpDZGBOmz6djY4ZDX8lx50kL09T37wZWUCGVzKcEwozoekgTxs1hYIfki7+AsqhqlMA66A0hHCCmKYqqErbRAq6OKmdDdpjwwPfsH4ghbqRyIwoXL4uydlYfgEBeqB+a1j6UErtzKPb8thNPcMz42j9eZAg5Lu7fv5yZsxP5KtfGlBuun0trmTCDksA2D38JHY6Ktu11bMIq8++J3wNMUobl9JpVnh2BQZn2pJ4SNIUO+EhXRBDjxRVsSM1fcfnN2IgPFEFlflsutyJtwrUIg7MddcVX6yH4s0K4YMaJVRvmP7eEi6f2nnnYoXftuU/1oljwjFYoAAAEBAJA2myKoGJbeObcp7rPl+EOZz7zmHDWhJqQZYfdosiInO6bzP/Ovpysnl3db5K6IXWITq83sf5NcugL4W6XcpRBmfsp7jxVqSk6zfRdqzbm6ReY0b23jB3U4+rGzln9z8ZwsU7qRTcmVhyajtS4b+xy3BErq5+3bvmiI4IbeAyIaM22/fNEYhhBhwgUfb8/kAGjrx/mtPH5lq2/IR0wca/CKqyWbN34N7j/W7Dnkin10yqRo/98OzPJm8vNVS2YBwwOHPotBFQHr
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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:

@djs52
djs52 / spideroak-default.sh
Created September 24, 2012 16:30
Init script (/etc/init.d/spideroak) and default (/etc/default/spideroak) for SpiderOak from https://launchpad.net/~tonio
# defaults file for spideroak daemon headless mode
# SpiderOak does not currently support handling the initial setup of
# an account, or setup of a new device within an account entirely from
# the command line. This is because the new user setup process requires
# the user to answer a CAPTCHA and some other validation processes.
#
# Instead, we recommend connecting to the headless server using "ssh -X"
# to forward X11 connections back to your local desktop machine with X11
# running. Within your ssh session to the headless server, run SpiderOak
@robinsmidsrod
robinsmidsrod / README.md
Created October 9, 2012 13:32
Testing out the upcoming NFS support in iPXE
@robinsmidsrod
robinsmidsrod / _README.md
Last active March 30, 2024 06:13
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

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)

@devicenull
devicenull / gist:3896763
Created October 16, 2012 01:25
Clonezilla Live iPXE config
:imaging
set image_name your-image-name
kernel http://${next-server}/tools/clonezilla-live/vmlinuz initrd=tools/clonezilla-live/initrd.img boot=live live-config noswap nolocales edd=on nomodeset ocs_daemonon="ssh" ocs_live_run="ocs-live-restore" ocs_live_extra_param="--batch -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk ${image_name} sda" ocs_live_keymap="/usr/share/keymaps/i386/qwerty/us.kmap.gz" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 nosplash fetch=http://${next-server}/tools/clonezilla-live/filesystem.squashfs ip=eth0:${netX/ip}:${netX/netmask}:${netX/gateway}:8.8.8.8 ocs_prerun="mount -t nfs ${next-server}:/home/partimag /home/partimag"
initrd http://${next-server}/tools/clonezilla-live/initrd.img
boot