Skip to content

Instantly share code, notes, and snippets.

View krha's full-sized avatar

Kiryong Ha krha

  • Carnegie Mellon University
  • Pittsburgh
View GitHub Profile
@krha
krha / VM_TEMPLATE.xml
Created October 9, 2012 22:05
Cloudlet Template XML
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>cloudlet</name>
<uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1801</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>4</vcpu>
<cpu>
<topology sockets='1' cores='4' threads='1'/>
</cpu>
<os>
@krha
krha / rooting.sh
Created February 28, 2012 06:03
Rooting rootFS
#!/bin/bash
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NEWTYP=ext4
NEWMNT="/mnt/new-root"
OLDMNT="/mnt/old-root"
RUNLEVEL=`runlevel | awk '{print $2}'`
if [ $# -eq 1 ]
then
NEWDEV=$1
@krha
krha / odd.c
Created February 23, 2012 22:41 — forked from theonewolf/odd.c
odd static test in C
#include <stdio.h>
int good(int i)
{
i++;
return i;
}
int not_good(int i)
@krha
krha / pivot_root.sh
Created February 14, 2012 14:55
script for pivot_root
#!/bin/sh
# credential: http://www.bluegecko.net/amazon-web-services/ec2-persistent-boots-with-pivot-root/
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NEWDEV="/dev/xvdf1"
NEWTYP="ext4"
NEWMNT="/mnt/ebs"
OLDMNT="/mnt/old"
OPTIONS="noatime,rw"
SLEEP=1