Skip to content

Instantly share code, notes, and snippets.

View thewrath's full-sized avatar

Thomas thewrath

View GitHub Profile
@thewrath
thewrath / virtual_joystick.js
Last active May 13, 2025 16:42
KaboomJS / KaplayJS Virtual Joystick
import kaplay from "kaplay";
import "kaplay/global"; // uncomment if you want to use without the k. prefix
kaplay();
loadRoot("./");
loadSprite("bean", "sprites/bean.png");
const VELOCITY = 5;

Separate migrations for multiple providers

03/11/2022 - Dotnet 6.0

Goal

Inspired by this documentation Separate Migrations, the goal is to have a migration suite for Sqlite (used in dev) and another one for SqlServer (used in production). This document gathers what in my case brought me a working solution.

Projects setup

We assume that your project contains a sln file, the objective is as follows:

@thewrath
thewrath / formCollection.js
Created January 19, 2022 08:47
Symfony accordion collection Type
/**
* Add addition and removal of element logic to Symfony CollectionType.
*
* @see https://symfony.com/doc/3.4/form/form_collections.html
* @param collectionHolder
* @param addButtonText
* @param deleteButtonText
*/
function manageCollection(collectionHolder, addButtonText, deleteButtonText) {
const getPanel = s => document.querySelector(s.dataset.ref);
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix