Skip to content

Instantly share code, notes, and snippets.

@tpiperatgod
tpiperatgod / string.go
Last active May 3, 2021
Change '{}' to '[]' for handle JSONB in lib/pg/array.go
View string.go
package slices
import (
"bytes"
"database/sql/driver"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"strings"
View packstack-allinone-config.txt
[general]
# Path to a Public key to install on servers. If a usable key has not
# been installed on the remote servers the user will be prompted for a
# password and this key will be installed so the password will not be
# required again
CONFIG_SSH_KEY=/root/.ssh/id_rsa.pub
# Set to 'y' if you would like Packstack to install MySQL
CONFIG_MYSQL_INSTALL=y
@tpiperatgod
tpiperatgod / W3GFileHandler.py
Created Apr 16, 2014
war3 rep file handler
View W3GFileHandler.py
#!/usr/bin/env python
# *-*coding:utf-8*-*
import os
import zlib
import binascii
class W3GFileHandler(object):
def __init__(self, file):
View create_vm.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
TMP_INSTANCE_UUID = ''
NETWORK_ID = ''
IMAGE_ID = ''
FLAVOR_ID = ''
DEST_HOST = ''
@tpiperatgod
tpiperatgod / keystone_data.sh
Created Dec 20, 2013
keystone data import shell
View keystone_data.sh
#!/bin/sh
#
# Keystone basic configuration
# Mainly inspired by https://github.com/openstack/keystone/blob/master/tools/sample_data.sh
# Modified by Bilel Msekni / Institut Telecom
#
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
@tpiperatgod
tpiperatgod / openstack-ceilometer-agent-compute
Last active Sep 2, 2019
openstack-ceilometer-agent-compute
View openstack-ceilometer-agent-compute
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=agent-compute
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
@tpiperatgod
tpiperatgod / openstack-ceilometer-agent-central
Created Nov 5, 2013
openstack-ceilometer-agent-central
View openstack-ceilometer-agent-central
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=agent-central
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
View openstack-ceilometer-api
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=api
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
View openstac-ceilometer-collector
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=collector
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
@tpiperatgod
tpiperatgod / ceilometer.conf.sample
Created Nov 5, 2013
a sample of ceilometer.conf (@ceilometer-2013.1.4)
View ceilometer.conf.sample
##########################
# ceilometer.conf sample #
##########################
[DEFAULT]
######## defined in ceilometer.counter ########
# Source for counters emited on this instance (string value)
counter_source=openstack