Skip to content

Instantly share code, notes, and snippets.

View KevinAtLeap's full-sized avatar

Kevin Nguyen KevinAtLeap

View GitHub Profile
@KevinAtLeap
KevinAtLeap / kafka-cheat-sheet.md
Created March 5, 2024 10:30 — forked from sahilsk/kafka-cheat-sheet.md
Apache Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1
@KevinAtLeap
KevinAtLeap / node_exporter-as-systemd-service.md
Created December 13, 2023 07:26 — forked from jarek-przygodzki/node_exporter-as-systemd-service.md
Installing node_exporter as systemd serivice
sudo useradd --system --shell /bin/false node_exporter
curl -fsSL https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz \
  | sudo tar -zxvf - -C /usr/local/bin --strip-components=1 node_exporter-1.3.1.linux-amd64/node_exporter \
  && sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
@KevinAtLeap
KevinAtLeap / sql-cheat-sheet.md
Created August 19, 2023 08:51 — forked from vegaasen/sql-cheat-sheet.md
SQL Cheat Sheet for SQLPlus, MSSQL etc

SQL Cheat Sheet

Information

Dialects

Postgres

Show slow queries per database

@KevinAtLeap
KevinAtLeap / promtail_docker_logs.md
Created August 11, 2023 10:31 — forked from ruanbekker/promtail_docker_logs.md
Docker Container Logging using Promtail
@KevinAtLeap
KevinAtLeap / tshark cheat sheet
Created July 15, 2023 15:22 — forked from githubfoam/tshark cheat sheet
tshark cheat sheet
============================================================================
#Wireshark installation directory: windows
C:\Program Files (x86)\Wireshark>tshark.exe
============================================================================
tshark -D #list of available interfaces
============================================================================
capture
============================================================================
tshark -i 2 #start capturing traffic on interface n°2
tshark -i 2 -a duration:10 #capture for 10 seconds, then stop

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@KevinAtLeap
KevinAtLeap / kamailio.cfg
Created March 30, 2023 11:20 — forked from sparse91/kamailio.cfg
Kamailio SIP proxy for freeswitch with RTPEngine for RTP traffic (Kamailio+SIP+RTP+Freeswitch)
#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v5.2 - default configuration script
# - web: https://www.kamailio.org
# - git: https://github.com/kamailio/kamailio
#
# Direct your questions about this file to: <[email protected]>
#
# Refer to the Core CookBook at https://www.kamailio.org/wiki/
# for an explanation of possible statements, functions and parameters.
@KevinAtLeap
KevinAtLeap / git__stash__commands.md
Created March 30, 2023 04:16 — forked from Preethi-Dev/git__stash__commands.md
Cheat sheet for git stash commands

Stash the changes

  1. git stash
  2. git stash save

Stash the untracked files

  1. git stash --include-untracked
  2. git stash -u

List the stashes

  1. git stash list

show the latest stash

  1. git stash show