Skip to content

Instantly share code, notes, and snippets.

View Dzhan85's full-sized avatar

Atadzhan Dzhan85

View GitHub Profile
@alexnoz
alexnoz / kafka-cheat-sheet.md
Last active July 11, 2021 18:15
Apache Kafka cheat sheet

Config

Set a setting (log rotation)

./bin/kafka-configs.sh --zookeeper zookeeper1:2181/kafka \
--alter --entity-type topics \
--entity-name test \
--add-config segment.ms=60000
@ilap
ilap / grafana_telegram_bot.md
Last active February 16, 2025 01:25
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@JoeyBurzynski
JoeyBurzynski / sysctl.conf
Created December 11, 2019 07:13
sysctl.conf Optimization / Ubuntu 18.04
# Kernel sysctl configuration file for Linux
#
# Version 1.14 - 2019-04-05
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
@FilipaBarros
FilipaBarros / Sysadmin_Interview_Questions.md
Last active March 30, 2025 07:05
Sysadmin Interview Questions

Top Questions for Sysadmin Interview:

Disclaimer: These questions and answers aren't at all mine. These were scavanged around in the web. I hope it helps.

Basic:
  1. What is Linux and also explain the basic components of Linux?

    Answer: Linux is the most commonly used operating system that is open source and free. For any computer, the operating system acts as the backbone, and it is most important software that is required for any computer.

@mattmcnabb
mattmcnabb / Get-JsonWhois.ps1
Created July 8, 2019 13:42
Get IP Address WhoIs Info
function Get-JsonWhois
{
[CmdletBinding(DefaultParameterSetName = "ip")]
param
(
[Parameter(Mandatory, ParameterSetName = "ip")]
[string]
$IPAddress,
[Parameter(Mandatory, ParameterSetName = "domain")]
@dweber019
dweber019 / Jenkinsfile
Created March 14, 2019 15:50 — forked from danielgehr/Jenkinsfile
Jenkins pipeline template with environment configuration using gitflow
// ***********************
//
// Build and deploy different environments with jenkins pipeline
//
// Merge to develop -> triggers development release
// Merge to master without tag -> triggers staging release
// Merge to master with tag -> triggers staging and production release
// Production release requires manual approval on the jenkins job
//
// Configure jenkins pipeline project to pull tags! By default, tags are not pulled!
Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
@hoangdh
hoangdh / netplan-sub-interface.md
Last active June 12, 2023 20:45
Adding sub-interface and IP Addresses using NetPlan on Ubuntu 18.04

Adding sub-interface and IP Addresses using NetPlan on Ubuntu 18.04

Edit /etc/netplan/*.yml

network:
  version: 2
  # renderer: NetworkManager
  ethernets:
 eth0:
@omegazeng
omegazeng / build_docker_image.sh
Last active September 27, 2023 14:00
Build docker image and push to harbor with jenkins
#!/bin/bash
# https://gist.github.com/omegazeng/d9d07a8a1c2bd7bb2cab38e32a12058b
export LC_ALL=en_US.UTF-8
set +x
REGISTRY_URL=$1
IMAGE_NAME=$2
@nginx-gists
nginx-gists / Dockerfile
Last active June 27, 2024 17:03
Dockerfiles for NGINX Plus R32 (Debian bookworm -12- and Alpine Linux 3.20), from Deploying NGINX and NGINX Plus on Docker (https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker)
ARG RELEASE=bookworm
FROM debian:${RELEASE}-slim
LABEL maintainer="NGINX Docker Maintainers <[email protected]>"
# Define NGINX versions for NGINX Plus and NGINX Plus modules
# Uncomment this block and the versioned nginxPackages block in the main RUN
# instruction to install a specific release
# ARG RELEASE
# ENV NGINX_VERSION=32