Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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)"

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 / linkscraper
Created November 11, 2013 09:50
For scraping links
#!/usr/bin/python
from bs4 import BeautifulSoup
from urllib2 import urlopen
import re
import os
def getAllLinks(url):
print "getting links..."
soup = BeautifulSoup(urlopen(url).read()) # make some soup
@d6e
d6e / history.txt
Created January 23, 2014 18:19 — forked from oxtopus/history.txt
sudo apt-get update
sudo apt-get install python-dev git python-pip automake libtool libssl-dev
git clone https://github.com/numenta/nupic.git
mkdir -p nta/eng
echo "
export NTA=$HOME/nta/eng
export NUPIC=$HOME/nupic
export BUILDDIR=/tmp/ntabuild
export MK_JOBS=3
source $HOME/nupic/env.sh" >> ~/.bashrc
@d6e
d6e / s3Backup.sh
Last active August 29, 2015 13:56
#!/bin/bash
#
# Backup Script
#
#=====================================================================
#=====================================================================
# Set the following variables to your system needs
#=====================================================================
# Directory to save daily tar.gz backup files to e.g /backups
#!/bin/sh
####################################################################
# #
# Basic Backup Script for MediaWiki. #
# Created by Daniel Kinzler, brightbyte.de, 2008 #
# #
# This script may be freely used, copied, modified and distributed #
# under the sole condition that credits to the original author #
# remain intact. #
@d6e
d6e / gist:9281091
Created February 28, 2014 22:12
keybase.md
### Keybase proof
I hereby claim:
* I am paritybit0 on github.
* I am paritybit (https://keybase.io/paritybit) on keybase.
* I have a public key whose fingerprint is 3F00 CA46 4E08 1B22 04AE 7842 EF64 151C D1B1 B13E
To claim this, I am signing this object: