Skip to content

Instantly share code, notes, and snippets.

@gbin
gbin / PluginMaker.py
Last active July 24, 2019 21:16
This is an example plugin for errbot generating plugins and commands dynamically
from errbot import BotPlugin, botcmd
class PluginMaker(BotPlugin):
""" Example demonstrating how to create an errbot plugin out of thin air.
This basically generates a plugin from scratch and registers it at activation.
"""
def activate(self):
super().activate()
config_opts['root'] = '<%= distro %>-<%=version %>-<%= architecture %>'
config_opts['target_arch'] = '<%= architecture %>'
config_opts['legal_host_arches'] = ('i386', 'x86_64')
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = 'c<%= version %>' # only useful for --resultdir variable subst
config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
@kgadek
kgadek / graphite.md
Last active August 29, 2015 14:02 — forked from ashrithr/graphite.md

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

@ashrithr
ashrithr / graphite.md
Last active September 27, 2020 20:10
Installing graphite 0.10, collectd and grafana on centos 6

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

@snobear
snobear / clone.py
Last active October 17, 2023 06:39
Clone VM from template with pyVmomi
#!/usr/bin/env python
"""
NOTE:
This gist has been moved to EZmomi:
https://github.com/snobear/ezmomi
Give it a star or fork. Contributions are more than welcome. I'm hoping it will become an easy cli tool for
common VMware tasks.
@ryanycoleman
ryanycoleman / centos_6_vagrantfile
Last active December 21, 2015 08:09
PuppetConf DevDay 2013 Cut-sheet
# -*- mode: ruby -*-
# vi: set ft=ruby :
# For the most part, this is a stock config from `vagrant init`
Vagrant.configure("2") 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.
@11xor6
11xor6 / install-cloud-init.sh
Last active December 12, 2015 07:28
Install cloud-init on RHEL or Centos 6 for use on AWS.
# We need the latest epel-release for a RHEL/Centos specific cloud-init
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# After this finishes you can build an AMI that will process the user data
# with cloud-init. You may also be interested in taking a look at the config
# file at /etc/cloud/cloud.cfg
yum install cloud-init