Skip to content

Instantly share code, notes, and snippets.

View L480's full-sized avatar
🚀

Nico Schiering L480

🚀
View GitHub Profile
@L480
L480 / git-revert-pushed-commit.md
Created October 10, 2024 13:55
Revert pushed commit in git

Move the cursor back to the last known good commit: git push -f origin last_known_good_commit:branch_name

@L480
L480 / github-deployment-cleanup.sh
Created August 16, 2024 12:20
GitHub Deployment Cleanup
#!/bin/bash
ENV=$1
for ID in $(gh api -X GET /repos/L480/repo/deployments?environment=${ENV// /%20} | jq -r ".[] | .id")
do
echo "Deleting deployment $ID"
gh api -X DELETE /repos/L480/repo/deployments/$ID | jq '.'
done
@L480
L480 / yellow-pages-scraper.py
Last active December 21, 2023 08:05
Scrapes URLs from gelbeseiten.de
import requests
import re
import base64
import json
import argparse
urls = []
def percent_complete(step, total_steps, bar_width=60, title="", print_perc=True):
@L480
L480 / api-call-trash-can-collection-date.md
Last active May 23, 2024 09:26
API call to get trash can collection date in Lübeck (including gelber Sack)

Abfuhrtermine der Entsorgungsbetriebe Lübeck (inkl. gelbe Säcke über Veolia)

Der Request wurde aus der MeinLÜBECK iOS App gecaptured. Die MeinLÜBECK App basiert auf der Whitelabel-Lösung endios one.

Request

Der Bearer Token ist statisch und hardcoded in der MeinLÜBECK App. Teilweise fehlen Abholdaten für einige Hausnummern, daher muss manchmal die Hausnummer vom Nachbarn genutzt werden.

curl -X POST https://api.endios.one/v1/connect?name=GarbageCalendarV3&widgetId=11935 \