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
| #!/usr/bin/env python | |
| import json | |
| import socket | |
| import sys | |
| import datetime | |
| def send_data_to_logstash(ls_data, host, port): | |
| try: | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
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
| # WebLogic Server LDAP Configuration for FreeIPA | |
| ## Connection | |
| Host: freeipa.example.com | |
| Port: 389 | |
| Principal: uid=weblogic,cn=users,cn=accounts,dc=example,dc=com | |
| Credential: secure_password | |
| Confirm Credential: secure_password | |
| SSLEnabled: false |
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 | |
| echo "Checking resolv.conf" | |
| python3 -c ' | |
| import subprocess | |
| shecan_ips = ("178.22.122.101" "185.51.200.1") | |
| resolver_list = [] | |
| with open("/etc/resolv.conf", "r") as f: |
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 | |
| command -v nc 2>&1 >/dev/null | |
| if [[ "$#" < "2" ]] | |
| then | |
| echo "Usage: $0 LOGSTASH_ADDRESS LOGSTASH_PORT" | |
| exit 1 | |
| fi | |
| LS_IP=$1 |
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 | |
| if [ -z "$1" ] | |
| then | |
| user_name=root | |
| else | |
| user_name=$1 | |
| fi | |
| IFS=' |
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
| [Unit] | |
| Description=SSH Tunnel | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| EnvironmentFile=/etc/default/ssh_tunnel | |
| ExecStart=/usr/bin/ssh -fN -D "$SOCKS_PORT" -i "$SSH_KEY" -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes "$USER"@"$SSH_SERVER" | |
| ExecStartPost=/bin/bash -c "/usr/bin/curl --silent --fail --max-time 10 -x socks5h://localhost:$SOCKS_PORT http://ifconfig.me/ip || /bin/kill -9 -- $MAINPID" | |
| ExecReload=/bin/kill -1 -- $MAINPID | |
| ExecStop=/bin/kill -9 -- $MAINPID |
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
| kind: Cluster | |
| apiVersion: kind.x-k8s.io/v1alpha4 | |
| nodes: | |
| - role: control-plane | |
| - role: control-plane | |
| - role: worker | |
| - role: worker | |
| - role: worker | |
| extraMounts: | |
| - hostPath: /mnt/kind |
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 | |
| if [ -z $1 ] | |
| then | |
| echo -e "Usage is: ./main.sh PATH_TO_FILE\nExample: ./main.sh /var/log/nginx/access_log" | |
| exit 1 | |
| fi | |
| file=$1 |
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 | |
| private_registry="registry.example.com:5000" | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <image_name>" | |
| exit 1 | |
| fi | |
| image_name=$1 |
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 | |
| if ! [ -x "$(command -v certbot)" ]; then | |
| echo 'Error: certbot is not installed.' >&2 | |
| exit 1 | |
| fi | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 domain_name" | |
| exit 1 |