Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Manouchehri / windows10qemu.sh
Last active February 10, 2022 18:50
Running Windows 10 in a UEFI enabled QEMU environment with KVM.
# Installing
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 2048 -cdrom ~/Downloads/Win10_English_x64.iso -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -drive file=~/Downloads/virtio-win-0.1.105.iso,index=1,media=cdrom
# Running
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 4096 -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -usbdevice tablet -rtc base=utc
@arbakker
arbakker / scrape-wfs.sh
Last active March 11, 2022 10:49
Bash script for scraping WFS services in a responsible way
#!/usr/bin/env bash
# Bash script for scraping WFS services in a responsible way. Script divides in area of interest in list of bounding boxes, which are requested sequentially. The HTTP get request is configured to retry, using the default CURL exponential backoff algorithm.
# Only use when no bulk download (like ATOM) service is available.
set -eu
TARGET_GPKG=output.gpkg
WFS_URL="https://service.pdok.nl/prorail/spoorwegen/wfs/v1_0"
FT_NAME=spoorwegen:kilometrering
LAYER_NAME=$(cut -d":" -f2 <<<$FT_NAME)
SLEEP=1
@jpswinski
jpswinski / geoparquet.cpp
Last active December 25, 2023 00:58
Minimal example C++ code to write a GeoParquet file using Apache Arrow
/*
* File: geoparquet.cpp
*
* Purpose: A minimal example to build a GeoParquet file using Apache Arrow.
*
* Prerequisites: The Apache Arrow library is needed and can be installed as follows
* $ git clone https://github.com/apache/arrow.git
* $ cd arrow/cpp
* $ mkdir build
* $ cd build