Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Since Opera 51, Opera does not support Trusty even though Trusty is not EOL.
#
# Opera will refuse to install on Trusty only beacuse the new opera package requires libdbus-1-3 (>= 1.9.14)
# However, opera works perfectly well with libdbus-1-3 (>= 1.6.18) on Trusty.
# This script alters the package requirement in order to be able to install opera on Ubuntu Trusty
#
# This script is provided as is, is not afiliated to Opera Software and comes with no support at all.
# Use at your own risks.
#!/usr/bin/env python
'''
Save this file and add the following line to your ~/.bashrc"
export PYTHONSTARTUP="$HOME/.pythonrc"
'''
def run_from_ipython():
try:
__IPYTHON__
return True
#!/usr/bin/env python
"""
Quick and dirty workaround for https://bugs.launchpad.net/heat/+bug/1599104
add rabbitmq_management plugin:
sudo /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart
install rabbitmqadmin which is provided by rabbitmq_management:
cd /usr/bin
@ygbourhis
ygbourhis / redshift-auto-set-manual-location
Last active January 3, 2018 16:31
due to https://bugs.launchpad.net/ubuntu/+source/redshift/+bug/868904 set redshift to use a manual location and configure this location automaticaly
#!/usr/bin/env python
import ConfigParser
import Geoclue
import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import sys
import time
# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
# NOTE: Copy this file to the root ``devstack`` directory for it to
# work properly.
# ``local.conf`` is a user-maintained setings file that is sourced from ``stackrc``.
# This gives it the ability to override any variables set in ``stackrc``.
# Also, most of the settings in ``stack.sh`` are written to only be set if no
# value has already been set; this lets ``local.conf`` effectively override the
# default values.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@ygbourhis
ygbourhis / cloud_archive_juno.list
Last active February 2, 2016 16:38
devstack cloud_archive_juno.list
deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/juno main
@ygbourhis
ygbourhis / initrc
Created January 28, 2015 13:23
devstack initrc
export OS_USERNAME=demo
export OS_TENANT_NAME=demo
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0
export OS_PASSWORD=password
@ygbourhis
ygbourhis / bootstrap.sh
Last active August 29, 2015 14:14
bootstrap.sh (used by Vagrantfile)
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y ubuntu-cloud-keyring
cp /vagrant/cloud_archive_juno.list /etc/apt/sources.list.d/
apt-get update
apt-get upgrade -y
apt-get install -y apt-file apache2 bpython bridge-utils curl dhcpdump dnsmasq-base dnsmasq-utils ebtables euca2ools gawk gcc genisoimage git gir1.2-gnomekeyring-1.0 htop iftop iptables iputils-arping iputils-ping ipython kpartx libffi-dev libjs-jquery-tablesorter libldap2-dev libmysqlclient-dev libpq-dev libsasl2-dev libvirt-dev libxml2-dev libxml2-utils libxslt1-dev locate lsof lvm2 memcached mongodb-clients mongodb-server msgpack-python nbd-client nodejs open-iscsi open-iscsi-utils openssh-server openssl openvpn parted psmisc pylint python-boto python-carrot python-cheetah python-cmd2 python-configobj python-coverage python-dateutil python-dev python-eventlet python-feedparser python-gflags python-greenlet python-iso8601 python-kombu python-libvirt python-libxml2 python-lockfile python-lxml python-m2cr
@ygbourhis
ygbourhis / Vagrantfile
Last active August 29, 2015 14:14
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.