Skip to content

Instantly share code, notes, and snippets.

View gist:8c7abdf38d0ba2e11ce870dbbff50e44
root@debian:~# cat rado.los
Some git sub-modules are out of date or modified, please consider runnning:
git submodule sync --recursive
git submodule update --init --recursive
You can ignore this warning if you are not compiling any ChibiOS keyboards,
or if you have modified the ChibiOS libraries yourself.
Making ergodox/ez with keymap rado
View docker issue
set itermExists to false
tell application "Finder" to get application file id "com.googlecode.iterm2"
set itermExists to true
end try
set terminalScpt to path to resource "terminal.scpt" in directory "Scripts"
set itermScpt to path to resource "iterm.scpt" in directory "Scripts"
if itermExists then
import XenAPI
s.login_with_password('root', 'password')
rtomaszewski /
Created May 19, 2014
create a vm on isolated network
# (1)
$ xe vm-copy vm=vm-10 new-name-label=gateway-vm
$ xe network-list
$ xe vif-create network-uuid=b211707c-0f56-b33e-22b0-ad1816914b8a device=3 vm-uuid=4fb0febb-5659-f9b5-abf6-21cd63632c5b
$ xe vif-plug uuid=02600ba0-b040-733f-bcce-e64661dcb352
$ xe console vm=gateway-vm
# (2)
root@gateway-vm:/etc/network# cat interfaces
rtomaszewski /
Created May 17, 2014
create more vms using the import functions from xenserver
xe vm-export filename=vm-label1-export1.xva vm=vm-label
for i in $(seq 2 10); do
echo -n "creating vm $name "
uuid=$(xe vm-import filename=vm-label1-export1.xva preserve=false)
xe vm-param-set name-label=$name uuid=$uuid
xe vm-start vm=$name
set -e
set -x
template=`xe template-list name-label="Ubuntu Lucid Lynx 10.04 (64-bit)" --minimal`
vm=`xe vm-install template=$template new-name-label=vm-label`
network=`xe network-list bridge=xenbr0 --minimal`
vif=`xe vif-create vm-uuid=$vm network-uuid=$network device=0`
xe vm-param-set uuid=$vm other-config:install-repository=
rtomaszewski / vmware-workstation-xenserver.conf
Created May 14, 2014
VMware Workstation VM config for XenServer
View vmware-workstation-xenserver.conf
.encoding = "windows-1252"
config.version = "8"
virtualHW.version = "8"
numvcpus = "4"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "4096"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "xenserver5.vmdk"
ide1:0.present = "TRUE"
rtomaszewski / gist-type-command.c
Created Mar 30, 2014
Uses stdin of the shell to simulate input string and type a command to run.
View gist-type-command.c
#include <strings.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
rtomaszewski /
Last active Aug 29, 2015
list Openstack Rackspace cloud servers ip in more readable way
nova list | egrep -v 'ID|-----' | awk -F'|' '{print $2 }' | ( echo 'name pub-new(rc) ip priv-net ip init-net ip' ; while read cs; do nova show $cs | egrep ' name |accessIPv4|public network|private' | awk -F"|" '{for (i=1;i<=NF;i++) gsub (/^ */,"",$i); print $2,$3}' | sort | xargs echo | awk ' { print $4,$1,$2,$5,$6,$7,$8 }'; done ) | column -t
name pub-new(rc) ip priv-net ip init-net ip
APP01 accessIPv4 privatenetwork publicnetwork 1111:1a11:1111:2222:3333:2222:ff08:a1ce,
APP01 accessIPv4 privatenetwork publicnetwork,1111:2222:3333:4444:5555:ae11:ff08:70b5
APP02 accessIPv4 privatenetwork publicnetwork,1111:2222:3333:4444:5555:ae11:ff08:9586
APP03 accessIPv4 privatenetwork publicnetwork,1111:2222:3333:4444:5555:ae11:ff08:1300