Skip to content

Instantly share code, notes, and snippets.

View blackvvine's full-sized avatar
🦄

Iman Akbari blackvvine

🦄
View GitHub Profile
public class CheckHostResolution {
public static void main(String[] args) {
try {
String s = InetAddress.getLocalHost().getCanonicalHostName();
System.out.println(s);
} catch (Exception ex) {
System.err.println(ex);
}
}
}
gcloud auth activate-service-account --key-file=phdandpeasant2-d9121408d486-compute.json
gcloud config set project phdandpeasant2
@blackvvine
blackvvine / odl.yml
Created June 13, 2019 08:37
Ansible script for installing Open Daylight with VTNs
---
- hosts: localhost
user: root
name: Install ODL & VTN
tasks:
- name: get number of cores
shell: "cat /proc/cpuinfo | grep -E '^processor' | wc -l"
register: threads
@blackvvine
blackvvine / ovs.yml
Created June 13, 2019 08:35
Ansible script for installing Open vSwitch with VXLAN enabled
---
- hosts: localhost
user: root
name: Install Open vSwitch
tasks:
- name: update apt
apt: upgrade=dist