Skip to content

Instantly share code, notes, and snippets.

View Typiqally's full-sized avatar
:octocat:
Work hard play hard

Jelle Maas Typiqally

:octocat:
Work hard play hard
View GitHub Profile
@ExperimentalUnsignedTypes
fun main() {
val aes = AES()
val bondingKey = "83 69 6c e4 44 fa b0 f1 0b f6 17 af 58 2e 3f e4 54 34 16 36 4c 76 de e7 2c 43 dd 8a 63 ac 0f 49".decodeHex()
println("Bonding key: ${bondingKey.contentToString()}")
val bondingKeyIv = "16 64 ef 48 03 58 ca 84 3c 82 e2 54 6f ff 49 28".decodeHex()
val secretKey = DeviceKey().create("B8:8E:82:3A:17:CB")
println("Secret key (${secretKey.size}): ${secretKey.contentToString()}")
@Typiqally
Typiqally / simd+HamardProduct.swift
Created December 5, 2022 13:34
Hadamard product implementation using simd matrices written in Swift
//
// PlantMorphology
//
// Created by Jelle Maas on 05/12/2022.
//
import Foundation
import simd
// Extension functions for vDSP implementing the hadamard product operation for matrices
@Typiqally
Typiqally / aspnetcore-vite.js
Created March 16, 2023 08:59
ASP.NET Core + Vite, HTTPS proxy configuration
// This script configures the .env.development.local file with additional environment variables to configure HTTPS using the ASP.NET Core
// development certificate in the webpack development proxy.
import fs from "fs";
import path from "path";
const baseFolder =
process.env.APPDATA !== undefined && process.env.APPDATA !== ''
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;
@Typiqally
Typiqally / OrientationCube.tsx
Last active April 17, 2024 15:05
OrientationCube for React and TailwindCSS, can be used with Three.js easily
/* Example usage
const [rotationMatrix, setRotationMatrix] = useState<number[]>(new Array(16).fill(0));
<OrientationCube
sizeInPixels={64}
rotationMatrix={rotationMatrix}
/>
setRotationMatrix(camera.matrixWorldInverse.clone().elements);
*/
@Typiqally
Typiqally / loguru.regexr
Created December 16, 2024 12:42
A Regex for the default Loguru logs, can be used in services such as Promtail
(?P<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3})\s*\|\s*(?P<level>\w+)\s*\|\s*(?P<service>[\w\.]+):\w+:\d+ - .*