Skip to content

Instantly share code, notes, and snippets.

View Schm1tz1's full-sized avatar
🇺🇦
#StandWithUkraine

Roman Schmitz Schm1tz1

🇺🇦
#StandWithUkraine
View GitHub Profile
@Schm1tz1
Schm1tz1 / deploy_node_exporter.sh
Last active August 2, 2022 13:27
Prometheus Node Exporter Installation and Validation
#!/usr/bin/env bash
# https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-armv7.tar.gz
wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz
tar xzvf node_exporter-1.3.1.linux-amd64.tar.gz
sudo cp node_exporter-1.3.1.linux-amd64/node_exporter /usr/local/bin
sudo useradd -m -s /bin/bash node_exporter
sudo mkdir /var/lib/node_exporter
sudo chown -R node_exporter:node_exporter /var/lib/node_exporter
@Schm1tz1
Schm1tz1 / linux_setup_minimal.sh
Last active June 21, 2022 18:49
Linux Packages and Tools Script for setting up a working machine
#!/usr/bin/env bash
# package update and favorites
sudo apt update && sudo apt dist-upgrade -y
sudo apt install htop jq tmux silversearcher-ag tree iotop vim git openssl
# install oh my bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
# awesome vim config
@Schm1tz1
Schm1tz1 / macbook-setup-confluent.sh
Last active December 13, 2024 09:41
Example MacBook Setup Script for Confluent with a lot of useful tools
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# oh my zsh with some plugins and themes
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sed -i '' 's/^ZSH_THEME=.*/ZSH_THEME="wezm+"/g' ~/.zshrc
sed -i '' 's/^plugins=.*/plugins=(ansible brew common-aliases colorize docker git github history kubectl)/g' ~/.zshrc
# sdkman
curl -s "https://get.sdkman.io" | bash
@Schm1tz1
Schm1tz1 / mac-setup.sh
Last active May 2, 2025 16:26
Personal MacOS Macbook Setup Script
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# oh my zsh with some plugins and themes
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sed -i '' 's/^ZSH_THEME=.*/ZSH_THEME="wezm+"/g' ~/.zshrc
sed -i '' 's/^plugins=.*/plugins=(ansible brew common-aliases colorize docker git github history kubectl)/g' ~/.zshrc
# sdkman
curl -s "https://get.sdkman.io" | bash
@Schm1tz1
Schm1tz1 / rM-upload.sh
Last active May 22, 2021 09:27
reMarkable Uploader via WebUI using curl
#!/usr/bin/env bash
for i in *.pdf; do
echo "Uploading $i..."
curl --form "file=@\"$i\"" http://10.11.99.1/upload
echo
done
@Schm1tz1
Schm1tz1 / i2c_scanner.ino
Created July 12, 2020 11:07 — forked from tfeldmann/i2c_scanner.ino
A I2C Scanner for Arduino
// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not known.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
@Schm1tz1
Schm1tz1 / _etc_udev_rules.d_90-vitoIR.rules
Last active November 20, 2022 20:40
vclient scripts with command->item mapping for automated (cron) retriavel of value from vcontrol to openHAB
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="0001", SYMLINK+="ttyVitoIR"
@Schm1tz1
Schm1tz1 / BME280-ESP32-DeepSleep.cpp
Last active May 4, 2023 21:30
Low-Power-Arduino Sketch for a simple weather station using ESP32 with DeepSleep and BME280 that can be powered by a small battery.The ESP is waking up every SLEEP_IN_US microseconds, reading the sensor and going to sleep again.
//
// ESP32 in DeepSleep reading a BME280 every few seconds
//
#include <Arduino.h>
#include <Wire.h>
#include <HardwareSerial.h>
#include <Adafruit_BME280.h>
#define SERIAL_BAUD 9600
@Schm1tz1
Schm1tz1 / java-kafka-pom.xml
Created July 23, 2019 16:52
Basic pom for kafka/kafka-streams applications
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.schm1tz1</groupId>
<artifactId>JsonSimpleSerde</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
@Schm1tz1
Schm1tz1 / jupyter.service
Created May 5, 2019 08:28
Jupyter Notebook as a service (example openhabian here)
#
# put this in /usr/lib/systemd/system/ folder
#
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
# Step 1 and Step 2 details are here..