Skip to content

Instantly share code, notes, and snippets.

Vish (Ishaya) Abrams vishvananda

Block or report user

Report or block vishvananda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vishvananda / vim
Created Feb 5, 2013
script for starting conole vim in homebrew with the Valloric/YouCompleteMe plugin . Put this in your path, for example as /usr/local/bin/vim
View vim
DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=/usr/local/Cellar/python/2.7.3/lib/libpython2.7.dylib /usr/local/Cellar/macvim/7.3-*/ "$@"
vishvananda /
Last active May 22, 2017
Script for setting an encrypted password on boot
#!/usr/bin/env bash
if ! curl -s -f > $SSH_KEYFILE; then
echo "Failed to get key"
PASSWORD=`openssl rand -base64 48 | tr -d '/+' | cut -c1-16`
sudo usermod ubuntu -p `openssl passwd -1 $PASSWORD`
View gist:3814291
commit 9d5cb9213493160c6df97bd527bd597e648901fa
Author: Vishvananda Ishaya <>
Date: Mon Sep 10 21:29:06 2012 -0700
fix nova-novncproxy package and dependencies
Change-Id: Ib5af0fdde528247b4634b5a18933f6eb9f260047
diff --git a/debian/control b/debian/control
index 1f6a702..9748a42 100644
View gist:3769012
diff --git a/nova/compute/ b/nova/compute/
index 42e9e50..0b2d2d5 100644
--- a/nova/compute/
+++ b/nova/compute/
@@ -1284,8 +1284,7 @@ class API(base.Base):
m[attr] = val
volume_id = m.get('volume_id')
- snapshot_id = m.get('snapshot_id')
- if snapshot_id and volume_id:
vishvananda / logging.conf
Created Sep 18, 2012
Logging config for nova using a pipe or special syslog
View logging.conf
keys = root
keys = file, nova_syslog
keys = legacynova
View gist:3669055
diff --git a/nova/tests/integrated/ b/nova/tests/integrated/
index 6f103f6..3f2f908 100644
--- a/nova/tests/integrated/
+++ b/nova/tests/integrated/
@@ -22,6 +22,7 @@ from nova import flags
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common.log import logging
+from nova.openstack.common import rpc
from nova import test
View gist:3587563
apt-get update
apt-get install -y linux-headers-virtual
apt-get install -y openvswitch-datapath-dkms
apt-get install -y openvswitch-switch openvswitch-controller openvswitch-brcompat
/etc/init.d/openvswitch-switch start
ovs-vsctl add-br br0
sudo ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre options:remote_ip=
sudo ovs-vsctl add-port br0 gre1 -- set interface gre1 type=gre options:remote_ip=
ovs-vsctl add-port br0 test -- set interface test type=internal
ifconfig test up
vishvananda /
Created Aug 11, 2012
Translator to translate a python program into an equivalent program with a very limited set of characters
import os
with open('') as infile:
data =
def encode(char, sym):
return'+'.join([sym] * ord(char))
def write(outfile, wrap, boc, eoc, sep, sym='1'):
text = sep.join([boc + encode(char, sym) + eoc for char in data])
View gist:3188626
diff --git a/nova/virt/disk/ b/nova/virt/disk/
index e55b54f..c733045 100644
--- a/nova/virt/disk/
+++ b/nova/virt/disk/
@@ -294,7 +294,7 @@ def setup_container(image, container_dir=None, use_cow=False):
raise exception.NovaException(img.errors)
-def destroy_container(img):
+def destroy_container(image, container_dir=None, use_cow=False):
View gist:3080062
# Note, make sure to run nova-manage db sync first to create a sqlite database
from nova import db
from nova.db.sqlalchemy import models
from nova.db.sqlalchemy import session as sess
from nova import context
from sqlalchemy.orm import joinedload
def instance_get_joined(uuid, session):
with session.begin():
val = session.query(models.Instance).filter_by(deleted=False).options(joinedload('instance_type')).filter_by(uuid=uuid).first()
You can’t perform that action at this time.