- name: IPv4
ansible.builtin.debug:
msg:
ipv4: "{{ ansible_facts['env'].SSH_CONNECTION.split(' ')[2] }}"
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 | |
| # cat imagelist.txt |bash THISSCRIPT.sh | |
| # imagelist.txt: | |
| # nginx:latest | |
| # user/image:tag | |
| color_echo() { | |
| local color='\033[1;33m' |
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 | |
| # Prerequirements | |
| # rargs | |
| # INCLUSIVE_REGEX= # word which will not be included | |
| GREP_INCLUSIVE_COMMAND_PIPE= | |
| if [ ! -z "$INCLUSIVE_REGEX" ] ; |
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 | |
| # Bash script interacts with a Nexus repository manager to retrieve information | |
| # about Docker images stored in a specified repository. It iterates through the | |
| # components (images), extracts their name and version, and fetches the image | |
| # manifest using Docker commands. The script then outputs the SHA256 digest | |
| # along with the image name. | |
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 rust@sha256:e0740b99be8107433f623772f3ee44f63da96df56306a8b599bfd501a256e9b9 | |
| WORKDIR /usr/src | |
| COPY ./xmpp-proxy ./ | |
| RUN cargo install --path . | |
| RUN cargo build --release --no-default-features --features c2s-incoming,tls | |
| CMD ["./target/release/xmpp-proxy"] |
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
| #/etc/udev/rules.d/11-media-by-label-auto-mount.rules | |
| KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end" | |
| IMPORT{program}="/sbin/blkid -o udev -p %N" | |
| ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}" | |
| ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k" | |
| KERNEL=="sd[a-z][0-9]", ENV{USER}="<USER: whoami>" | |
| ACTION=="add", ENV{mount_options}="relatime,uid=<UID: id -u> |
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 | |
| # https://stackoverflow.com/a/37650072 | |
| # curl -fsSL https://gist.githubusercontent.com/inceabdullah/fc9fcd467d55ad381df5f297013fca96/raw/4fff61312690877fbc1b05a9daa0aa1a72586f26/dump-all-docker-images.sh | bash | |
| DUMP_DIR=$PWD | |
| color_echo() { | |
| local color='\033[1;33m' | |
| local message=$1 | |
| local BOLD='\033[31m' |
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 | |
| # https://unix.stackexchange.com/a/332522 | |
| # https://raw.githubusercontent.com/cykerway/complete-alias/master/complete_alias | |
| source ~/.bash_completion.d/complete_alias | |
| # Get all aliases | |
| aliases=$(alias) | |
| # Extract alias names |
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
| alias kx='kubectx' |
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
| <meta charset="utf-8" /> | |
| <b style="font-weight:normal" id="docs-internal-guid-4c053d32-7fff-e2ab-2c71-42d00e24573d"> | |
| <h2 dir="ltr" style="line-height:1.38;margin-top:18pt;margin-bottom:6pt"><span style="font-size:16pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Netplan Conf</span></h2> | |
| <p dir="ltr" style="line-height:1.38"><span style="font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Example: 2 NIC, one of them has 2 different IP, another has different gateway</span></p> | |
| <br /> | |
| <p dir="ltr" style="line-height:1.6285714285714286;background-color:#1e1e1e"><span style="font-size:10.5pt;font-family:'Courier New',monospace;color:#569cd6;background-color:transparent;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;wh |