Skip to content

Instantly share code, notes, and snippets.

@routelastresort
routelastresort / gist:6239650
Created August 15, 2013 09:45
git diff: vmnet11 added w/o dhcpd or host networking
diff --git a/netmap.conf b/netmap.conf
index 5966798..ed43cbf 100644
--- a/netmap.conf
+++ b/netmap.conf
@@ -1,8 +1,9 @@
-# This file is automatically generated.
+#This file is automatically generated.
# Hand-editing this file is not recommended.
+
network0.name = "Bridged"
@routelastresort
routelastresort / gist:6239487
Created August 15, 2013 09:16
Example git diff in /etc/vmware, after running Virtual Network Editor
diff --git a/netmap.conf b/netmap.conf
index 91b5934..5966798 100644
--- a/netmap.conf
+++ b/netmap.conf
@@ -4,5 +4,5 @@ network0.name = "Bridged"
network0.device = "vmnet0"
network1.name = "HostOnly"
network1.device = "vmnet1"
-network2.name = "NAT"
-network2.device = "vmnet8"
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@routelastresort
routelastresort / get-inventory-serial.rb
Created August 6, 2013 07:31
Test Netconf over Serial against a VSRX VM - the serial_port should change to whatever 'socat -d -d unix-connect:/tmp/socketname pty' tells you
require 'net/netconf/jnpr/serial'
puts "NETCONF v.#{Netconf::VERSION}"
serial_port = '/dev/pts/1'
login = { port: serial_port,
username: "netdevops",
password: "netdevops1" }
@routelastresort
routelastresort / gist:6162547
Created August 6, 2013 06:36
vsrxA.vmx modifications for serial output
serial0.present = "TRUE"
serial0.fileType = "pipe"
serial0.fileName = "/tmp/vsrxA.socket"
serial0.tryNoRxLoss = "TRUE"
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'