Skip to content

Instantly share code, notes, and snippets.

View itdependsnetworks's full-sized avatar

Ken Celenza itdependsnetworks

View GitHub Profile
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
61363732366665663763656465386566336161383135323766393034393765643734363431333930
6664373330623639363864393230373435663737343639340a393561363334343833653566666562
31363939383762316132363039353739613534356438303765316662373133626333343330633462
3464633761363437340a346338623164393166373162356337623066653931656334313862363739
3432
@itdependsnetworks
itdependsnetworks / Calendar-Charge-Code.js
Last active January 4, 2022 03:06
Calendar-Charge-Code
function myFunction() {
//---------The following variables are meant to be changed to meet your specfic needs---------
const domainSuffix = 'networktocode.com';
const daysOut = 90;
const msgBody = "This invite has been declined automatically, as it was received from a networktocode.com email domain, without a subject line ending with a charge code.\n\n";
// Regex searches for XXX-DD, (XXX-DD), and [XXX-DD] with optional whitespace at the end
const regex = /([\(|\[])?\S+?\-\d+([\)|\]])?($|\s+)/;
//---------The code below should only be required to be edited if you wish to change the functionality of the process---------
@itdependsnetworks
itdependsnetworks / jobs.py
Created May 17, 2021 23:22
Nautobot Nornir Sample Job
import logging
from datetime import datetime
from nautobot.extras.jobs import Job, MultiObjectVar, BooleanVar
from nautobot.extras.models import Tag
from nautobot.dcim.models import Device, DeviceRole, DeviceType, Manufacturer, Site, Platform, Region, Rack, RackGroup
from nautobot.tenancy.models import Tenant, TenantGroup
from nornir import InitNornir
@itdependsnetworks
itdependsnetworks / A_TSA_SCHEDULE_FINDER.md
Last active November 15, 2019 16:03
TSA Global Entry Appointment Finder to Slack

DUMMY DATA FOR GIST NAME

@itdependsnetworks
itdependsnetworks / output.log
Created August 12, 2019 20:35
Various ways to restructure data in ansible
root@c4cc2b4306fd:/tmp/data-manipulation# ansible-playbook -i localhost, data-manipulation.yml
PLAY [SHOW THE VARIOUS WAYS TO RESTRUCTURE DATA] ***********************************************************************************************************************************************************
TASK [100 - SET FACT TO NORMALIZE DATA] ********************************************************************************************************************************************************************
ok: [localhost] => (item={u'destination_address': u'aabb.cc00.6000', u'vlan': u'153', u'type': u'DYNAMIC', u'destination_port': u'Fa1/0/36'})
ok: [localhost] => (item={u'destination_address': u'ca03.3efb.0000', u'vlan': u'100', u'type': u'DYNAMIC', u'destination_port': u'Fa1/0/36'})
ok: [localhost] => (item={u'destination_address': u'f44d.3063.34f3', u'vlan': u'22', u'type': u'DYNAMIC', u'destination_port': u'Fa1/0/35'})
ok: [localhost] => (item={u'destination_address': u'2c6b.f553.9d80', u'vlan': u'254', u'type
@itdependsnetworks
itdependsnetworks / custom_field.py
Created September 12, 2018 11:52
Example of creating custom fields in sqlalchemy.
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship, backref, sessionmaker
from sqlalchemy import create_engine, Column, String, Integer, ForeignKey, Boolean
from sqlalchemy import MetaData
from sqlalchemy.orm import create_session
from sqlalchemy.ext.automap import automap_base
import random, string
def randomword(length):
(ansible2.4) ken@ken-VirtualBox:~/github/cookbook$ cat host_vars/matrix-1.yml
---
interfaces:
- name: Ethernet1/0
connected_device: R1
connected_device_port: Ethernet1/0
type: dynamic_dot1q
- name: Ethernet1/1
connected_device: R1