Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
Leaflet Scraper - Extracts waypoints and routes from Leaflet-based maps
"""
from typing import List, Dict, Any, Optional, Protocol
from dataclasses import dataclass, field
from playwright.sync_api import sync_playwright, Page
import time
import json

Porównanie systemów GPU do LLM (12GB+ VRAM)

Cel

Znalezienie najlepszego stosunku ceny do wydajności dla systemów z VRAM 12GB+, odpowiednich do lokalnego uruchamiania dużych modeli językowych za pomocą llama.cpp.

Metryki wydajności

  • Tokeny/s: Szybkość generowania tekstu w tokenach na sekundę dla modeli o parametrach 7B-13B
  • Wydajność: Tokeny na sekundę na 10W zużycia energii
  • Wydajność/Cena: Stosunek wydajności podzielony przez cenę systemu (w tysiącach złotych)

TP-Link Archer Nano USB WiFi Adapter (RTL8811AU) on Ubuntu with Secure Boot

Problem

The TP-Link Archer Nano USB WiFi adapter (and similar adapters using the Realtek RTL8811AU chipset) may not work out-of-the-box on modern Linux distributions like Ubuntu, especially when Secure Boot is enabled. The default drivers can cause issues, including failed module signing and no network interface being created.

Solution

The most reliable solution is to install the community-maintained driver from the morrownr/8821au-20210708 GitHub repository. This driver has broader support and handles DKMS and Secure Boot MOK signing correctly.

@PabloVitasso
PabloVitasso / camper_regulations_eu_english.md
Last active May 4, 2025 13:53
Camper Van Regulations in European Union Countries (2025)

Comprehensive Camper Van Regulations in European Union Countries

Index:

[1] - Group 1: Parking permitted in accordance with general road traffic regulations.
[2] - Group 2: Parking permitted only in designated areas, with additional restrictions.
[3] - Not defined in available documentation.

Country Wild Camping Definition of Camper Van in National Law Caravanning Legislation Definitions of Motorhomes and Camping Trailers
Austria [2] Generally prohibited. Possible only in designated areas. Category M1 with "Wohnmobil" or "SA (Sonderfahrzeug-Wohnmobil)" annotation. Vehicle specially equipped for residential purposes. Issues covered under the Motor Vehicle Act. A motorhome is a special-purpose M1 vehicle with residential equipment.

Mleczna Czekolada (250 g, organiczna)

Składniki:

  • 128 g masła kakaowego (nierafinowane)
  • 70 g mleka w proszku (pełnotłuste, organiczne)
  • 30 g kakao w proszku (surowe, organiczne)
  • 40 g cukru kokosowego lub trzcinowego
  • 10 g czystej glukozy w proszku
  • 2 g lecytyny słonecznikowej (organicznej)
  • Szczypta soli (opcjonalnie)
@PabloVitasso
PabloVitasso / mbank-firefox-ublock-2024.md
Created January 31, 2024 08:46
mbank firefox ublock ? trzeba wyłączyć filtry kosmetyczne

recepta 2024 na logowanie do mBanku to wyłączenie kosmetycznych filtrów na moment logowania. Klikamy na logo uBlocka i tam naciskamy ikonkę odpowiedzialną za kosmetyczne filtry - "oko". Następnie ikona "przeładuj" i strona logowania powinna się pokazać.

@PabloVitasso
PabloVitasso / Node-RED-IOTstack-gpiod.md
Last active February 2, 2021 19:59
limiting gpiod daemon to local docker network

Workaround for NodeRED operating in IOTstack to use local docker address

https://sensorsiot.github.io/IOTstack/Containers/Node-RED/

workaround for pigpiod in /etc/rc.local (or whatever how we call the pigpiod)

/usr/bin/pigpiod -s 10 -n 10.77.60.1 -n 10.77.60.2 -n 10.77.60.3 -n 10.77.60.4 -n 10.77.60.5 -n 10.77.60.6 -n 10.77.10.7 -n 10.77.10.8 -n 10.77.10.9 -n 10.77.10.10

in node-RED, in pi gpiod node:

https://12factor.net/

  1. Use declarative formats for setup automation, to minimize time and cost for new developers joining the project;
  2. Have a clean contract with the underlying operating system, offering maximum portability between execution environments;
  3. Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration;
  4. Minimize divergence between development and production, enabling continuous deployment for maximum agility;
  5. And can scale up without significant changes to tooling, architecture, or development practices.
@PabloVitasso
PabloVitasso / dockernotes.md
Created February 19, 2018 22:12
docker notes

developing apps

figured I'd take a three-step approach to my first node.js app in Docker:

  1. Build an image to build my dependencies. This uses the same base image as step #2 will, but installs all the development tools and libraries (eg. build-essentials, libpq5-dev), and then outputs a .tar.gz to a shared volume containing my node_modules folder.
  2. Build an image with my dependencies; imports the runtime versions of any libraries (eg. libpq5), imports & expands the .tar.gz generated by #1.
  3. Build an image with my application, FROM the image in #2. The process is optimized by having the automation check for the existence of #2 by hashing the contents of the relevant Dockerfiles, and the package.json list of dependencies, and doing a docker pull with that hash to see if I've already built #2. If so, my build just needs to build #3. from [https://news.ycombinator.com/item?id=10782897]