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
Very Basic Inspector Environment Set Up for Keystone CADF events (Complete WIP, Do not trust this yet!) | |
Install / Vagrant up Ubuntu 14.04 or later | |
clone devstack | |
git clone https://git.openstack.org/openstack-dev/devstack | |
My localrc |
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
class Pizza(object): | |
def __init__(self): | |
self.toppings = [] | |
def __call__(self, topping): | |
# when using '@instance_of_pizza' before a function def | |
# the function gets passed onto 'topping' | |
self.toppings.append(topping()) | |
def __repr__(self): | |
return str(self.toppings) |
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
wget http://download.virtualbox.org/virtualbox/5.0.2/VBoxGuestAdditions_5.0.2.iso | |
sudo mkdir /media/iso | |
sudo mount -o loop ./VBoxGuestAdditions_5.0.2.iso /media/iso | |
sudo bash /media/iso/VBoxLinuxAdditions.run --nox11 | |
sudo umount /media/iso | |
on guest: | |
sudo mount -t vboxsf <shared_folder_name> ~/<local_shared_folder>/ |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
return 301 https://nfv.space$request_uri; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-Content-Type-Options nosniff; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://avatars.githubusercont$nt.com; img-src *; style-src https: 'unsafe-inline'; font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com; object-src 'none'"; | |
} |
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
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') |
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/python | |
# | |
# Copyright (c) 2016 Red Hat | |
# Luke Hinds ([email protected]) | |
# This program and the accompanying materials | |
# are made available under the terms of the Apache License, Version 2.0 | |
# which accompanies this distribution, and is available at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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/python | |
# | |
# Copyright (c) 2016 Red Hat | |
# Luke Hinds ([email protected]) | |
# This program and the accompanying materials | |
# are made available under the terms of the Apache License, Version 2.0 | |
# which accompanies this distribution, and is available at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
[undercloud] | |
port = 22 | |
user = stack | |
remotekey = /home/stack/.ssh/id_rsa | |
localkey = /home/opnfv/.ssh/overCloudKey | |
[controller] | |
port = 22 | |
user = heat-admin | |
scantype = xccdf |
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
lambda is just a fancy way of saying function. Other than its name, there is nothing obscure, intimidating or cryptic about it. When you read the following line, replace lambda by function in your mind: | |
>>> f = lambda x: x + 1 | |
>>> f(3) | |
4 | |
It just defines a function of x. Some other languages, like R, say it explicitly: |
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
diff -rupN original/Makefile new/Makefile | |
--- original/Makefile 2006-06-11 10:52:50.000000000 -0500 | |
+++ new/Makefile 2016-06-14 14:12:05.000000000 -0500 | |
@@ -1,5 +1,5 @@ | |
CC = gcc | |
-CFLAGS = -O2 | |
+CFLAGS = -O2 -DHAVE_openpty | |
VERSION = 1.0.8 | |
TARGET = ttyrec ttyplay ttytime |
OlderNewer