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
Vagrant.configure('2') do |config| | |
if Vagrant.has_plugin?('vagrant-cachier') | |
config.cache.scope = 'machine' | |
end | |
config.vm.define "lb1" do |c| | |
## |
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
name = 'Dakota' | |
# data_struct = { | |
# 'data1': { | |
# 'data2': {} | |
# } | |
# } | |
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
import pysnmp.hlapi as pysnmp | |
COMMUNITY = pysnmp.CommunityData('data') | |
ADDRESS = '' | |
DATA = 'cdpCacheDeviceId' | |
table_results = pysnmp.nextCmd(pysnmp.SnmpEngine(), COMMUNITY, pysnmp.UdpTransportTarget((ADDRESS, 161)), pysnmp.ContextData(), | |
pysnmp.ObjectType(pysnmp.ObjectIdentity('CISCO-CDP-MIB', DATA)), lexicographicMode=False) | |
count = 0 | |
for row in table_results: |
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
Counterpoint courtesy of /u/crankysysadmin | |
I see people on here trying to learn Linux, but I feel like a lot of them take the wrong path and either try to learn Linux using a cert of some kind, or try to learn it on their own but focus on the wrong stuff. | |
You don't actually have to be an expert, or learn the entire platform from top to bottom. There are ways you can learn things that make you immediately useful in a mixed environment with a decent Linux footprint. | |
First, the stuff you shouldn't waste time on in my opinion (you can always return to this stuff later): | |
• Desktop linux. In reality you're going to be managing linux boxes via SSH from a Mac or Windows machine. If you have a spare PC and want to set it up there's nothing wrong with that, but it's only marginally useful career-wise to get an Ubuntu desktop going and get web browsers and stuff going. You're probably not going to be managing Linux desktops. |
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
if [[ ! $(top -b -n 1 | grep gpg-agent) = *"gpg-agent"* ]]; then | |
gpg-agent --daemon > .gpg-info | |
fi | |
source ~/.gpg-info |
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
{ | |
"builders":[ | |
{ | |
"type": "vmware-iso", | |
"iso_url": "https://mirrors.ocf.berkeley.edu/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1804.iso", | |
"iso_checksum_type": "sha256", | |
"guest_os_type":"rhel7_64Guest", | |
"network":"{{user `vm_network`}}", | |
"vm_name":"{{user `vm_name`}}", |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<bookstore> | |
<book category="cooking"> | |
<title lang="en">Everyday Italian</title> | |
<author>Giada De Laurentiis</author> | |
<year>2005</year> | |
<price>30.00</price> | |
</book> | |
<book category="children"> | |
<title lang="en">Harry Potter</title> |
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
#PSVersion 5.1.14393.1770 | |
$test = @{testarr=@(@{links=@(1,2)})} | |
$test | |
$test | ConvertTo-Json | |
$test | ConvertTo-Json | ConvertFrom-Json | |
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
class System: | |
names_from_api = ['server1','server2','server3'] | |
def __init__(self, hostname): | |
self.hostname = hostname | |
@staticmethod | |
def get_systems(name): | |
system_list = [] | |
for hostname in System.names_from_api: |
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
from infoblox_client import objects, connector | |
import getpass | |
def main(): | |
username = input('Username > ') | |
password = getpass.getpass('Password > ') | |
conn = connector.Connector({'host':'infoblox.example.com','username':username,'password':password, | |
'ssl_verify':False,'wapi_version':"1.7"}) |
NewerOlder