This file contains hidden or 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
IyEvYmluL2Jhc2gKCmluc3RhbGxfZG9ja2VyX3JlcG8gKCkgewoJYXB0LWtleSBhZHYgLS1rZXlzZXJ2ZXIgaGtwOi8vcDgwLnBvb2wuc2tzLWtleXNlcnZlcnMubmV0OjgwIC0tcmVjdi1rZXlzIDU4MTE4RTg5RjNBOTEyODk3QzA3MEFEQkY3NjIyMTU3MkM1MjYwOUQKCWVjaG8gJ2RlYiBodHRwczovL2FwdC5kb2NrZXJwcm9qZWN0Lm9yZy9yZXBvIHVidW50dS10cnVzdHkgbWFpbicgPiAvZXRjL2FwdC9zb3VyY2VzLmxpc3QuZC9kb2NrZXIubGlzdAp9CgppbnN0YWxsX2dvbGFuZ19yZXBvICgpIHsKCWFwdC1rZXkgYWRkIC08PEVPRgotLS0tLUJFR0lOIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0KVmVyc2lvbjogU0tTIDEuMS41CkNvbW1lbnQ6IEhvc3RuYW1lOiBrZXlzZXJ2ZXIudWJ1bnR1LmNvbQoKbUkwRVRpeXlXd0VFQU9Pb3VnNDRGcHpNN3o4MTgrNzNSUUtwZ29RclRtU1JpcndROUZQYnhqNDJnUkRoelQrcHpUQmx5bzFxCmd3cHF6aFRZNXdZV2M5alFCV3hYM1lFZE5NNDJhQlNCbGh5L2FDOHpqNmRxWk1jUlAwLzZJbU15K2RnWE01OVFpR1Z3OEN3RAo1NHZtWHBnVFp5N2lPelJvOWY3cmw1ME1zYmZJYmF3eDJ3UWlJVHV6QUJFQkFBRzBJVXhoZFc1amFIQmhaQ0JRVUVFZ1ptOXkKSUZWaWRXNTBkU0JNV0VNZ2RHVmhiWWk0QkJNQkFnQWlCUUpPTExKYkFoc0RCZ3NKQ0FjREFnWVZDQUlKQ2dzRUZnSURBUUllCkFRSVhnQUFLQ1JEVlNWOWxkalc1Y3hsN0JBRE1MRFFmcTkwU0g4dHBHTjMrOFpydEdIaGUrT3g1YUJqODNidmd6TDB5blErcwpw |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# Common VM configuration | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" | |
config.vm.synced_folder '.', '/home/vagrant/romana' | |
config.vm.provision "shell", inline: <<-EOF | |
apt-get install -y python-apt python-pip python-dev python-netaddr && pip install awscli ansible |
This file contains hidden or 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
{ | |
"Description": "hello there, security policies are fun!", | |
"Rules": [ | |
{ | |
"IsStateful": true, | |
"Ports": [ | |
80, | |
443 | |
], | |
"Protocol": "TCP" |
This file contains hidden or 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
create_remote_dirs () { while read line; do echo ssh $1 mkdir -p ${line/\./}; done; } | |
Stass-MacBook:log void$ find . -type d | create_remote_dirs myuser@myserver | |
find: ./com.apple.revisiond: Permission denied | |
ssh myuser@myserver mkdir -p | |
ssh myuser@myserver mkdir -p /apache2 | |
ssh myuser@myserver mkdir -p /asl | |
ssh myuser@myserver mkdir -p /com.apple.clouddocs.asl | |
ssh myuser@myserver mkdir -p /com.apple.revisiond | |
find: ./watchdogd/log: Permission denied | |
find: ./watchdogd: Permission denied |
This file contains hidden or 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 BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
from optparse import OptionParser | |
from urlparse import urlparse, parse_qs | |
import os | |
parser = OptionParser(usage="%prog --port") | |
parser.add_option('--port', default=8080, dest="port", type="int", | |
help="Port number to listen for incoming requests") |
This file contains hidden or 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
./romana segment add tenantname segmentname. --externalid <externalid> | |
./romana tenant add <tenantname> --externalid <externalid> |
This file contains hidden or 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
Example policy for traffic fro pod to host | |
``` | |
{ | |
"rules": [ | |
{ | |
"ports": [ | |
80 | |
], | |
"protocol": "TCP" | |
} |
This file contains hidden or 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
{ | |
"Caterpie": [1.04, 1.08], | |
"Weedle": [1.06, 1.1], | |
"Abra": [1.36, 1.95], | |
"Gloom": [1.48, 1.53], | |
"Oddish": [1.48, 1.51], | |
"Ponyta": [1.48, 1.5], | |
"Bellsprout": [1.54, 1.6], | |
"Bulbasaur": [1.53, 1.58], | |
"Weepinbell": [1.47, 1.59], |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
"math/big" | |
"os" | |
) | |
type dc struct { |
This file contains hidden or 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 -ex | |
replace_template_entries() { | |
MAP=$1 | |
REPLACEMENT_TAG=$2 | |
ACTION=$3 | |
TOOLCHAIN_DOCKERFILE="/tmp/testsetup" |