Skip to content

Instantly share code, notes, and snippets.

View nickkostov's full-sized avatar
🗿

Nikolay Kostov nickkostov

🗿
  • Endava
  • Sofia
  • 18:42 (UTC +03:00)
View GitHub Profile
@nickkostov
nickkostov / configure-ubuntu.sh
Last active March 5, 2025 07:42
Ubuntu Bash Script to install some packages
#!/bin/bash
sudo apt update
sudo apt upgrade -y
sudo apt install ansible build-essential fonts-powerline -y
# Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Configure brew
#!/bin/bash
# Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Configure brew
echo >> /Users/${USER}/.zprofile || echo >> /home/${USER}/.zshrc
@nickkostov
nickkostov / troubleshooter.sh
Created February 20, 2025 14:02
A little Helper with the DataDog Agent
#!/bin/bash
log() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1"
}
log "###################################### Displaying the last 200 lines of the Datadog agent log: ######################################"
tail -200 /var/log/datadog/agent.log
log "###################################### Displaying the first 200 lines of the Datadog agent log: ######################################"
@nickkostov
nickkostov / datadog-troubleshooter.sh
Last active January 24, 2025 15:13
Datadog Logs
#!/bin/bash
# Function to log messages
log() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1"
}
log "###################################### STARTING DATADOG DEBUG SCRIPT ######################################"
# Check if the Datadog log file exists before processing
#!/bin/bash
# Function to check distribution type
check_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
DISTRO=$ID
else
echo "Unable to determine the distribution type."
exit 1
#!/bin/bash
echo "#################################################################"
ifconfig
echo "#################################################################"
cat /etc/hosts
echo "#################################################################"
cat /etc/resolv.conf
echo "#################################################################"
cat /etc/systemd/resolved.conf