Skip to content

Instantly share code, notes, and snippets.

View d0ugal's full-sized avatar
👋
Hi!

Dougal Matthews d0ugal

👋
Hi!
View GitHub Profile
@d0ugal
d0ugal / auto_star_openstack_repos.py
Last active May 25, 2016 13:34 — forked from jd/auto-star-openstack-repo
Starring all OpenStack Git repositories
#!/usr/bin/env python
from github import Github
import os
TOKEN = os.environ.get("GITHUB_TOKEN")
USERS = ("openstack", "stackforge", "openstack-dev", "openstack-infra", "openstack-attic", "stackforge-attic", "hackebrot")
g = Github(TOKEN)
me = g.get_user()
pages:
- Home: index.md
- User Guide:
- Writing your docs: index.md
- About:
- License: index.md
- Release Notes:
- Version 1: index.md
- Version 2: index.md
- Version 3: index.md

This is an example of a C program.

You can copy it and try to change some value to try the library.

I exptect you understand all liblapin function
</font color="#A0522D">



import os
from heatclient.v1.client import Client as heat_client
from keystoneclient.v2_0 import client as ksclient
def keystoneclient():
return ksclient.Client(
username=os.environ.get('OS_USERNAME'),
tenant_name=os.environ.get('OS_TENANT_NAME'),
This assumes you already have the API running on the undercloud. Run the
following commands on the undercloud.
$ git clone https://github.com/openstack/tripleo-heat-templates.git
$ python mkplan.py tripleo-heat-templates > plan.json
NOTE: You will need httpie installed for the following commands, otherwise you
can figure out curl ;). It can be installed with:
sudo yum install -y python-pip
sudo pip install httpie
@d0ugal
d0ugal / log
Created December 11, 2013 09:00
2013-12-10 13:17:11 + echo_summary 'Configuring and starting Horizon'
2013-12-10 13:17:11 + [[ -t 3 ]]
2013-12-10 13:17:11 + [[ True != \T\r\u\e ]]
2013-12-10 13:17:11 + echo -e Configuring and starting Horizon
2013-12-10 13:17:11 Configuring and starting Horizon
2013-12-10 13:17:11 + init_horizon
2013-12-10 13:17:11 + rm -f /vagrant/openstack/horizon/openstack_dashboard/local/dashboard_openstack.sqlite3
2013-12-10 13:17:11 + local_settings=/vagrant/openstack/horizon/openstack_dashboard/local/local_settings.py
2013-12-10 13:17:11 + cp /vagrant/openstack/horizon/openstack_dashboard/local/local_settings.py.example /vagrant/openstack/horizon/openstack_dashboard/local/local_settings.py
2013-12-10 13:17:11 + is_service_enabled neutron
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provision "shell", path: "provision.sh"
@d0ugal
d0ugal / gist:6320771
Last active December 21, 2015 14:39
Splitting a subdir into its own git repo.
1. cp -r old_repo new_repo
2. cd new_repo
3. For all branches you want to preserve, ensure you have local tracking branches setup: 'git checkout branch1'
4. git filter-branch --subdirectory-filter directory/to/split master branch1 ... (for preserving master and branch1)
5. Unless there are any tags you want to preserve, just remove all tags:
6. git tag -l | xargs git tag -d
7. git remote rm origin
8. git remote add origin git@new.remote.git
9. git gc
10. git config --add remote.origin.push '+refs/heads/*:refs/heads/*'
echo "Acquire::http::Proxy \"http://rpiapt:3142\";" > /etc/apt/apt.conf.d/01proxy;
# Call with: python mkplan.py tripleo-heat-templates > plan.json
import sys
import yaml
template_path = sys.argv[1]
import os
templates_dict = {}