Skip to content

Instantly share code, notes, and snippets.

View sqrtM's full-sized avatar
sleepy

mason :) sqrtM

sleepy
  • france
View GitHub Profile
@sqrtM
sqrtM / tsconfig.json
Last active February 25, 2023 22:31
tsconfig that I use as a default
{
"compilerOptions": {
"jsx": "react",
"incremental": true,
"target": "es2017",
"outDir": "build/main",
"rootDir": "assets",
"moduleResolution": "node",
"module": "commonjs",
"declaration": true,
@sqrtM
sqrtM / array_serde.rs
Last active October 13, 2023 17:16
serde arrays of arbitrary size
/// works for any T where T implements copy and default.
mod array_serde {
use serde::{Deserialize, Deserializer, Serialize, Serializer};
pub fn serialize<S, T: Serialize>(array: &[T], serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
array.serialize(serializer)
}
@sqrtM
sqrtM / adventofcode.2023
Last active December 11, 2023 10:32
aoc2023 (sometimes just the part 2s oops)
🦀🦀🦀🦀🦀🦀🦀🦀🦀
🦀🦀🦀🦀🦀🦀🦀🦀🦀