curl -sSfL https://gist.githubusercontent.com/inceabdullah/205b81083f2f1a0d01bb3337538ea634/raw/a1037cff8502f935463a3194353e502c30ab669f/istio-init.sh |bash -E
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
* * * * * /root/.crontab-scripts/dynamic-a-recorded-domain-on-static-gateway.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
#!/bin/bash | |
function escape_parentheses () { | |
local input="$1" | |
echo "$input" | sed -e 's@(@\\(@g' -e 's@)@\\)@g' | |
} |
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
description = [[ | |
Detects Proxmox VE servers and retrieves version information. | |
]] | |
--- | |
-- @usage | |
-- nmap --script proxmox -p8006 <host> | |
-- save under the dir /usr/share/nmap/scripts/ | |
-- @output | |
-- PORT STATE SERVICE |
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
snake_to_camel() { | |
local input="$1" | |
local result="" | |
local capitalize_next=false | |
# Loop through each character in the input string | |
for (( i=0; i<${#input}; i++ )); do | |
char="${input:i:1}" | |
# Check if the character is an underscore |
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 | |
next_letter() { | |
# A -> B, B -> C, AZ -> BA | |
local input_letter=$1 | |
out_letter=$(echo "$input_letter" | tr "A-Z" "B-ZA") | |
echo $out_letter | |
} |
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 | |
WAIT_FOR_RD=1 | |
color_echo() { | |
local color='\033[1;33m' | |
local message=$@ | |
local BOLD='\033[31m' | |
local RESET='\033[0m' |
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 | |
SOURCE_MINIO=myminio | |
DESTINATION_MINIO=minio-cluster | |
BUCKET=bucket | |
mc ls $SOURCE_MINIO/$BUCKET |rargs -p '.*STANDARD (.*)$' mc cp $SOURCE_MINIO/$BUCKET/{1} $DESTINATION_MINIO/$BUCKET/{1} |
- name: set default route with connecting ipv4
hosts: nodes
tasks:
- name: make default gw
command: sudo bash -c "export IP={{ IP }}; ip r | grep $IP |grep -Po 'dev \K\S+' |xargs -I{} bash -c \"DEV={};GW=`echo '${IP%.*}.1'`;ip r r default via \${GW} dev \${DEV}; ip r\""
vars:
IP: "{{ ansible_facts['env'].SSH_CONNECTION.split(' ')[2] }}"
- name: set default route with connecting ipv4
hosts: nodes
tasks:
- name: make default gw
command: sudo bash -c "export IP={{ IP }}; ip r | grep $IP |grep -Po 'dev \K\S+' |xargs -I{} bash -c \"DEV={};GW=`echo '${IP%.*}.1'`;ip r r default via \${GW} dev \${DEV}; ip r\""
vars:
IP: "{{ ansible_facts['env'].SSH_CONNECTION.split(' ')[2] }}"
NewerOlder