Skip to content

Instantly share code, notes, and snippets.

@wvengen
wvengen / launchpad_x.ctlr
Created June 17, 2020 13:06
Luppp controller definition for the Novation Launchpad X
{
"name": "Novation Launchpad X",
"author": "wvengen",
"link": "https://novationmusic.com/en/launch/launchpad-x",
"inputBindings": [
{
"status": 176,
"data": 89,
"action": "grid:launch_scene",
"scene": 0
@wvengen
wvengen / README.md
Last active November 9, 2020 13:18
Seasonality in foods, international data

Buying fruit and vegetables in-season makes a difference in sustainability. What information is there on this, also internationally? Eventually it would be nice to provide this in a common format, so that you can give your country, and find what food products are in-season.

Below are some seasonal calendars. Most are a calendar with what fruits, vegetables (and sometimes other foods) are in-season, per month or per season. This is often tied to local availability. If greenhouses are used to grow, the local option may not be the most sustainable one, only Milieu Centraal appears to talk about this.

@wvengen
wvengen / NOTES.md
Last active March 13, 2021 17:20
Freedrum on Linux

Freedrum on Linux

The recently released Freedrum has no official Linux support. But, fortunately, it uses standard Bluetooth LE MIDI. It doesn't seem to work out of the box, yet (on Ubuntu 17.04, most probably Ubuntu 18.04 will support it directly).

Bluez 5.46

One really needs bluez 5.46 or higher. On Ubuntu, these are packaged in artful proposed (amd64). Unfortunately, MIDI support is not enabled in this build (Ubuntu bug #1713017).

So you'll need to download the sources, install dependencies plus libasound2-dev, build and install resulting debs. You may need to add --enable-midi to debian/rules. Like this:

@wvengen
wvengen / pdf-zotero-unlink.py
Created May 21, 2021 08:43
Alternative for Zotero's "Unlink citations" in Google Docs
@wvengen
wvengen / NOTES.md
Last active July 14, 2021 07:03
Semantic web of food notes
@wvengen
wvengen / README.md
Last active September 17, 2021 12:23
Basic redux-api example
@wvengen
wvengen / README.md
Last active August 1, 2022 07:08
Using trickle with Flatpak applications

Trickle is a command-line tool to throttle network bandwidth of other applications. You use it on the command-line to start the application. It uses LD_PRELOAD to override network-related calls. As a result, using it with containerized apps, like Flatpak, does not work out of the box.

To get trickle to function with a Flatpak application, the preloaded library needs to be available in the container. And it needs to be compatible with the software in the container (notably, a glibc version that is compatible).

First try

  1. Install trickle on your (host) system, on Debian/Ubuntu that would be apt install trickle.
  2. Make sure you have the flatpak application installed. I'm using com.slack.Slack as an example here.
  3. Run the flatpak application with trickle
@wvengen
wvengen / update-metabase-db-from-heroku.sh
Last active January 23, 2023 11:20
Update Metabase DB credentials from Heroku (for PostgreSQL)
#!/bin/bash
#
# Update database connections in Metabase from Heroku
#
# Tailor the following variables to your situation, set credentials in ~/.netrc (with: machine, login, password)
#
# Requirements:
# - curl
# - jq
# - heroku CLI
@wvengen
wvengen / parse_xml_streaming.rb
Last active July 11, 2023 18:48
Parsing an XML stream from an HTTP endpoint in Ruby.
#!/usr/bin/env ruby
#
# Example of parsing a remote XML stream.
#
# Fetches data from an HTTP endpoint, and processes it bit by bit, without
# loading the whole file into memory.
#
# This example shows recent articles from the W3C blog feed.
#
require 'nokogiri'
@wvengen
wvengen / README.md
Last active October 24, 2023 07:15
Nutriscore SVGs (for use on light background)

Nutriscore SVGs

Nutriscore logo's for use with light background (SVG), extracted from the Nutriscore's corporate graphic charter (dec 2022). For use on light background.

License

The author (me) does not claim any copyright, these files can be used freely. The logo's are probably in the public domain, though trademark law may apply. IANAL.