This file contains hidden or 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 ipaddress import IPv4Network | |
| from math import log2 | |
| #TO_SUBNET = IPv4Network("10.0.0.0/8") | |
| #NEW_PREFIX=[24,24,24] | |
| #COUNT=8 | |
| def vlsm(TO_SUBNET,NEW_PREFIX): | |
| CUR_NETWORKS = [] |
This file contains hidden or 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
| def vtp_database_L3 (vtp_domain, vtp_mode, vtp_password, vlan_ids, vlan_names): | |
| """ | |
| :param vtp_domain: str | |
| :param vtp_mode: | |
| :param vtp_password: str | |
| :param vlan_ids: lst | |
| :param vlan_names: lst | |
| :param interface_ip: ipaddress.IPv4Address | |
This file contains hidden or 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
| def config_lacp(base,port_range,channel_group_id,mode): | |
| """ | |
| CONFIG BASIC ETHERCHANNEL-LACP | |
| :param base: "G1/0/" | |
| :param port_range: "0-2,5-6" | |
| :param channel_group_id: 1 | |
| :return: str | |
| """ |
This file contains hidden or 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 ipaddress import IPv4Network,IPv4Address | |
| def config_dhcp(dhcp_pool_name, network_address, dns_address=None,dg=None,dns=None,exclude_ips=None): | |
| """ | |
| "BY DEFAULT WILL EXCLUDE THE FIRST 100 USABLE HOST IP" | |
| AND SUBNET'S FIRST USABLE ADDRESS AS DG | |
| AND THE 10th as DNS | |
| if not defined : DEFAULT GATEWAY : FIRST USABLE HOST ADDRESS | |
| : | |
| :param excluded_addresses:(min, max) |
This file contains hidden or 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
| #!/bin/bash | |
| # Function to check if a command is available | |
| command_exists() { | |
| command -v "$1" >/dev/null 2>&1 | |
| } | |
| # Check if running as root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Please run as root or using sudo." |
This file contains hidden or 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
| #!/bin/bash | |
| : ' | |
| This script performs a clean installation and basic setup of the SSH service on a Debian system. | |
| Usage: | |
| 1. Save this script in a file (e.g., ssh_setup.sh). | |
| 2. Make it executable (chmod +x ssh_setup.sh). | |
| 3. Run the script with ./ssh_setup.sh. |
This file contains hidden or 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
| """ | |
| This script uses Scapy to perform an ARP scan on the specified IP range | |
| and retrieves a list of devices connected to the network. | |
| Make sure to replace "your_network_ip_range" with the actual IP range of your network, e.g., "192.168.1.1/24". | |
| Requirements: | |
| - Scapy library (install with: pip install scapy) | |
| """ |
This file contains hidden or 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
| /** | |
| * Typography Styles | |
| * | |
| * This CSS document defines a consistent and modular typography system | |
| * using Google Fonts for the 'Outfit' font family. It includes variables | |
| * for font family, font weights, and specific styles for various text elements. | |
| * Each style is defined with associated font sizes, line heights, font weights, | |
| * and font families where applicable. | |
| * | |
| * Typography Variables: |
This file contains hidden or 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
| /** | |
| * CSS Reset | |
| * | |
| * This CSS reset normalizes default styling across HTML elements for improved consistency. | |
| * It includes adjustments for box sizing, font size, margins, padding, font weight, and list styles. | |
| * Additionally, it ensures responsive behavior for images. | |
| * Feel free to customize or extend based on specific project requirements. | |
| * | |
| * Reset includes: | |
| * - Box sizing normalization |
This file contains hidden or 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
| /** | |
| * EmptyState Component Layout System | |
| * | |
| * This CSS document defines a layout system for the EmptyState component, | |
| * including the anatomy elements such as illustration, main text, supporting text, | |
| * primary button, secondary link, border, and variations. The system provides | |
| * a modular approach for consistent styling and customization of EmptyState components. | |
| * | |
| * EmptyState Anatomy Elements: | |
| * - Illustration, Main Text, Supporting Text, Primary Button, Secondary Link, Border |
OlderNewer