Skip to content

Instantly share code, notes, and snippets.

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

Roman Schmitz Schm1tz1

🇺🇦
#StandWithUkraine
View GitHub Profile

Keybase proof

I hereby claim:

  • I am schm1tz1 on github.
  • I am schmitzi (https://keybase.io/schmitzi) on keybase.
  • I have a public key whose fingerprint is 736E CFAF C0EB 8648 EFF0 5DD4 E283 0684 D324 F864

To claim this, I am signing this object:

@Schm1tz1
Schm1tz1 / make_rtlsdr.sh
Last active February 22, 2018 23:30
Script for building RTL-SDR-Stuff, Gnuradio, GQRX....
#!/bin/bash
STD_PREFIX="/opt/radio"
HERE=$PWD
bold(){
echo -e \\033[1m$*\\033[0m
}
boldn(){
@Schm1tz1
Schm1tz1 / Vagrantfile
Last active July 26, 2018 12:50
Vagrantfile for HDP2.6 on CentOS7. Installa ambari, JDK and applies patches. Ambari setup needs to be performes to finish installation afterwards.
Vagrant.configure("2") do |config|
config.vm.box = "timveil/centos7-hdp-base"
config.vm.network "forwarded_port", guest: 8080, host: 18080, host_ip: "127.0.0.1"
config.vm.provision "shell", inline: <<-SHELL
echo '******* updating packages'
yum update -y
yum install patch -y
@Schm1tz1
Schm1tz1 / nestedAvroTest.java
Last active November 18, 2020 11:52
How to handle nested AVRO Schemas: Union, several Files
public void nestedSchemaTest() throws IOException, NoSuchAlgorithmException {
Schema.Parser parser = new Schema.Parser();
// nested schemas as union
parser.parse(new File("schemaUnion.avsc"));
// load dependent first, then "derived" schema
parser.parse(new File("schema1.avsc"));
parser.parse(new File("schema2.avsc"));
@Schm1tz1
Schm1tz1 / pom.xml
Created February 15, 2019 09:02
Simple pom for scala projects.
<?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>org.schm1tz1</groupId>
<artifactId>TestProjectNew</artifactId>
<version>1.0-SNAPSHOT</version>
@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..
@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 / 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 / _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 / 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