Skip to content

Instantly share code, notes, and snippets.

View woudsma's full-sized avatar
🌌
☀️🛰☁️🌈

Tjerk Woudsma woudsma

🌌
☀️🛰☁️🌈
View GitHub Profile
@woudsma
woudsma / dokku-kirby-autogit.md
Last active May 15, 2021 17:32
Dokku + Kirby + AutoGit

TL;DR

  • Configure Kirby for Dokku
  • Install deployment-keys and host keys Dokku plugins
  • Set up staging and production environments
  • Clone project repository into apps persistent storage folders
  • Mount desired folders including .git folder to apps
  • Add GIT_DIR and GIT_WORK_TREE environment variables to containers
  • Deploy to Dokku
@woudsma
woudsma / dokku-dockerfile-github-actions-deploy.yml
Last active July 24, 2021 14:47
Deploy project with Dockerfile to Dokku using Github Actions and Github Container Registry (ghcr.io). Deploy either staging or production based on branch.
# Example repository with Dockerfile and NGINX config: https://github.com/woudsma/es6-boilerplate
name: Deploy to Dokku
on:
pull_request:
types:
- closed
branches:
- develop
@woudsma
woudsma / retrain-mobilenet-for-the-web.md
Last active November 1, 2022 05:09
Retrain a MobileNet model for the web with TensorFlow for Poets and TensorFlow.js

Retrain a MobileNet model and use it in the browser with TensorFlow.js

DRAFT

Combining TensorFlow for Poets and TensorFlow.js.
Retrain a MobileNet V1 or V2 model on your own dataset using the CPU only.
I'm using a MacBook Pro without Nvidia GPU.

MobileNets can be used for image classification. This guide shows the steps I took to retrain a MobileNet on a custom dataset, and how to convert and use the retrained model in the browser using TensorFlow.js. The total time to set up, retrain the model and use it in the browser can take less than 30 minutes (depending on the size of your dataset).

Example app - HTML/JS and a retrained MobileNet V1/V2 model.

@woudsma
woudsma / jomox-alphabase-convert-samples-ffmpeg.md
Last active April 11, 2023 21:27
Convert samples for JoMoX Alpha Base compatibility with FFmpeg

Converting samples before import to JoMoX Alpha Base

Samples need to be 16 bit / 48kHz mono wav files.

Requirements:

  • Zsh (run zsh --version to check if it's installed already)
  • FFmpeg (brew install ffmpeg)

This guide is for UNIX (MacOS or Linux) users, the process would be similar on Windows machines with FFmpeg though. The required FFmpeg options are:

ffmpeg -i $INPUT -acodec pcm_s16le -ac 1 -ar 48000 $OUTPUT
@woudsma
woudsma / portainer-dokku.md
Last active May 7, 2023 23:04
TLS secured TCP exposed Docker daemon on Dokku host - setup

TLS secured TCP exposed Docker daemon on Dokku host - setup

  1. Create certificates
  2. Edit Docker options
  3. Restart Docker
  4. Copy client certificates from host
  5. (optional) Add remote endpoint in Portainer

Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.