Skip to content

Instantly share code, notes, and snippets.

Avatar

Lars Kellogg-Stedman larsks

View GitHub Profile
View simple.env
# vim: set ft=yaml :
parameters:
public_net_id: 9624fa1b-aae7-4670-932a-733653fec250
nameserver: 192.168.200.1
key_name: lars
View simple.yml
heat_template_version: 2013-05-23
description: >
A three-node openstack deployment.
parameters:
image:
type: string
default: cirros
description: ID of the image to use for the instance
View gist:8725413
Given this (partial template):
wait0_handle:
type: AWS::CloudFormation::WaitConditionHandle
wait0:
type: AWS::CloudFormation::WaitCondition
properties:
Handle: {get_resource: wait0_handle}
Timeout: 1800
View -
#!/bin/sh
log () {
echo "${0##*/} $(date): $1" >&2
}
die () {
log "ERROR: $1"
exit 1
}
View stack
#!/bin/sh
log () {
echo "${0##*/} $(date): $1" >&2
}
die () {
log "ERROR: $1"
exit 1
}
View floatreport
#!/usr/bin/env python
# Does anyone know if there is a better way to get a list of floating IPs, the VM
# & project they are associated with? currently I am querrying the DB: SELECT
# floatingips.floating_ip_address AS IP, instances.display_name AS VM,
# project.name AS PROJECT FROM quantum.floatingips LEFT JOIN (keystone.project)
# ON (floatingips.tenant_id=project.id) LEFT JOIN (nova.instances, quantum.ports)
# ON (fixed_port_id=ports.id AND instances.uuid=ports.dev
import os
View floatreport
#!/usr/bin/env python
# Does anyone know if there is a better way to get a list of floating IPs, the VM
# & project they are associated with? currently I am querrying the DB: SELECT
# floatingips.floating_ip_address AS IP, instances.display_name AS VM,
# project.name AS PROJECT FROM quantum.floatingips LEFT JOIN (keystone.project)
# ON (floatingips.tenant_id=project.id) LEFT JOIN (nova.instances, quantum.ports)
# ON (fixed_port_id=ports.id AND instances.uuid=ports.dev
import os
View constraint.yml
flavor:
type: string
default: m1.tiny
constraints:
- allowed_values: [m1.nano, m1.tiny, m1.small, m1.large]
View vfolders
virtual-mailboxes \
"INBOX" "notmuch://?query=tag:inbox AND NOT tag:archive" \
"mentions" "notmuch://?query=larsks AND NOT to:lars@redhat.com AND NOT from:lars@redhat.com AND NOT to:larsks AND NOT from:larsks AND tag:unread" \
\
"tag/important" "notmuch://?query=tag:flagged" \
"tag/interesting" "notmuch://?query=tag:interesting" \
"tag/following" "notmuch://?query=tag:following&type=threads" \
"tag/cfp" "notmuch://?query=tag:cfp" \
\
"bugs" "notmuch://?query=tag:bug AND tag:unread &limit=200" \
View -
#include
http://myserver.example.com/somescript.sh
http://myserver.example.com/cloud-config.cfg