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
echo "GET /" > /dev/tcp/192.168.175.140/80 | |
echo "data" > /dev/udp/192.168.175.10.53 |
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
## tcp one port | |
ip=192.168.175.140 ; port=80 ; timeout 1 bash -c "</dev/tcp/$ip/$port && echo $ip port tcp/$port open || echo $ip port tcp/$port closed" 2>/dev/null || echo $ip port tcp/$port connection timeout 2>/dev/null | |
## udp range port | |
ip=192.168.175.140 ; for port in $(seq 1 65535); do timeout 1 bash -c "</dev/tcp/$ip/$port && echo $ip port tcp/$port open || echo $ip port tcp/$port closed" 2>/dev/null || echo $ip port tcp/$port connection timeout 2>/dev/null; done | |
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
## splitter un fichier en plusieurs | |
## creer fichier template | |
for i in {0..100000000};do echo "} | |
## 1- par nombre de ligne | |
split -d -l50000 texte.txt suffix- | |
## 2- par quantité | |
split -d -n4 texte.txt suffix- |
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
### bash split | |
${var#*SubStr} # will drop begin of string up to first occur of `SubStr` | |
${var##*SubStr} # will drop begin of string up to last occur of `SubStr` | |
${var%SubStr*} # will drop part of string from last occur of `SubStr` to the end | |
${var%%SubStr*} # will drop part of string from first occur of `SubStr` to the end | |
string="} | |
echo $string | cut -d';' -f1 # output is 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
FROM alpine:3.16.2 | |
MAINTAINER "[email protected]" | |
LABEL maintainer="[email protected]" | |
LABEL image="ginhoux.net/pgdump-cron" | |
LABEL tag="v5-alpine3.16.2" | |
LABEL description="" | |
RUN apk add --no-cache postgresql-client tzdata && \ | |
echo "Europe/Paris" > /etc/timezone |
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 alpine:3.16.2 | |
MAINTAINER "[email protected]" | |
LABEL maintainer="[email protected]" | |
LABEL image="ginhoux.net/mysqldump-cron" | |
LABEL tag="v4-alpine3.16.2" | |
LABEL description="" | |
RUN apk add --no-cache mysql-client tzdata && \ | |
echo "Europe/Paris" > /etc/timezone |
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
# config file for ansible -- https://ansible.com/ | |
# ======================================================= | |
# Nearly all parameters can be overridden in ansible-playbook | |
# or with command line flags. Ansible will read ANSIBLE_CONFIG, | |
# ansible.cfg in the current working directory, .ansible.cfg in | |
# the home directory, or /etc/ansible/ansible.cfg, whichever it | |
# finds first | |
# For a full list of available options, run ansible-config list or see the | |
# documentation: https://docs.ansible.com/ansible/latest/reference_appendices/config.html. |
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 | |
# git rev-list HEAD | while read commitHash; do | |
# if [ $(git diff-tree --name-status --no-commit-id $commitHash | wc -l) -eq 0 ]; then | |
# echo $commitHash | |
# fi; | |
# done | |
export FILTER_BRANCH_SQUELCH_WARNING=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 | |
export ne_version=1.4.0 | |
sudo systemctl stop node_exporter | |
# sudo systemctl status node_exporter | |
ps -eaf | grep node_exporter |