Skip to content

Instantly share code, notes, and snippets.

View markusand's full-sized avatar

Marc Vilella markusand

View GitHub Profile
@markusand
markusand / autoparser.py
Last active January 31, 2025 16:53
Autoparse NMEA messages
from typing import List, Type, TypeVar
T = TypeVar("T", bound="Autoparser")
class Autoparser:
"""Automatic parse into parseable classes."""
def __repr__(self):
exclude = (classmethod,)
attrs = [
@markusand
markusand / TerrainControl.ts
Last active March 9, 2025 10:38
Terrain control for mapbox-gl-js
import type { Map, IControl } from 'mapbox-gl';
import useTerrain, { type ExtrusionOptions } from './terrain';
import type { Prettify } from '/@/types/utilities';
export type TerrainControlOptions = Prettify<{
init?: boolean,
pitch?: number;
} & ExtrusionOptions>;
export default class TerrainControl implements IControl {