Skip to content

Instantly share code, notes, and snippets.

View peoplemerge's full-sized avatar

Dave Thomas peoplemerge

View GitHub Profile
@peoplemerge
peoplemerge / map-ecs-containers
Last active August 29, 2015 14:16
Map Amazon Elastic Container Service (ECS) tasks to the hosts by tag.
#!/usr/bin/env python
import boto
import boto.ec2
cluster_name='default'
ecs_conn=boto.connect_ec2containerservice(host='ecs.us-west-2.amazonaws.com')
task_response = ecs_conn.list_tasks(cluster=cluster_name)
tasks = task_response['ListTasksResponse']['ListTasksResult']['taskArns']
@peoplemerge
peoplemerge / fpScalaCh2.sc
Last active August 29, 2015 14:13
Manning, Functional Programming in Scala by Chuiusano and Bjarnason: my code notes
//From ch2, polymorphic functions
// there are more optimal and elegant solutions, but these are the natural progressom from the book
def fib(n: Int): Int ={
def nf(ctr: Int, c: Int, p: Int): Int ={
if(ctr < n-1)
nf(ctr + 1, c+p,c)
else
c
####
# Description:a ruby script to monitor metaq queue size
# Requirements: zookeeper
# sudo gem install zookeeper
#
#####
require 'rubygems'
require 'zookeeper'
require 'socket'
@peoplemerge
peoplemerge / curl-marconi.sh
Last active August 29, 2015 14:04
A simple msgpack test for openstack-marconi using JSON input
python sample_json2msgpack.py
cat msg.pck |curl -i -X POST http://127.0.0.1:8888/v1.1/queues/samplequeue/messages -H "Content-type: application/x-msgpack" -H "Client-ID: 507b06b1-f6a6-4818-a241-cc19a312fac9" -H 'Accept: application/json, application/x-msgpack' --data-binary @-
@peoplemerge
peoplemerge / gist:9300905
Created March 2, 2014 02:20
includes/jquery_menu_small
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
<style>
*{
margin:0;
padding:0;
}
</style>
<!--[if lte IE 6]>
@peoplemerge
peoplemerge / gist:9300897
Created March 2, 2014 02:18
includes/jquery_menu/index.html
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
<style>
*{
margin:0;
padding:0;
}
</style>
<!--[if lte IE 6]>
(slonikis-cloud) ubuntu@apollo:~/tripleo-incubator$ neutron port-list
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| 8e6f5ad4-3686-42f8-880e-99020f4940f9 | | fa:16:3e:88:b8:53 | {"subnet_id": "8fb8bd9f-66c9-47c7-8963-721412bfd859", "ip_address": "192.0.2.2"} |
| c87527cf-cb73-49ee-b383-49b521675e73 | | 00:16:c6:b9:8f:b2 | {"subnet_id": "8fb8bd9f-66c9-47c7-8963-721412bfd859", "ip_address": "192.0.2.3"} |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
After correcting MAC addy:
(slonikis-cloud) ubuntu@apollo:~/tripleo-incubator$ scripts/devtest_undercloud.sh $TE_DATAFILE
Building elements: base ubuntu boot-stack nova-baremetal os-collect-config dhcp-all-interfaces neutron-dhcp-agent pip-cache pypi-openstack use-ephemeral use-ephemeral
Expanded element dependencies to: iptables network-utils os-collect-config pypi-openstack openstack-clients mysql neutron-openvswitch-agent use-ephemeral os-svc-install boot-stack heat base ubuntu neutron-ovs-cleanup glance os-apply-config dhcp-all-interfaces heat-engine dpkg dkms os-refresh-config pip-cache source-repositories nova-compute nova-baremetal rabbitmq-server nova neutron-dhcp-agent cache-url keystone neutron-server novnc nova-api dib-run-parts heat-api neutron
[sudo] password for ubuntu:
Building in /tmp/image.n0sxX6M4
dib-run-parts Sun Feb 9 00:37:57 PST 2014 Running /tmp/image.n0sxX6M4/hooks/root.d/01-ccache
dib-run-parts Sun Feb 9 00:37:57 PST 2014 01-ccache completed
dib-run-parts Sun Feb 9 00:37:57 PST 2014 Running /tmp/image.n0sxX6
@peoplemerge
peoplemerge / gist:8863542
Created February 7, 2014 14:27
error output for testenv
(tigertears) ubuntu@ubuntu-ThinkPad-T61:~/tripleo-incubator$ scripts/devtest_testenv.sh ../tiger-cloud/tears.json
Network brbm defined from /dev/fd/63
Network brbm marked as autostarted
Network brbm started
seed VM not running
@peoplemerge
peoplemerge / java.env
Created September 5, 2012 22:37 — forked from dln/java.env
Zookeeper RPM spec for CentOS 5.x, including python bindings
ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
ZOO_LOG_DIR="/var/log/zookeeper/"