Skip to content

Instantly share code, notes, and snippets.

View rlogiacco's full-sized avatar
💭
I may be slow to respond, be patient...

Roberto Lo Giacco rlogiacco

💭
I may be slow to respond, be patient...
View GitHub Profile
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2023/02/14 21:42:18 cmd/web.go:106:runWeb() [I] Starting Gitea on PID: 18
2023/02/14 21:42:18 cmd/web.go:160:runWeb() [I] Global init
2023/02/14 21:42:18 routers/init.go:116:GlobalInitInstalled() [I] Git Version: 2.36.4, Wire Protocol Version 2 Enabled (home: /data/gitea/home)
2023/02/14 21:42:18 routers/init.go:117:GlobalInitInstalled() [I] AppPath: /usr/local/bin/gitea
2023/02/14 21:42:18 routers/init.go:118:GlobalInitInstalled() [I] AppWorkPath: /app/gitea
2023/02/14 21:42:18 routers/init.go:119:GlobalInitInstalled() [I] Custom path: /data/gitea
2023/02/14 21:42:18 routers/init.go:120:GlobalInitInstalled() [I] Log path: /data/gitea/log
2023/02/14 21:42:18 routers/init.go:121:GlobalInitInstalled() [I] Configuration file: /data/gitea/conf/app.ini
@rlogiacco
rlogiacco / receiver.ino
Last active December 15, 2022 23:36
nRF24 multiple transmitters
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int senderId;
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
//Contacts from the radio to connect NRF24L01 pinamnam -> Arduino
@rlogiacco
rlogiacco / pingpair_ack.ino
Last active September 19, 2022 19:14
nRF24 Arduino test sketch
/*
// March 2014 - TMRh20 - Updated along with High Speed RF24 Library fork
// Parts derived from examples by J. Coliz <maniacbug@ymail.com>
*/
/**
* Example for efficient call-response using ack-payloads
*
* This example continues to make use of all the normal functionality of the radios including
* the auto-ack and auto-retry features, but allows ack-payloads to be written optionlly as well.
* This allows very fast call-response communication, with the responding radio never having to
@rlogiacco
rlogiacco / ProxyBeacon.src
Created February 3, 2022 21:56
Verify ProxyBeacon on Etherscan
// Sources flattened with hardhat v2.8.3 https://hardhat.org
// File openzeppelin/proxy/beacon/IBeacon.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
version: '3.6'
volumes:
zookeeper-data:
driver: local
zookeeper-log:
driver: local
kafka-data:
driver: local
@rlogiacco
rlogiacco / payload.h
Created July 3, 2014 08:17
Arduino to RaspberryPI communication test with nRF24 chipset and libraries
#ifndef __VIRIDI_NEXU_PAYLOAD__
#define __VIRIDI_NEXU_PAYLOAD__
enum PayloadType {
HERBA, METEO
};
typedef uint8_t vn_payload_type;
typedef uint8_t vn_payload_version;
@rlogiacco
rlogiacco / ButtonDebounce.ino
Last active October 2, 2019 19:17
Debounce a button
#define DEBOUNCE 15
#define DMASK ((uint16_t)(1<<DEBOUNCE)-1)
#define DF (1<<(uint16_t)(DEBOUNCE-1))
#define DR (DMASK-DF)
// macro for detection of raising edge and debouncing
#define DRE(signal, state) ((state=((state<<1)|(signal&1))&DMASK)==DR)
// macro for detection of falling edge and debouncing
#define DFE(signal, state) ((state=((state<<1)|(signal&1))&DMASK)==DF)
@rlogiacco
rlogiacco / PingPong.ino
Last active May 6, 2019 19:29
ManiacBug's RF24 library example working on Arduino micro connecting the NRF24L01 module on the Arduino micro pins (not the ICSP header) and pins 9 and 10
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
RF24 radio(9, 10);
// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
@rlogiacco
rlogiacco / Clipper
Created January 13, 2019 19:43
PDF Clip
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.pdf.PdfArray;
import com.itextpdf.text.pdf.PdfDictionary;
import com.itextpdf.text.pdf.PdfName;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@rlogiacco
rlogiacco / Plastico.ino
Last active November 17, 2018 02:03
Innov@ction
#include "Arduino.h"
#include <FastLED.h>
#include <elapsedMillis.h>
#include <FormattingSerialDebug.h>
#define PIN_LEGENDA 2
#define PIN_PLASTICO 3
#define NUM_STANZE 13
#define LED_COUNT_LEGENDA 13