Skip to content

Instantly share code, notes, and snippets.

View LucaCorigliano's full-sized avatar

Luca Corigliano LucaCorigliano

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lucafraga on github.
  • I am lucacorigliano (https://keybase.io/lucacorigliano) on keybase.
  • I have a public key whose fingerprint is FCFA 49E4 FFBD 40E6 8D54 8328 1657 87A6 A112 E3A1

To claim this, I am signing this object:

@LucaCorigliano
LucaCorigliano / arduMIDI.ino
Created March 19, 2019 16:22
arduiMIDI - Converts midi files to {note, delay} arrays. You can then play them on your arduino.
#define OUT_PIN 5
// Note to frequency table
const uint16_t ftable[128] PROGMEM = {8, 9, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 31, 33, 35, 37, 39, 41, 44, 46, 49, 52, 55, 58, 62, 65, 69, 73, 78, 82, 87, 92, 98, 104, 110, 117, 123, 131, 139, 147, 156, 165, 175, 185, 196, 208, 220, 233, 247, 262, 277, 294, 311, 330, 349, 370, 392, 415, 440, 466, 494, 523, 554, 587, 622, 659, 698, 740, 784, 831, 880, 932, 988, 1047, 1109, 1175, 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865, 1976, 2093, 2217, 2349, 2489, 2637, 2794, 2960, 3136, 3322, 3520, 3729, 3951, 4186, 4435, 4699, 4978, 5274, 5588, 5920, 5920, 6645, 7040, 7459, 7902, 8372, 8870, 9397, 9956, 10548, 11175, 11840, 12544};
// 0 No sustain (stop notes on 0)
// 1 Half sustain (wait half of the delay before stopping notes)
// 2 Full sustain (keep notes running as long as they want)
#define SUSTAIN 1
//Frequency gain
@LucaCorigliano
LucaCorigliano / thousand_separator.cpp
Last active June 6, 2020 13:30
Locale agnostic thousand separator adder for integer and decimal numbers.
/*
Public domain, do whatever you want.
I wrote this snippet because I needed to add thousands separators to some numbers
and I wanted to avoid using locale-related code because:
- I wanted this code to be locale agnostic and always return the same result
- I didn't want to set the locale for the whole program just to do something like this
This is not meant to be fast and it can indeed be optimized. It's fine for my purposes.
@LucaCorigliano
LucaCorigliano / selfrepair.md
Last active September 8, 2026 18:16
Samsung Self Repair Assistant on unsupported devices (Hall IC Calibration methodology on Galaxy Fold 4)

Samsung Self Repair Assistant on Unsupported Devices (Rootless Method)

Updated guide – no root required


Disclaimer

  • This guide is not a beginner step-by-step tutorial. Basic familiarity with ADB and Android system settings is assumed.
  • No root or bootloader unlocking is required for this updated method.