Skip to content

Instantly share code, notes, and snippets.

View timlinux's full-sized avatar

Tim Sutton timlinux

View GitHub Profile
@timlinux
timlinux / README.md
Last active April 15, 2025 23:50
Linux on Lenovo Thinkpad P14s with AMD Processor

Thinkpad P14s AMD Edition Review (Running Fedora)

These are my installation etc. notes for running Linux on my new Thinkpad P14s laptop with 32GB RAM, 1TB SDD and 8 Core, 16 Thread AMD CPU.

Detailed specs

Here is what they quoted as the specs after I confirmed my order:

@timlinux
timlinux / QGISonWine.md
Last active March 11, 2025 15:26
Running QGIS Windows Builds on Linux using Wine

I found it is difficult to build older versions of QGIS on linux due to the shifting dependencies. Or sometimes you just want to test an issue with the windows build but you don't want to use a VM etc. to test. So I went on a quick diversion and installed QGIS from Wine. In this case I wanted to test something on QGIS circa v 3.0.x:

sudo apt install wine
wget -o https://qgis.org/downloads/QGIS-OSGeo4W-3.0.1-1-Setup-x86_64.exe
wine QGIS-OSGeo4W-3.0.1-1-Setup-x86_64.exe 

You can substitute the installer URL with any of the builds available at https://qgis.org/downloads/. Once you have downloaded the installer, press next to work your way through the installer steps. Now make a few small tweaks so you can launch the app.

@timlinux
timlinux / creating_3d_models_for_QGIS_with_ODM.md
Last active January 27, 2025 13:59
Creating 3D Models for QGIS With ODM

Capture a movie on your phone of the object by walking around it. If possible shoot it from different angles e.g. from above looking down, below looking up, side on etc. When you film it, walk around it or move the camera around it in a full 360 revolution (or even a couple of revolutions). You should get something like this (note that the image below is a resized copy of the orignal downrated to 1 fps):

DrinkingFountainSmall

Put the video into an empty folder and then use ffmpeg to extract the frames. You can experiment with different frame rates but generally there will be little value in extracting at 60fps or whatever your phone natively shoots at.

If you are on an iPhone you may need to convert your movie from .HEIC format first:

@timlinux
timlinux / readme.md
Last active November 20, 2024 11:34
A simple attempt to make a spinning globe in QGIS by continuously manipulating the CRS.

QGIS Globe Spinner

A simple attempt to make a spinning globe in QGIS by continuously manipulating the CRS. Just load a world boundaries layer and run this in the QGIS console. Definitely very prototype stuff here so be warned...

temporary

```
nix-shell -p whitebox-tools
this derivation will be built:
/nix/store/84wi7lcplbf8ryldn8qxhk6jk0qfjwdg-whitebox_tools-2.2.0.drv
these 3 paths will be fetched (0.00 MiB download, 0.02 MiB unpacked):
/nix/store/dqckr5s73zsy3jcqqp774x9y6fzjl0rc-auditable-cargo-1.73.0
/nix/store/by2qyxr78hh3jhrrx8sikgavr3i9ap07-cargo-build-hook.sh
/nix/store/vrvkmmbkxwk2zf0b45jcfa9kc1wx8z31-cargo-check-hook.sh
copying path '/nix/store/dqckr5s73zsy3jcqqp774x9y6fzjl0rc-auditable-cargo-1.73.0' from 'https://cache.nixos.org'...
graph TD
    A[Father] -->|Parent| B[You]
    C[Mother] -->|Parent| B[You]
    B -->|Husband| D[Wife]
    B -->|Father| E[Daughter]
    D -->|Mother| E[Daughter]
@timlinux
timlinux / bright.json
Last active January 28, 2024 23:32
TileMaker OpenMapTiles Bright Style
{
"version": 8,
"name": "Empty Style",
"metadata": {"maputnik:renderer": "mbgljs"},
"sources": {
"planet": {"type": "vector", "url": "http://localhost:8000/services/planet"}
},
"sprite": "",
"glyphs": "https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",
"layers": [
@timlinux
timlinux / coreos-docker.md
Last active January 27, 2024 13:02
Setting up a hetzner machine with coreos

This gist describes how to set up a new machine running coreos.

Create an ssh key

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_kartoza99

Get the public key:

@timlinux
timlinux / find_multipart.py
Last active August 13, 2023 13:19
A QGIS Python snippet to select multipart features in the active layer
# Find all multipart features in the active layer
l = iface.activeLayer()
iter = l.getFeatures()
geoms = []
for feature in iter:
geom = feature.geometry()
if geom.isMultipart():
l.select(feature.id())
geoms.append(geom)
@timlinux
timlinux / FedoraWorkstationSetupNotes.md
Last active June 13, 2023 11:44
Fedora Workstation Setup Notes

Fedora Workstation Installation Notes

These are my notes for setting up my production workstation with QGIS dev environment and various other niceties.

Mounting encrypted drives

I have three 2TB SSD drives in addition to the system drive which is 250GB.

To get them to mount you need to not include them in the original setup of the computer disk scheme. Then after first log in to the system do the following: