Skip to content

Instantly share code, notes, and snippets.

View sebadima's full-sized avatar

robofromscratch sebadima

View GitHub Profile
@sebadima
sebadima / Makefile
Created March 3, 2026 07:05
JustPaste Clone - Sistema FastAPI + PDF Worker (Full Package)
# MyPaste RAW - Control Logic
PYTHON = python3
PID_FILE = mypaste.pid
PORT = 5000
STORAGE = $(HOME)/justpaste
.PHONY: run stop status list
# Lancia il server. Nota: in foreground il PID_FILE non serve per il kill,
# ma lo stop pulisce comunque il socket della porta PORT.
@sebadima
sebadima / docker-compose.yml
Created December 22, 2024 16:36 — forked from brunosimioni/docker-compose.yml
Docker Compose to Prometheus, PushGateway and Grafana setup
version: '2.1'
networks:
monitor-net:
driver: bridge
volumes:
prometheus_data: {}
grafana_data: {}
#include <LiquidCrystal_I2C.h>
#include <math.h>
#include <Wire.h>
#define I2C_SDA 23
#define I2C_SCL 18
#define VELOCITA_DEL_SUONO 0.034
#define TENTATIVI_CALIBRAZIONE 8
const int echoPin = 21;
/*
Driver per motore elettrico brushed
- pin 9 di Arduino collegato alla base del TIP120
*/
int pinMotorino = 9;
void setup() {
Serial.begin(9600);
pinMode(pinMotorino, OUTPUT);
}
int ledPin = 13;
char* letters[] = {
“.-”, “-…”, “-.-.”, “-..”, “.”, “..-.”, “–.”, “….”, “..”,
“.—”, “-.-”, “.-..”, “–”, “-.”, “—”, “.–.”, “–.-”, “.-.”,
“…”, “-”, “..-”, “…-”, “.–”, “-..-”, “-.–”, “–..”
};
// A-I
// J-R
// S-Z
char* numbers[] = { “—–”, “.—-”, “..—”,
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <Hash.h>
#include <ESPAsyncTCP.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <EMailSender.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
@sebadima
sebadima / dioxide_sensirion
Last active November 4, 2022 18:01
dioxide_sensirion.ino
#include <Arduino.h>
#include <FastLED.h>
#include <SensirionI2cScd30.h>
#include <Wire.h>
#define LED_PIN 14
#define NUM_LEDS 12
#define BRIGHTNESS 4
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#include <esp_wifi.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
#include "WiFi.h"
#include "DHT.h"
#include "secrets.h"
#define AWS_IOT_PUBLISH_TOPIC "esp32/pub"
#define AWS_IOT_SUBSCRIBE_TOPIC "esp32/sub"
#include <WiFi.h>
#include "SD.h"
#include "DHT.h"
#include <Wire.h>
#include <Adafruit_BMP085.h>
// Replace with your network credentials
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
int ledPin = 13;
char* letters[] = {
“.-”, “-…”, “-.-.”, “-..”, “.”, “..-.”, “–.”, “….”, “..”,
“.—”, “-.-”, “.-..”, “–”, “-.”, “—”, “.–.”, “–.-”, “.-.”,
“…”, “-”, “..-”, “…-”, “.–”, “-..-”, “-.–”, “–..”
};
// A-I
// J-R
// S-Z
char* numbers[] = { “—–”, “.—-”, “..—”,