Skip to content

Instantly share code, notes, and snippets.

View thomd's full-sized avatar

Thomas Dürr thomd

  • Hamburg, Germany
View GitHub Profile
@thomd
thomd / web-components.md
Created March 6, 2025 18:34
List of Web Components #list #webcomponents
@thomd
thomd / oauth-client-credentials-flow.js
Last active January 14, 2025 09:52
OAuth Client Credentials Flow Conceptional Example
// npm i express body-parser axios jsonwebtoken
// node oauth2-client-credentials.js
const express = require('express')
const bodyParser = require('body-parser')
const axios = require('axios')
const jwt = require('jsonwebtoken')
const PORT_AUTH_SERVER = 4000
const PORT_RESOURCE_SERVER = 5000
@thomd
thomd / tiktok.md
Created December 10, 2024 21:58
TikToks I like #list
@thomd
thomd / App.jsx
Last active October 7, 2024 19:24
Simple Example for React DragDrop Library @hello-pangea/dnd
import React, { useState } from 'react'
import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd'
// fake data generator
const getItems = (count, offset = 0) =>
Array.from({ length: count }, (v, k) => k).map((k) => ({
id: `item-${k + offset}-${new Date().getTime()}`,
content: `item ${k + offset}`,
}))
@thomd
thomd / ngrams.json
Created March 1, 2024 18:25
english ngrams
This file has been truncated, but you can view the full file.
{
"letters": {
"E": 445155370175,
"T": 330535289102,
"A": 286527429118,
"O": 272276534337,
"I": 269731642485,
"N": 257770795264,
"S": 232082812755,
"R": 223767519675,