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
{ | |
"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
# -*- 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
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
#!/bin/bash -e | |
# creating snapshot of jenkins instance | |
MOUNTPOINT=/u1 | |
DEVICE="/dev/xvdf" # TODO discover | |
AWS_DEVICE="/dev/sdf" | |
LINEAGE="ci" | |
KEEP=10 # how many shapshots to keep |
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
{ | |
'status': u'DOWN', | |
'binding: host_id': u'ip-192-0-2-180', | |
'allowed_address_pairs': [ | |
], | |
'extra_dhcp_opts': [ | |
], | |
'device_owner': u'network: dhcp', |
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
{ | |
'status': 'DOWN', | |
'binding: host_id': u'ip-192-0-2-180', | |
'allowed_address_pairs': [ | |
], | |
'device_owner': 'network: dhcp', | |
'binding: profile': { | |
}, |
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 -x | |
if ! ls /etc/apt/sources.list.d/ | grep project-calico-icehouse-trusty.list; then | |
dpkg --add-architecture i386 | |
apt-add-repository -y ppa:project-calico/icehouse | |
fi | |
apt-get update && apt-get install -y git docker.io | |
IP=`ec2metadata --local-ipv4` |
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
void@tahr:/tmp/tmp.6ZYoSGn0V1$ cat Makefile | |
a := foo | |
b := bar | |
var := $(sort $(a) $(b)) | |
all: | |
echo $(var) | |
void@tahr:/tmp/tmp.6ZYoSGn0V1$ make | |
echo bar foo | |
bar foo |
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
==terminal 1=== | |
ip netns add space-a | |
ip netns add space-b | |
ip link add veth0 type veth peer name veth1 | |
ip link set veth1 netns space-a | |
ip link add veth2 type veth peer name veth3 | |
ip link set veth3 netns space-b | |
ifconfig veth0 10.0.0.0/31 up | |
ifconfig veth2 10.0.0.2/31 up | |
route add -host 10.0.0.1 dev veth0 |