Skip to content

Instantly share code, notes, and snippets.

Installation:

  1. Place hyperboria.sh in /etc/init.d/hyperboria
  2. chmod +x /etc/init.d/hyperboria
  3. update-rc.d hyperboria defaults

This will cause it to automatically start with your computer. You can control it with /etc/init.d/hyperboria . Some systems (Ubuntu, not sure about others) allow you to use the service command, which shortens the command to `service hyperboria

@d6e
d6e / MTG_price_scraper.py
Created June 1, 2013 07:04
A scraper for looking up the prices various magic the gathering cards given a list of card names.
#! /usr/bin/env python
import sys
import os
import re
import csv
try:
import requests
except:
print "Install requests (sudo easy_install requests)"
@d6e
d6e / mod_vm.sh
Created May 29, 2013 18:07
For modifying VMs
#!/bin/bash
set -x
ls /etc/libvirt/qemu/ | grep ".xml" | sed s/.xml// > vm-names.txt
for name in $(cat vm-names.txt); do
# dumping xml files
virsh dumpxml $name > ${name}.xml
@d6e
d6e / kvm_install_vm.sh
Created May 29, 2013 18:06
Creates a new vm on kvm/qemu
#!/bin/bash
host="[email protected]"
if [ ! -f vm-namelist.txt ];
then
echo "vm-namelist.txt does not exist. You should create a it. (Make a list of names for the VMs)"
fi
@d6e
d6e / migrateVM.sh
Last active December 17, 2015 21:09
For migrating vm's from one hypervisor to the next.
#!/bin/bash
if test "$1" == "" ; then
echo "### Usage ###"
echo "migrate.sh <domain> <user@remotehost>"
exit
fi
if [[ $(virsh list | egrep -o $1) != "" ]]
then