Skip to content

Instantly share code, notes, and snippets.

View lukehinds's full-sized avatar
🏃‍♂️
Either running or coding.

Luke Hinds lukehinds

🏃‍♂️
Either running or coding.
View GitHub Profile
config_opts['root'] = 'dlrn-centos7-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'install basesystem rpm-build python2-devel gcc make python-sqlalchemy python-webob ghostscript graphviz python-sphinx python-eventlet python-six python-pbr python3-pbr rdo-rpm-macros git'
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
config_opts['plugin_conf']['ccache_enable'] = False
config_opts['yum.conf'] = """
[main]
#!/bin/bash
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
# Check if domain already exists
virsh dominfo $1 > /dev/null 2>&1
for stack in $(heat stack-list | grep -i failed | awk '{ print $2 }'); do
for nstack in $(heat stack-list --show-nested | grep $stack | grep -i failed | awk '{ print $2 }'); do
for resource in $(openstack stack resource list -n10 $nstack | grep -i failed | awk '{ print $2 }'); do
deployments=$(openstack stack resource list -n10 $nstack | grep -i failed | grep -i $resource | grep Deployment | awk '{ print $4 }')
if [ ! -z "$deployments" ]; then
for deployment in $deployments; do
heat deployment-show $deployment
done
fi
done
<cpe-list xmlns="http://cpe.mitre.org/dictionary/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cpe.mitre.org/dictionary/2.0 http://cpe.mitre.org/files/cpe-dictionary_2.1.xsd">
<cpe-item name="cpe:/o:redhat:enterprise_linux:7">
<title xml:lang="en-us">Red Hat Enterprise Linux 7</title>
<!-- the check references an OVAL file that contains an inventory definition -->
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="ssg-rhel-osp7-cpe-oval.xml">oval:ssg-installed_OS_is_rhel7:def:1</check>
</cpe-item>
<cpe-item name="cpe:/o:centos:centos:7">
<title xml:lang="en-us">CentOS 7</title>
<!-- the check references an OVAL file that contains an inventory definition -->
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="ssg-rhel-osp7-cpe-oval.xml">oval:ssg-installed_OS_is_centos7:def:1</check>
<ns0:Benchmark xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://checklists.nist.gov/xccdf/1.1" xmlns:ns2="http://www.w3.org/2000/svg" id="RHEL-7-OSP" resolved="1" style="SCAP_1.1" xml:lang="en-US">
<ns0:status date="2016-11-03">draft</ns0:status>
<ns0:title xml:lang="en-US">Guide to the Secure Configuration of Red Hat OpenStack Platform 7</ns0:title>
<ns0:description xml:lang="en-US">This guide presents a catalog of security-relevant
configuration settings for Red Hat OpenStack Platform 7. It is a rendering of
content structured in the eXtensible Configuration Checklist Description Format (XCCDF)
in order to support security automation. The SCAP content is
is available in the <html:code>scap-security-guide</html:code> package which is developed at
<html:a href="https://www.open-scap.org/security-policies/scap-security-guide">https://www.open-scap.org/security-policies/scap-security-guide</html:a>.
<html:br />
import argparse
# Set up the main parser
parser = argparse.ArgumentParser(description='An awesome program')
# And the subparser
subparsers = parser.add_subparsers(
title='subcommands',
description='valid subcommands',
help='additional help')
/* Rofi */
#define r_bg #1d2021
#define r_fg #ebdbb2
#define r_hlfg #d65d0e
! States: bg, fg, bgalt, hlbg, hlfg
rofi.color-enabled: true
rofi.color-normal: r_bg,r_fg,#282828,r_bg,r_hlfg
rofi.color-urgent: r_bg,#fb4934,#282828,r_bg,r_hlfg
rofi.color-active: r_bg,r_fg,#282828,r_bg,#fe8019
#!/bin/bash
# With LANG set to everything else than C completely undercipherable errors
# like "file not found" and decoding errors will start to appear during scripts
# or even ansible modules
LANG=C
DEFAULT_OPT_TAGS="untagged,provision,environment,undercloud-scripts,overcloud-scripts,undercloud-install,undercloud-post-install"
: ${OPT_BOOTSTRAP:=0}
@lukehinds
lukehinds / checkfile.go
Created January 25, 2017 19:43
Simple unix file wrapper in go
package main
import (
"os"
"os/exec"
)
func main() {
file := "/usr/bin/file"
arg := os.Args[1]
package main
import (
"bytes"
"fmt"
"golang.org/x/crypto/ssh"
"log"
"os"
)