Skip to content

Instantly share code, notes, and snippets.

View schtibe's full-sized avatar

Stefan Heinemann schtibe

View GitHub Profile
@schtibe
schtibe / search-results.json
Created May 1, 2025 08:53
Geocat Search Results for "Wald" with all fields but truncated the spatialExtents
[
{
"kind": "dataset",
"status": "completed",
"lineage": null,
"recordUpdated": "2023-03-07T12:00:08.639Z",
"recordPublished": null,
"ownerOrganization": {
"logoUrl": "http://localhost:5173/geonetwork/images/harvesting/502d787f-5caf-4261-b800-39ba9c14869d.png",
"name": "Kanton Basel-Stadt",
@schtibe
schtibe / geoadmin-headers.sh
Created March 6, 2025 12:53
Geoadmin-Headers
curl 'https://sys-control.dev.bgdi.ch/api/v1/providers' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0' -H 'Geoadmin-Username: Stefan' -H 'geoadmin-username: test' -H 'vary: foo' -H 'x-e2e-testing: nosir'
@schtibe
schtibe / formatting.md
Last active February 10, 2025 12:39
Prettier, Eslint and the formatting

Formatting with prettier and eslint

This doc serves to try and catch my thoughts and results of my research.

tl;dr

Everybody recommends using eslint for linting and Prettier for formatting. Eslint deprecates it's formatting rules. There's a Prettier configuration that puts attributes to new lines if more than two.

Situation

@schtibe
schtibe / forticlient-hold.sh
Last active February 7, 2025 08:45
Holding forticlient
~/Repos/infra-ansible-bgdi-dev master !2 ···································································································· 09:36:24
❯ sudo apt-mark showhold
forticlient
~/Repos/infra-ansible-bgdi-dev master !2 ···································································································· 09:36:29
❯ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following upgrades have been deferred due to phasing:
@schtibe
schtibe / assets.log
Created January 20, 2025 10:41
missing s3 assets
{"message": "file size could not be read from s3 bucket [data.geo.admin.ch] for asset ch.blw.erosion-fliesswegkarte/erosion-fliesswegkarte_85/erosion-fliesswegkarte_85_2056.tif", "event": {"created": "2025-01-20T10:31:06.361726Z", "module": "update_asset_file_size"}, "log": {"level": "ERROR", "logger": "stac_api.management.commands.update_asset_file_size", "origin": {"file": {"line": 48, "name": "update_asset_file_size"}, "function": "update"}}, "process": {"pid": 1, "thread": {"id": 140038696372032}}}
{"message": "file size could not be read from s3 bucket [data.geo.admin.ch] for asset ch.blw.gewaesseranschlusskarte/gewaesseranschlusskarte_34/gewaesseranschlusskarte_34_2056.tif", "event": {"created": "2025-01-20T10:31:06.481781Z", "module": "update_asset_file_size"}, "log": {"level": "ERROR", "logger": "stac_api.management.commands.update_asset_file_size", "origin": {"file": {"line": 48, "name": "update_asset_file_size"}, "function": "update"}}, "process": {"pid": 1, "thread": {"id": 140038696372032}}}
{"mes
@schtibe
schtibe / framework-evaluation.md
Last active May 29, 2024 06:09
Framework Evaluation

PB-514 Framework Survey

General Overview

  • Django is a general purpose Framework for building websites. Django is very feature complete and has a rich ecosystem.
  • Flask is a general purpose Framework for building websites. It is very lightweight.
  • FastAPI is a light weight Framework built for creating (REST? evaluate) APIs.

| Framework | Auth | API | DB |

@schtibe
schtibe / switch-branch.sh
Last active February 1, 2024 12:37
Git switch branch helper
#!/bin/bash
git fetch > /dev/null
# Get the list of branches from "git branch -a" using fzf for interactive selection
selected_branch=$(git branch -a | grep -v HEAD | sed 's/^[[:space:]]*//' | fzf --ansi --prompt="Select a branch (Use arrow keys): ")
if [ -n "$selected_branch" ]; then
if [ "$selected_branch" == "Exit" ]; then
echo "Exiting..."
@schtibe
schtibe / foo.vue
Last active October 23, 2023 15:27
Ignoring stuff
<template>
<!-- eslint-disable-next-line vue/no-v-html -->
<something-for-eslint />
{{
//@ts-ignore
formattedDate(collection[index].datetime)
}}</span
</template>
@schtibe
schtibe / tw-config-in-code.js
Created September 11, 2023 20:18
Use tailwind config in code
import tailwindConfig from "../../tailwind.config";
import resolveConfig from "tailwindcss/resolveConfig";
const config = resolveConfig(tailwindConfig);
@schtibe
schtibe / i3_screenshot_config
Last active August 8, 2023 23:27
Screenshot keybindings with i3 and scrot that are copied to the clipboard
bindsym Print exec "scrot -e 'mv $f ~/tmp && xclip -selection clipboard -t image/png -i ~/tmp/$n'; sleep 1; exec notify-send 'screenshot has been saved to ~/tmp'"
bindsym $mod+Print --release exec "scrot -ue 'mv $f ~/tmp && xclip -selection clipboard -t image/png -i ~/tmp/$n'; sleep 1; exec notify-send 'screenshot has been saved to ~/tmp'"
bindsym $mod+Shift+Print --release exec "notify-send 'selection will be saved to ~/tmp'; scrot -se 'mv $f ~/tmp && xclip -selection clipboard -t image/png -i ~/tmp/$n'"