Skip to content

Instantly share code, notes, and snippets.

@eduardomarcos
eduardomarcos / nodered.settings.js
Last active April 10, 2025 17:41
Nodered Custom Logging Module for Loki (Grafana)
logging: {
// Only console logging is currently supported
console: {
level: "trace",
metrics: false,
audit: false
},
loki: {
level:'trace',
metrics:false,
@eduardomarcos
eduardomarcos / scripts.sh
Created December 29, 2020 19:01
Mix of useful linux scripts
# Nginx
# ------
tail -n 10000 access.log | awk '{print $1}'| sort| uniq -c| sort -nr| head -n 10 # Get IP from logs
#!/bin/bash
sudo apt-get update
sudo apt-get install --yes curl vim htop xclip ranger neofetch git net-tools
# hstr
# https://github.com/dvorka/hstr
mkdir -p source
cd ~/source
git clone https://github.com/dvorka/hstr.git
@eduardomarcos
eduardomarcos / mysql-docker.sh
Last active February 28, 2021 10:57 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Decompress xz sql file
xz -d -v FILENAME
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password="root" DATABASE
@eduardomarcos
eduardomarcos / platformio.ini
Last active September 1, 2024 16:21
PlatformIO config for USBTiny Programmer Upload
;For Arduino UNO
[env:uno]
platform = atmelavr
board = uno
framework = arduino
upload_protocol = usbtiny
upload_flags = -e
;For Esp32
[env:esp32doit-devkit-v1]