Skip to content

Instantly share code, notes, and snippets.

class Test(object):
def __init__(self):
self.x = "hello"
t = Test()
t.something = "something"
print(t.something)

Docker Installation

Mac OS X

Make sure you have Homebrew and Virtualbox installed on your machine

# Install docker
brew update
brew install docker boot2docker docker-compose
@soedar
soedar / .cvimrc
Last active October 10, 2015 16:41
cvimrc
map b :buffer<space>
map B :bookmarks<space>
let barposition = "bottom"
@soedar
soedar / gist:00b238ed633f1aa76187
Created January 24, 2016 02:09
kvm passthrough
#!/bin/bash
configfile=/etc/vfio-pci.cfg
vmname="windows10vm"
vfiobind() {
dev="$1"
vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
if [ -e /sys/bus/pci/devices/$dev/driver ]; then
File.readlines('input.txt').map(&:strip).chunk{|x| x != ''}.select{|x|x.first}.map{|x|x.last.join(' ').scan(/([^:]+):(\S+)\s?/).to_h}