Skip to content

Instantly share code, notes, and snippets.

View broland07's full-sized avatar
🏠
Working from home

Balla Roland broland07

🏠
Working from home
View GitHub Profile
@broland07
broland07 / es-1-docker-compose.yml
Created March 25, 2023 15:12
Elasticsearch simple 3 node cluster on 3 machine with docker-compose
version: "3.8"
services:
es-1:
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
volumes:
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- "9200:9200"
- "9300:9300"
ulimits:
# System
- dstat - Combines vmstat, iostat, ifstat, netstat information and more.
- lsof - List open files by processes.
- dstat - Combines vmstat, iostat, ifstat, netstat information and more
# Network
- dig - DNS lookup.
- ping - The ping command sends echo requests to the host you specify on the command line, and lists the responses received their round trip time.
- traceroute - traceroute will show the route of a packet. It attempts to list the series of hosts through which your packets travel on their way to a given destination.
- nslookup - nslookup command also use to find out DNS related query.
@broland07
broland07 / linux-networking-tools.md
Last active January 5, 2023 19:23 — forked from miglen/linux-networking-tools.md
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED
@broland07
broland07 / docker-compose.yml
Created November 12, 2022 14:49
Vaultwarden in docker and nginx
version: '3'
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
ports:
- 8080:80
- 3012:3012
@broland07
broland07 / regex.conf
Created November 10, 2022 18:24
nginx location block with regex if you want create subdirectories with the first letter from the file name.(It not contains accent characters.)
location ~ ^(/images/)([A-Za-z0-9_\-!~$.])([A-Za-z0-9_\-!~$.]*\.[A-Za-z0-9_\-!~$.]+)$ {
try_files $uri $1$2/$2$3 =404;
}
@broland07
broland07 / databases.sql
Created October 5, 2022 16:53
mysql docker with init scripts
CREATE DATABASE IF NOT EXISTS `one`;
CREATE DATABASE IF NOT EXISTS `two`;
CREATE DATABASE IF NOT EXISTS `three`;
@broland07
broland07 / jenkins-compose.yml
Created September 17, 2022 12:37
Jenkins docker-compose
version: '3.3'
services:
jenkins:
image: jenkins/jenkins:lts
restart: unless-stopped
privileged: true
user: root
ports:
- 8080:8080
container_name: jenkins
@broland07
broland07 / glusterfs-ubuntu-20.04
Created August 22, 2022 13:14
GlusterFS 10 on Ubuntu 20.04
3 glusterfs server + 1 client.
On all 4 nodes:
apt install software-properties-common
add-apt-repository ppa:gluster/glusterfs-10
glusterfs-server:
apt update && apt install glusterfs-server
glusterfs-client:
@broland07
broland07 / unixToolbox.md
Created March 29, 2022 18:20 — forked from tokhi/unixToolbox.md
Collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users.

#Unix Toolbox

This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.

##Unix Toolbox revision 14.4

The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.
Error reports and comments are m
@broland07
broland07 / docker-compose.yml - (node1)
Last active November 24, 2021 13:59
Minio-multi-node cluster
version: '3'
services:
minio-1:
image: minio/minio:latest
volumes:
- /mnt/volume1/:/data-1
- /mnt/volume12/:/data-2
ports:
- "10.0.0.130:9000:9000"