This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => { window.scrollTo(0, document.body.scrollHeight); window.scrollTo(0, 0); }, 60000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Display the CPU and GPU temperatures of Raspberry Pi 3B+ | |
set -e | |
cpu_temp=$(</sys/class/thermal/thermal_zone0/temp) | |
cpu_temp=$(printf %.1f $((10 * cpu_temp/1000))e-1) | |
gpu_temp=$(vcgencmd measure_temp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/AdguardTeam/AdGuardHome/wiki/Raspberry-Pi | |
cd $HOME | |
wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_arm.tar.gz | |
tar xvf AdGuardHome_linux_arm.tar.gz | |
cd AdGuardHome | |
sudo ./AdGuardHome -s install | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://apt.syncthing.net/ | |
# Add the release PGP keys: | |
curl -s https://syncthing.net/release-key.txt | sudo apt-key add - | |
# Add the "stable" channel to your APT sources: | |
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list | |
# Update and install syncthing: | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Char Unicode | |
--------------- | |
Ä \u00c4 | |
ä \u00e4 | |
Ö \u00d6 | |
ö \u00f6 | |
Ü \u00dc | |
ü \u00fc | |
ß \u00df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lessons learned | |
I. Software engineering | |
1. Automate everything, have CI/CD and test automation from the beginning | |
2. Security shall not be an afterthought (have TLS and avoid plain text passwords from the start) | |
3. Component shall be stateless, state shall be extracted and kept in a external store (key-value store or databases) | |
4. Favor open source and off-the-shelf solutions instead of building proprietary solutions | |
5. Avoid hard-coding dependencies, try to inject them via command line parameters, configuration files, env variables, etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kafka import KafkaProducer | |
producer = KafkaProducer(bootstrap_servers=['localhost:19092']) | |
data = bytes('hello', encoding='utf-8') | |
producer.send('test', value=data) | |
from kafka import KafkaConsumer | |
consumer = KafkaConsumer('test', bootstrap_servers=['localhost:19092'], consumer_timeout_ms=2000, auto_offset_reset='earliest') | |
event = next(consumer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- Maven --- | |
# Skip test execution | |
mvn package -DskipTests | |
# Skip test compilation | |
mvn package -Dmaven.test.skip=true | |
# Retrieve the project version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo snap connect remmina:avahi-observe :avahi-observe | |
sudo snap connect remmina:cups-control :cups-control | |
sudo snap connect remmina:mount-observe :mount-observe | |
sudo snap connect remmina:password-manager-service :password-manager-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find the owning package of a file / which package installed this file | |
rpm -qf my_file_or_dir | |
dpkg -S filename_search_pattern | |
# List all files of a package | |
rpm -ql package_name | |
dpkg -L package_name | |
pip show -f package_name |
NewerOlder