Skip to content

Instantly share code, notes, and snippets.

View knikolla's full-sized avatar
🐢

Kristi Nikolla knikolla

🐢
View GitHub Profile
@knikolla
knikolla / Vagrantfile
Created May 19, 2016 16:30
toxman Vagrant
$bootstrap = <<SCRIPT
sudo apt-get update
sudo apt-get install -y git \
python-pip python-dev python3-dev \
libxml2-dev libxslt1-dev libpq-dev libffi-dev libldap2-dev \
libsasl2-dev
sudo pip install tox
SCRIPT
Vagrant.configure("2") do |config|
[knikolla@lenovo-moc1 k2k-openstackclient]$ git diff master..k2k
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py
index 56ddcba..0295116 100644
--- a/openstackclient/common/clientmanager.py
+++ b/openstackclient/common/clientmanager.py
@@ -205,6 +205,31 @@ class ClientManager(object):
if not self._auth_ref:
self.setup_auth()
LOG.debug("Get auth_ref")
+
@knikolla
knikolla / PowerPoll.py
Created February 7, 2016 18:14
Send a dbus message to upower to refresh device state every 5 seconds.
#!/usr/bin/python
# There is an issue with the power indicator on rMBP 13".
# upower doesn't indicate AC/Batt event change until it polls
# the device after 30 seconds of inactivity.
# Since 30 seconds is too long, using this script I force it
# to refresh after 5 seconds by using the dbus.
import os
import time
while True: