Skip to content

Instantly share code, notes, and snippets.

View TimVosch's full-sized avatar

Tim van Osch TimVosch

View GitHub Profile
@TimVosch
TimVosch / uplink.js
Created October 24, 2022 13:36
TTN Multiflexmeter uplink decoder
@TimVosch
TimVosch / msm8953-telpo-tps950-2.dts
Created September 5, 2022 14:44
TPS950 MSM8953 DTS
/dts-v1/;
/ {
model = "Qualcomm Technologies, Inc. SDM450";
compatible = "qcom,sdm450", "qcom,msm8953";
#address-cells = <0x02>;
qcom,msm-id = <0x152 0x00>;
qcom,board-id = <0x08 0x00>;
#size-cells = <0x02>;
interrupt-parent = <0x01>;
@TimVosch
TimVosch / main.tsx
Last active August 16, 2022 12:05
Fullscreenable chart with minimap
import { h, render } from "preact";
import { useState } from "preact/hooks";
import "./index.css";
interface FullscreenProps {
children: any | any[];
}
// The fullscreen component switches between relative to parent and fixed to page with full width/height (inset-0)
// A button "toggle" is fixed in the top left position
const Fullscreen = ({ children }: FullscreenProps) => {
/*
- Entities are simple IDs
- An entity has zero or more components
- Components are just data
- Systems are executed on components
*/
export type Entity = number;
export type Component = Function;
export type ComponentInstance = Object;
@TimVosch
TimVosch / jwks.json
Created October 1, 2021 21:58
JWKS used for tests
{
"keys": [
{
"p": "zAmHLWNxKquWwp7qKb6pTYCQ4rYp8q2PLr2eVtwtm8YLmyift2X7oyMp3WTE6Y2qbnQGRcPpH0I9ORLQ5kXRCkgibwaYRnvF2WLntRws5WkPC5J0mDlMmnsRkSTj8fEMEc3q_CFAqPZ50X23zM90KIcz2qvb_QiCT9gzTX95Ap8",
"kty": "RSA",
"q": "vq5IUvbmCbB6Fn4NH7Wqv6VIXivSlfB_ti0Uz8TbuUoJQtq9wp8qO4GQKrrrmdYprPdhpT-E-hPPGPj2iQZj8lY2eKSwo0oKhZiN3NB8YF6cn6C_yXhksucXpqUqvf2u7t7pPG4lMMTg5PxlvHhiYqjL8hFCrCsYk3GdXYgAXWk",
"d": "AqEysjPscJSr4_Js3JUxwWrN0wljV8aSRC3ScB3ctXOKKYnrdYVZHJO_o5ufbTfpBC-ZiHbfGSoTe3fVSW6Q_8qDTu7HNVNEeLCpDY0xR7pTKKydyVx9oG1HO4sJEMc89Z4ps5rXGef8naWYOeeNzi56-GTf55-bpVn4jzMuf3A8O4EDMHP8_Y6QPFcQS8PWGu9__2yhcXCvdp_GwR3Rc4Pix0kp4zGBNvj1ZGnCQF3pph27EMaQqC94DJb2TsAN8o_LgMpMm0HjNrhqdfrK1dkwpoOctYpCS79vdS9Omu6UtKLzQ9aBUEIg9Dj1miGMDn2f0USBENUv-ZktJ3KIoQ",
"e": "AQAB",
"kid": "1633125480",
"qi": "VIDcERax-lvo7PFXt7CAKP1_GtF3wCoaCl1lBGOo-9uaFkYS98ZBCTRshSE7H70KNMNOK76YJL_JrrOyeKFWMuqIvP0t6rr7d_PVnFQa2xllZYvTHpHXDv500sPhoN2IS74xwZkPLZXb_qhh2Dhl
This file has been truncated, but you can view the full file.
/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
/*
Document
========
*/
/**
{
"status": 200,
"data": {
"id": 1,
"code": "mfm-peilbuis",
"description": "Peilbuis west-soubourg",
"typeId": "mfm",
"sourceId": "ttn",
"ownerId": 0,
"locationId": 1,
# Use http://speccy.io/ to lint this file and to merge it into the general
# sensorbucket openapi specification
openapi: '3.0.2'
info:
title: SensorBucket Identity Server
version: '0.0.1'
servers:
- description: Production
url: https://sensorbucket.nl/
@TimVosch
TimVosch / file.ts
Created August 25, 2020 19:24
Match a string against an array of allowed strings w/ wildcards (* or **)
/**
* Matches a string (path) to an array of allowed paths which can contain wildcards
* returns true if there is atleast 1 full match
*
* example:
* matches( 'hello.world.something', [ 'not.this.one', 'hello.*.something', 'hello.**' ]);
*
* The second and last rule match and thus the string is accepted
*
* @param _path The path/string that will be checked
@TimVosch
TimVosch / MTLS.yaml
Created August 10, 2020 09:04
Istio mTLS jwksUri fail
#
# Enable mTLS mesh-wide
#
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
namespace: istio-system
spec:
mtls: