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 bash | |
# Script partly from https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic#resizing-vhds | |
# Instantiate variables | |
input_file=$1 # Gets full filename (e.g. "CentOS-7-x86_64-GenericCloud-2009.qcow2") | |
input_filename="${input_file%.*}" # Gets just the name, without extension (e.g. "CentOS-7-x86_64-GenericCloud-2009") | |
input_format=$(qemu-img info --output json $1 | jq -r '.format') # Gets format of image, without relying on extension to be correct (e.g. "qcow2") | |
# Convert image to raw if input image isn't, and a raw version doesn't exist (e.g. hasn't already been created). | |
if [[ $input_format != "raw" ]] && [[ ! -f "${input_filename}.raw" ]]; then |
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 interfaces pt-1/0/0 description "VDSL Interface" | |
set interfaces pt-1/0/0 vlan-tagging | |
set interfaces pt-1/0/0 vdsl-options vdsl-profile auto | |
set interfaces pt-1/0/0 unit 0 encapsulation ppp-over-ether | |
set interfaces pt-1/0/0 unit 0 vlan-id 10 | |
set interfaces pp0 unit 1 description "PPPoE for VDSL" | |
set interfaces pp0 unit 1 ppp-options pap local-name "$username" | |
set interfaces pp0 unit 1 ppp-options pap local-password "$password" | |
set interfaces pp0 unit 1 ppp-options pap passive | |
set interfaces pp0 unit 1 pppoe-options underlying-interface pt-1/0/0.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
set interfaces ge-0/0/0 description "UFB Physical Uplink" | |
set interfaces ge-0/0/0 vlan-tagging | |
set interfaces ge-0/0/0 unit 0 description "UFB Logical Uplink" | |
set interfaces ge-0/0/0 unit 0 encapsulation ppp-over-ether | |
set interfaces ge-0/0/0 unit 0 vlan-id 10 | |
set interfaces pp0 unit 1 description "PPPoE for UFB" | |
set interfaces pp0 unit 1 ppp-options pap local-name "$username" | |
set interfaces pp0 unit 1 ppp-options pap local-password "$password" | |
set interfaces pp0 unit 1 ppp-options pap passive | |
set interfaces pp0 unit 1 pppoe-options underlying-interface ge-0/0/0.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/env python3 | |
from ncclient import manager | |
from ncclient.xml_ import * | |
import docker | |
# Functions | |
def get_docker_ip(container_name): | |
client = docker.APIClient(base_url='unix://var/run/docker.sock') |
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 python3 | |
import docker | |
from jnpr.junos import Device | |
from jnpr.junos.utils.config import Config | |
from jnpr.junos.exception import * | |
from lxml import etree | |
# Functions |
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
\documentclass[]{article} | |
\usepackage[utf8]{inputenc} | |
%%%%%%%%%%%% | |
% Packages % | |
%%%%%%%%%%%% | |
% Page Geometry (Size, Margins) | |
\usepackage{geometry} | |
\geometry{ |