Skip to content

Instantly share code, notes, and snippets.

View themegabyte's full-sized avatar

Shayan themegabyte

View GitHub Profile
@themegabyte
themegabyte / node_exporter.sh
Created February 26, 2024 20:33 — forked from galexrt/node_exporter.sh
Simple Prometheus node_exporter install script (Updated for 1.0.1)
#!/bin/bash
version="${VERSION:-1.0.1}"
arch="${ARCH:-linux-amd64}"
bin_dir="${BIN_DIR:-/usr/local/bin}"
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \
-O /tmp/node_exporter.tar.gz
mkdir -p /tmp/node_exporter
#!/usr/local/bin/bash
# pkg install bash
# add to shellcmd as "/root/push_ip_metrics.sh &" via Services/shellcmd
pushgatewayip="192.168.1.2:9091"
network="192.168.1.0/24"
interface="bce1"
interval="1"
rate -i "${interface}" -r "${interval}" -e -n -Ab -a 255 -c "${network}" -d | while read -r line; do
@themegabyte
themegabyte / reclaim-resize-expand.md
Created April 2, 2024 14:25
Reclaiming disk space from SWAP or Expanding once it has been increased from VMWARE.
@themegabyte
themegabyte / run.tpl
Created April 25, 2024 04:55 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@themegabyte
themegabyte / new-debian-system-netinst-prereq.md
Created December 25, 2024 11:05
Setting up a new Debian netinst system, prerequisites.

Setting up a new Debian netinst system, prerequisites.

Add username to sudoers file.

su
sudo nano /etc/sudoers.d/allow_myuser_all

Add your new user in the following syntax. Confirm by: cat /etc/sudoers.d/allow_myuser_all