Skip to content

Instantly share code, notes, and snippets.

View dnsos's full-sized avatar
♦️

Dennis Ostendorf dnsos

♦️
  • Berlin
View GitHub Profile
@dnsos
dnsos / parks.js
Created February 16, 2023 09:31
List of parks in Berlin that could be filtered and sorted according to a selection of searched tags and other criteria.
const SEARCHED_TAGS = ["Grillplatz", "Wasserspielplatz", "Volleyball"]
const PARKS = [
{
name: "Treptower Park",
tags: ["Restaurants", "Tischtennis", "Blumengarten", "Grillplatz"],
priority: 1
},
{
name: "Tempelhofer Feld",
@dnsos
dnsos / debug-next-js-router.tsx
Created August 3, 2022 09:46
Debugging the Next.js route with router events (WIP, ignore for now)
const router = useRouter()
useEffect(() => {
const handleStart = (url: string): void => {
console.log(`Loading: ${url}`)
}
const handleError = (err, url): void => {
//console.log(err)
console.log(`Cancelled: ${url}`)
}
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 2 in line 1.
id,parentId,size
cars,
owned,cars
traded,cars
learned,cars
pilot,owned,40
325ci,owned,40
accord,owned,20
chevette,traded,10
odyssey,learned,20