Skip to content

Instantly share code, notes, and snippets.

View inceabdullah's full-sized avatar
🏢
Working from office

inceabdullah

🏢
Working from office
View GitHub Profile
@inceabdullah
inceabdullah / proxmox.nse
Last active June 5, 2024 16:20
namp Proxmox NSE
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
@inceabdullah
inceabdullah / fn.sh
Created April 24, 2024 12:13
SNAKE_CASE to camelCase
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
@inceabdullah
inceabdullah / increment_next_letter.sh
Created March 23, 2024 17:53
Increment/Next Letter
#!/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
}
@inceabdullah
inceabdullah / helpers.sh
Created February 25, 2024 15:34
ns masqueraded from inet iface
#!/bin/bash
WAIT_FOR_RD=1
color_echo() {
local color='\033[1;33m'
local message=$@
local BOLD='\033[31m'
local RESET='\033[0m'
@inceabdullah
inceabdullah / minio-migration.sh
Created January 1, 2024 10:04
MinIO Migration
#!/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}
@inceabdullah
inceabdullah / Istio CNI Tracing Egress and Prometheus.md
Last active December 24, 2023 18:53
% Istio CNI Tracing Egress and Prometheus

Istio CNI Tracing Egress and Prometheus

curl -sSfL https://gist.githubusercontent.com/inceabdullah/205b81083f2f1a0d01bb3337538ea634/raw/a1037cff8502f935463a3194353e502c30ab669f/istio-init.sh |bash -E
@inceabdullah
inceabdullah / Ansible Netplan Set Static IP with Default Gateway from Iface of Connecting IP.md
Created December 17, 2023 14:11
Ansible Netplan Set Static IP with Default Gateway from Iface of Connecting IP

Ansible Netplan Set Static IP with Default Gateway from Iface of Connecting IP

- 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] }}"
@inceabdullah
inceabdullah / Ansible Set Default Route with Connecting IPv4.md
Created December 17, 2023 14:00
Ansible Set Default Route with Connecting IPv4

Ansible Set Default Route with Connecting IPv4

- 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] }}"
@inceabdullah
inceabdullah / %% Ansible Get Current Host IP.md
Created December 17, 2023 12:48
Ansible Get Current Host IP

Ansible Get Current Host IP

   - name: IPv4
     ansible.builtin.debug:
       msg:
         ipv4: "{{ ansible_facts['env'].SSH_CONNECTION.split(' ')[2] }}"
@inceabdullah
inceabdullah / dump-docker-images-from-list-file.sh
Created December 14, 2023 12:23
Tar Dump All Docker Images From List
#!/bin/bash
# cat imagelist.txt |bash THISSCRIPT.sh
# imagelist.txt:
# nginx:latest
# user/image:tag
color_echo() {
local color='\033[1;33m'