Code, etc.

Des bouts de trucs liés au code, que je trouve utiles de stocker quelque part (en anglais)

Changing the primary key of a model in Django

I had to change the primary key of a django model, and I wanted to create a migration for this. The previous model was using django ids.

The migrations will need to do the following things:

  • Create a new uuid field/column in the database
  • Iterate over the existing items …

django, orm, migrations

Adding collaboration on uMap, third update

I’ve spent the last few weeks working on uMap, still with the goal of bringing real-time collaboration to the maps. I’m not there yet, but I’ve made some progress that I will relate here.

JavaScript modules

uMap has been there since 2012, at a time when ES6 …


umap, geojson, websockets

Returning objects from an arrow function

When using an arrow function in JavaScript, I was expecting to be able to return objects, but ended up with returning undefined values.

Turns out it’s not possible to return directly objects from inside the arrow function because they’re confused as statements.

This is covered by MDN.

To …


Javascript

Format an USB disk from the command-line on MacOSX

sudo diskutil unmountDisk /dev/disk5
sudo diskutil eraseDisk "MS-DOS FAT32" Brocolis /dev/disk

Rescuing a broken asahi linux workstation

How I used Alpine linux as a rescue system
Linux, Asahi

Using pelican to track my worked and volunteer hours

Graphs, progress-bars and python-markdown extensions
Pelican, Work, Vega, Markdown

Adding Real-Time Collaboration to uMap, second week

A heads-up on what I've been doing this week on uMap
Python, CRDT, Sync, uMap

Importing a PostgreSQL dump under a different database name

Simple commands to help you during an import
postgresql, sysadmin

Deploying and customizing datasette

Step by step follow-up on how I've deployed it and added custom templates on top.
Datasette, Deployment

Adding Real-Time Collaboration to uMap, first week

A heads-up on what I've been doing this week on uMap
Python, CRDT, Sync, uMap