Skip to content

Instantly share code, notes, and snippets.

View cr3a7ure's full-sized avatar

Goutis Dimitrios cr3a7ure

View GitHub Profile
1. Enable Receiver ( rsyslog-server ) setup at elk5 container
a. Update elk5 ( receiver ) rsyslog.conf
# sudo vi /etc/rsyslog.conf
Change
from
# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# provides TCP syslog reception
@dongjinleekr
dongjinleekr / consumer.sh
Last active August 5, 2024 08:44
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1
@matthewjberger
matthewjberger / instructions.md
Last active May 6, 2025 03:02
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@michitux
michitux / export-git-patches.sh
Last active March 11, 2023 21:50
Export a series of git commits into patches.
# Inspired by http://blog.worldofcoding.com/2013/03/formatting-git-patches-for-partially.html
# This calls git log to get a list of commits that affect a certain file pattern and then exports each of them into a file
# If the exported commits shall be limited to these files, another pathspec could be added in the second git log call.
# The code is split into several lines to make it more readable, but all ";" are there such that all line breaks could be removed.
c=0;
git log --oneline --reverse -- your/pathspec.* |cut -d' ' -f1 | while read a;
do
c=$[c+1];
@Warchant
Warchant / sonarqube-docker-compose.yml
Last active May 1, 2025 01:54
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@emmanueltissera
emmanueltissera / git-apply-patch.md
Created September 13, 2017 02:34
Generate a git patch for a specific commit

Creating the patch

git format-patch -1 <sha>
OR
git format-patch -1 HEAD

Applying the patch

git apply --stat file.patch # show stats.
git apply --check file.patch # check for error before applying

@ntwobike
ntwobike / LPIC-101 400-1
Last active May 6, 2025 12:42
Sample questions for LPIC -101-400 part-1
QUESTION 1
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
A. /etc/keys
B. /proc/keys
C. /etc/inittab
D. /proc/inittab
E. /etc/reboot
QUESTION 2
Which of the following information is stored within the BIOS? (Choose TWO correct answers.)
@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@checco
checco / postgres-owner-grants.sql
Last active December 11, 2024 07:36
How to change OWNER for DATABASE, SCHEMA or TABLE on AWS RDS PostgreSQL. An how to REASSIGN owner for all objects on AWS RDS PostgreSQL
--
-- Change database owner
--
ALTER DATABASE "db_name" OWNER TO user;
--
-- List schemas
--
@bruvv
bruvv / PIHOLE+UNBOUND.md
Last active December 29, 2024 17:14
Setup Pihole + Unbound + DNS over TLS on ubuntu 20.02 LTS

Swap

First enable swap just incase

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10