This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
def get_freq | |
File.readlines('/proc/cpuinfo').each do |line| | |
next unless line.match(/^cpu MHz/) | |
return line.split(/:/).last.strip.to_f * 1048576 | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
# only run one instance | |
LOCKFILE=/tmp/pg_backup.lock | |
[ -f $LOCKFILE ] && { echo "Error: $LOCKFILE exists"; exit 1; } >&2 | |
touch $LOCKFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2015-04-30 | |
description: set up the redis cluster | |
parameters: | |
default_image: | |
type: string | |
label: default base image | |
description: glance image id of the base image | |
default: centos-7.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sensu_plugin import SensuPluginCheck | |
import alooma | |
class AloomaRestreamCheck(SensuPluginCheck): | |
def setup(self): | |
self.parser.add_argument( | |
'-w', | |
'--warning', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/chef/embedded/bin/ruby | |
# | |
# Create/manage Cinder volume snapshots | |
# | |
require 'mixlib/shellout' | |
require 'fog/openstack' | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: Endpoints | |
apiVersion: v1 | |
metadata: | |
name: glusterfs-cluster | |
subsets: | |
- addresses: | |
- ip: 10.138.0.8 | |
ports: | |
- port: 49152 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# heka.toml | |
[hekad] | |
base_dir = '/tmp/heka' | |
[boot] | |
type = "LogstreamerInput" | |
log_directory = '/var/log' | |
file_match = 'boot\.log' | |
[pulse] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up audit logging for connections outbound from the bastion | |
default['openssh']['client'].tap do |client| | |
client['permit_local_command'] = 'yes' | |
client['local_command'] = '/usr/bin/logger -p INFO -t AUTH %u signed into %h:%p as %r' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
class Rundganger | |
attr_accessor :coordinates, :path | |
def initialize | |
@coordinates = [0,0,0] | |
@path = [] << @coordinates.clone | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: kibana-doorman | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
nginx.ingress.kubernetes.io/use-regex: "true" | |
nginx.ingress.kubernetes.io/server-snippet: | | |
location = / { return 308 https://$best_http_host/_plugin/kibana; } | |
spec: |