Skip to content

Instantly share code, notes, and snippets.

View MariusBongarts's full-sized avatar

Marius Bongarts MariusBongarts

View GitHub Profile
@MariusBongarts
MariusBongarts / stabilo-colors.md
Last active March 24, 2024 14:32
stabilo-colors.md

NEON COLORS:

  • Neon Orange: #ffad2a (RGB: 255, 173, 42) Neon Orange
  • Neon Red: #f887f (RGB: 248, 135, 127) Neon Red
  • Neon Yellow: #f8fc46 (RGB: 248, 252, 70) Neon Yellow
  • Neon Green: #77e68a (RGB: 119, 230, 138) Neon Green
  • Olive Green: #00c87a (RGB: 0, 200, 122) Olive Green
  • Neon Blue: #3cbefc (RGB: 60, 190, 252) Neon Blue
  • Neon Violet: #9d64e2 (RGB: 157, 100, 226) Neon Violet
  • Neon Pink: #fb83b3 (RGB: 251, 131, 179) Neon Pink
  • Lilac: #f447d1 (RGB: 244, 71, 209) Lilac
@MariusBongarts
MariusBongarts / medium-highlighter.js
Last active March 19, 2024 14:02
MediumHighlighter - Custom element
class MediumHighlighter extends HTMLElement {
get markerPosition() {
return JSON.parse(this.getAttribute("markerPosition") || "{}");
}
get styleElement() {
return this.shadowRoot.querySelector("style");
}
get highlightTemplate() {
class MyWebComponent extends HTMLElement {...}
window.customElements.define('my-web-component', MyWebComponent);
@MariusBongarts
MariusBongarts / README.md
Created August 8, 2023 06:39
My Github profile preview

Hey there, I'm Marius 👋

  • 💼 Frontend Engineer @ Accenture Song
@MariusBongarts
MariusBongarts / README.md-preview
Last active August 8, 2023 06:38
Github README profile
<h1 align="center">Hey there, I'm Marius 👋</h1>
<p align="center">
<img src="https://komarev.com/ghpvc/?username=MariusBongarts&label=Profile+Views" />
</p>
<img align='right' src="https://media.giphy.com/media/M9gbBd9nbDrOTu1Mqx/giphy.gif" width="230">
- 💼 Frontend Engineer @ Accenture Song
{
"compilerOptions": {
"target": "es2022",
"lib": ["es2022", "esnext.decorators", "dom"]
}
}
Symbol.metadata ??= Symbol("Symbol.metadata");
interface Context {
name: string;
metadata: Record<PropertyKey, unknown>;
}
function setMetadata(_target: any, context: Context) {
context.metadata[context.name] = true;
}
class SomeClass {
declare let array: string[] | number[];
array.filter(x => !!x);
// ~~~~~~ error!
// ❌ error before Typescript 5.2
type MixedTupleRest = [first: string, ...string[]];
// ✅ fixed with label
type MixedTupleRestFixed = [first: string, ...rest: string[]];