Skip to content

Instantly share code, notes, and snippets.

View rbtcollins's full-sized avatar
💭
I may be slow to respond.

Robert Collins rbtcollins

💭
I may be slow to respond.
View GitHub Profile
//Copy this over the contents at tddbin.com
//Replace the [] in the assert statements with a functional equivalant
//Reference here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
//Lambda syntax: (x,y) => x + y, works in firefox, try it out :)
function range(start, end, jump) {
jump = jump || 1
if (start && !end)
return actualRange(0, start, jump)
return actualRange(start, end, jump)
deploy instance, copy image in to /mnt/foo.qcow2
apt-get install qemu-utils
modprobe nbd max_part=16
qemu-nbd -c /dev/nbd1 imagefile
mkdir /mnt/2
mount /dev/nbd1p1 /mnt/2
rsync -axv /mnt/2/ / --delete-after
apt-get install qemu-utils
umount /mnt/2
qemu-nbd -d /dev/nbd1