Skip to content

Instantly share code, notes, and snippets.

@msx80
msx80 / PallinaLuminosa.ino
Created March 12, 2024 16:18
Source code for this thing: https://fosstodon.org/@msx@livellosegreto.it/112059610172216598
// A non-blocking everyday NeoPixel strip test program.
// NEOPIXEL BEST PRACTICES for most reliable operation:
// - Add 1000 uF CAPACITOR between NeoPixel strip's + and - connections.
// - MINIMIZE WIRING LENGTH between microcontroller board and first pixel.
// - NeoPixel strip's DATA-IN should pass through a 300-500 OHM RESISTOR.
// - AVOID connecting NeoPixels on a LIVE CIRCUIT. If you must, ALWAYS
// connect GROUND (-) first, then +, then data.
// - When using a 3.3V microcontroller with a 5V-powered NeoPixel strip,
// a LOGIC-LEVEL CONVERTER on the data line is STRONGLY RECOMMENDED.
@msx80
msx80 / Day1.java
Last active December 1, 2023 11:18
package aoc2023;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;
public class Day1 {
public static void main(String[] args) throws Exception
package esperimentini;
import java.nio.file.Files;
import java.nio.file.Path;
public class AOC2 {
public static String FIRST = "ABC";
public static String SECOND = "XYZ";
@msx80
msx80 / AOC1.java
Created December 1, 2022 09:46
Aoc1
package esperimentini;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Comparator;
import java.util.stream.Stream;
public class AOC1 {
public static void main(String[] args) throws Exception {
{
firstname: "STEFANO",
lastname: "CHIAPPONE",
birthDate: "1994-12-20T00:00:00",
did: "26579664",
isValid: false
}
package aoc;
public class FuncRecursion {
static interface Func {
int apply();
}
static class ReturnZero implements Func {
@Override
package aoc;
import java.awt.Point;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.stream.Stream;
public class Day11 {
package aoc;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
public class Day10 {
@msx80
msx80 / AOC4p1.java
Last active December 4, 2020 09:12
package aoc;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
package aoc;
import java.awt.Point;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Day3 {