Skip to content

Instantly share code, notes, and snippets.

View yankcrime's full-sized avatar
🤠
┬──┬◡ノ(° -°ノ)

Nick Jones yankcrime

🤠
┬──┬◡ノ(° -°ノ)
View GitHub Profile
@yankcrime
yankcrime / pipeline.yaml
Created January 13, 2016 10:13
Amended pipeline.yaml that helps address https://bugs.launchpad.net/ceilometer/+bug/1457440
sources:
- name: meter_source
interval: 600
meters:
- "!disk.*"
- "*"
sinks:
- meter_sink
- name: cpu_source
interval: 600
@yankcrime
yankcrime / neutronlistorphans.py
Created January 5, 2016 17:54
List orphaned Neutron objects via the OpenStack APIs
#!/usr/bin/env python
import os
import sys
import keystoneclient.v2_0.client as ksclient
import neutronclient.v2_0.client as nclient
def usage():
print "listorphans.py <object> where object is one or more of",
print "'networks', 'routers', 'subnets', 'floatingips' or 'all'"
@yankcrime
yankcrime / common.pp
Created October 14, 2015 15:43
nova::vncserver::common
# == Class: nova::vncproxy::common
#
# [*vncproxy_host*]
# (optional) The host of the VNC proxy server
# Defaults to false
#
# [*vncproxy_protocol*]
# (optional) The protocol to communicate with the VNC proxy server
# Defaults to 'http'
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Ensure everyone is running a consistent vagrant version
Vagrant.require_version '~> 1.7.2'
Vagrant.configure('2') do |config|
config.vm.box = 'puppetlabs/ubuntu-14.04-64-puppet'
config.vm.box_version = '1.0.1'
config.vm.box_check_update = true
heat_template_version: 2014-10-16
description: Demo template to deploy a pair of webservers and a loadbalancer
parameters:
key_name:
type: string
description: Name of SSH keypair to be used for compute instance
flavor:
type: string
heat_template_version: 2014-10-16
description: Deploy a CoreOS cluster
parameters:
count:
description: Number of CoreOS machines to deploy
type: number
default: 3
constraints:
@yankcrime
yankcrime / listorphans.py
Last active August 29, 2015 14:19
List orphaned network objects in OpenStack
#!/usr/bin/env python
import os
import sys
import keystoneclient.v2_0.client as ksclient
import neutronclient.v2_0.client as nclient
def usage():
print "listorphans.py <object> where object is one or more of",
print "'networks', 'routers', 'subnets', 'floatingips' or 'all'"
@yankcrime
yankcrime / gist:1ef93725df63e9f3cda5
Created January 21, 2015 10:54
ownCloud Dockerfile
FROM ubuntu:12.04
MAINTAINER Nick Jones "nick@dischord.org"
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" >> /etc/apt/sources.list
RUN apt-get -y update
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN locale-gen en_US en_US.UTF-8
RUN dpkg-reconfigure locales
# nick's .bashrc
# nick@dischord.org
# basics
set -o vi
set show-all-if-ambiguous on
shopt -s checkwinsize
PATH=/usr/local/bin:$PATH:~/bin:~/.rvm/bin:/Applications/VMware\ Fusion.app/Contents/Library:/usr/local/sbin:/usr/texbin/
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
#
# Thanks:
# @gf3
# @mathiasbynens
#
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color