time.google.com
time1.google.com
time2.google.com
time3.google.com
| from django.db.models import Q | |
| from extras.reports import Report | |
| from collections import defaultdict | |
| from dcim.models import Device | |
| from ipam.models import IPAddress | |
| from ipam.constants import IPADDRESS_ROLE_ANYCAST, IPADDRESS_ROLE_VIP | |
| class UniqueIPReport(Report): |
Long time network engineer, did some perl a long time ago and am liking python pretty well but the pynetbox documentation is badly lacking IMO. If I were a python wizard I'm sure it would all be obvious but I'm not and it's really frustrating that more example weren't provided.
Many of the following examples were cadged from various places on the interwebs and HAVE NOT BEEN TESTED.
import pynetbox
NETBOX = 'https://netbox.fq.dn/'
nb = pynetbox.api(NETBOX, get_token('nb'))
This bookmarklet will grab 2 or 3 bits of info from the currently viewed webpage and put them into an 'alert' so you can copy & paste into another document.
It should work in any desktop browser (chrome, firefox, ect.) on any OS but I've only personally tested it in Chrome on Windows.
You can press either enter or escape after copying the text. It doesn't make any difference which one you use.
For example, the above URL points to the bookmarklet entry on Wikipedia. If you used the reference bookmarklet on that page it would return the following:
| #!/bin/bash | |
| # Written 2018-11-15 by 4410287 | |
| # This script will create a backup file of a postgres database and compress it. It is capable of access a local or remote server to pull the backup. After creating a new backup, it will delete backups that are older than 15 days, with the exception of backups created the first of every month. It is recommended to create a seperate database user specifically for backup purposes, and to set the permissions of this script to prevent access to the login details. Backup scripts for different databases should be run in seperate folders or they will overwrite each other. | |
| HOSTNAME= | |
| USERNAME= | |
| PASSWORD= | |
| DATABASE= |
Netbox SSO with Okta, Vouch and Nginx
Netbox LetsEncrypt and SSO with OpenResty
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" \
| sudo tee /etc/apt/sources.list.d/openresty.list
sudo apt-get update