gsm module server setup

#include <Arduino.h>

// ⚠️ ВАЖНО ЗА СВЪРЗВАНЕТО ⚠️
// ESP32 Pin 16 (RX) <---свържи към---> SIM800L TX
// ESP32 Pin 17 (TX) <---свържи към---> SIM800L RX
// Ако не тръгва, размени кабелите!
#define SIM_RX_PIN 16 
#define SIM_TX_PIN 17 

#define BAUD_RATE 9600

// 🌍 GPRS Настройки (За А1, Yettel, Vivacom обикновено е "internet")
const char* apn = "internet"; 

// 🔗 URL на твоя Backend
// Временно го сменям на публичен тестов сървър (httpbin), който приема всичко и връща 200 OK.
// Това ще потвърд

GSM Setup for SMS

#include <Arduino.h>

// ⚠️ ВАЖНО ЗА СВЪРЗВАНЕТО ⚠️
// ESP32 Pin 16 (RX) <---свържи към---> SIM800L TX
// ESP32 Pin 17 (TX) <---свържи към---> SIM800L RX
// Ако не тръгва, опитай да размениш кабелите на 16 и 17!

#define SIM_RX_PIN 16 // Този пин приема данни (свържи към TX на модула)
#define SIM_TX_PIN 17 // Този пин праща данни (свържи към RX на модула)

#define BAUD_RATE 9600

HardwareSerial sim(1);

// ═══════════════════════════════════════
//  AT помощни функции
// ════════════════════════

GSM Setup for SMS

#include <Arduino.h>

// ⚠️ ВАЖНО ЗА СВЪРЗВАНЕТО ⚠️
// ESP32 Pin 16 (RX) <---свържи към---> SIM800L TX
// ESP32 Pin 17 (TX) <---свържи към---> SIM800L RX
// Ако не тръгва, опитай да размениш кабелите на 16 и 17!

#define SIM_RX_PIN 16 // Този пин приема данни (свържи към TX на модула)
#define SIM_TX_PIN 17 // Този пин праща данни (свържи към RX на модула)

#define BAUD_RATE 9600

HardwareSerial sim(1);

// ═══════════════════════════════════════
//  AT помощни функции
// ════════════════════════

Checking the role of the user

import { GetUserDetails } from "../../services/userDetails.js";

export ... {
  const [userRole, setUserRole] = useState(null);
  
   {userRole == "ADMIN" ? (
     ...
    ) : (
      ...
    )}
    
    
    -----------------------------
    
    
    { name: 'Updates',  route: 'Updates', adminOnly: true },
    { name: 'Users',    route: 'Users',   adminOnly: true },
    
    const visibleTabs = allTabs.filter(tab => {
        if (tab.adminOnly) return isLoggedIn && userDetails?.role === 'ADMIN

The data of the user

import { useUser } from '../../context/UserContext.jsx';

export ... {
  const { user: userDetails } = useUser();
  
   {userDetails?.username || mockUser.name}
   {userDetails?.email || mockUser.email}
   {userDetails?.role || mockUser.role}
   
   
   
   
}

Is The User Logged In

import { useAuth } from '../../context/AuthContext.jsx';

export ... {
  

  const { user } = useAuth();
  const isLoggedIn = !!user;
  
   {!isLoggedIn && (
      ...
    )}

    {isLoggedIn && (
      ...                     
    )}
  
}

Context(User)

import React, { createContext, useContext, useState, useEffect } from 'react'; // importing React hooks and Context API utilities needed to manage user state
import AsyncStorage from '@react-native-async-storage/async-storage'; // importing AsyncStorage to retrieve the authentication token stored on device
import { GetUserDetails } from '../app/services/userDetails.js'; // importing the service function that fetches user profile data from the backend API
import { useAuth } from './AuthContext.js

Context (UI)

import React, { createContext, useContext, useState } from 'react';

const UIContext = createContext(null);

// Manages which auth modal (login / signup) is currently open.
// Keeping this separate from AuthContext means the nav components
// can open modals without prop-drilling through every screen.
export function UIProvider({ children }) {
    const [modal, setModal] = useState(null); // 'login' | 'signup' | null

    const openLogin  = () => setModal('login');
    const openSignu

Context (Auth)

import React, { createContext, useContext, useState, useEffect } from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';

const AuthContext = createContext(null);

export function AuthProvider({ children }) {
    const [authUser, setAuthUser] = useState(null);
    const [isLoading, setIsLoading] = useState(true);

    // On mount, restore session from storage
    useEffect(() => {
        const checkToken = async () => {
            try {
                

Fetch "PATCH" with Image

export async function EditUpdate(id, title, article, image) { // Patch updates
    try {

        const token = await AsyncStorage.getItem("access"); // get the token for authentication
        if (!token) {
            throw new Error("Authentication failed!");
        }

        const formData = new FormData(); // creating an empty const for formData

        if (title) formData.append("title", title); // append th title
        if (article) formData.append("article", article); // a

Nawf prompt

Create an ultra-detailed ornamental typography poster featuring the phrase “TRILLA THAN THA REST” in giant custom hand-lettered calligraphy. The typography is the absolute main subject, filling most of the composition. Use dramatic thick-and-thin strokes, engraved shading, sharp serifs, layered swashes, ribbon banners, tightly interlocked decorative forms, and bold dimensional outlines. The lettering should feel handcrafted, premium, aggressive, and highly readable, with a vintage Chicano lowrid

1594. Maximum Non Negative Product in a Matrix

You are given a m x n matrix grid. Initially, you are located at the top-left corner (0, 0), and in each step, you can only move right or down in the matrix. Among all possible paths starting from the top-left corner (0, 0) and ending in the bottom-right corner (m - 1, n - 1), find the path with the maximum non-negative product. The product of a path is the product of all integers in the grid cells visited along the path. Return the maximum non-negative product modulo 109 + 7. If the maximum product is negative, return -1. Notice that the modulo is performed after getting the maximum product.
/**
 * @param {number[][]} grid
 * @return {number}
 */
var maxProductPath = function(grid) {
    const MOD = 1_000_000_007;
    const m = grid.length;
    const n = grid[0].length;

    // Create DP tables for max and min products
    const maxDP = Array.from({ length: m }, () => Array(n).fill(0));
    const minDP = Array.from({ length: m }, () => Array(n).fill(0));

    // -- 1. Initialize the starting cell --
    maxDP[0][0] = grid[0][0];
    minDP[0][0] = grid[0][0];

    // -- 2. Fill the f

NFC_setup

#include <Adafruit_PN532.h>
#include <Wire.h>

#define I2C_SDA 8
#define I2C_SCL 9

Adafruit_PN532 nfc(-1, -1);

uint8_t allowedUID[] = {0x01, 0x23, 0x45, 0x67}; // secret code
// for phonew uid is changeing
uint8_t allowedLength = 4;

bool checkUID(uint8_t *uid, uint8_t uidLength)
{
  if (uidLength != allowedLength)
    return false;
  for (uint8_t i = 0; i < uidLength; i++)
  {
    if (uid[i] != allowedUID[i])
      return false;
  }
  return true;
}

void setup()
{
 

VL53L0X_setup

#include <Arduino.h>
#include <Wire.h>
#include "Adafruit_VL53L0X.h"

Adafruit_VL53L0X lox = Adafruit_VL53L0X(); // +-1cm 

void setup()
{
  Serial.begin(115200);
  delay(1000);

  Wire.begin(8, 9);
  delay(500);

  Serial.println("Adafruit VL53L0X test.");

  if (!lox.begin(0x29, false, &Wire)) // 0x29
  {
    Serial.println(F("Failed to boot VL53L0X"));
    while (1);
  }

  Serial.println(F("VL53L0X ready!"));
  lox.startRangeContinuous();
}

void loop()
{
  if (lo

jsonなどをcsvに変換してダウンロードさせる

<a id="download-csv" download="data.csv">CSVダウンロード</a>

Fix Girouette

In terminal Ubuntu

`docker update --restart=on-failure:10 girouette`

In docker-compose.yml

```
  girouette-reload:
    image: docker:cli
    depends_on:
      app:
        condition: service_started
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: docker restart girouette
    restart: "no"
    networks:
      - webgateway
```