Skip to content

Instantly share code, notes, and snippets.

////////////////////////////////////////////////////////////////
// Below is an example of how Audio drivers work in video games
// and how you interact with them. It's a bit simplified but if
// you have no prior knowledge it should give you some general
// idea how it works and what the limitations are.
//
// A more complex example would go more in to details about:
// - How a DspNode works (here we only use it)
// - Events in music files (for example: "Loop this part 4 times
// and then start back at the beginning")

Installing node on WSL

  1. Install WSL and ubuntu (from the windows store)
  2. Run the WSL
  3. Install NVM (see: https://github.com/nvm-sh/nvm
  4. Restart the session
  5. Run nvm install --lts node
using System;
namespace Dummy
{
class Program
{
private static void Header(string title)
{
Console.WriteLine(new string('=', 79));
Console.WriteLine(title);
@DevWouter
DevWouter / keybase.md
Created April 15, 2021 15:33
keybase.md

Keybase proof

I hereby claim:

  • I am devwouter on github.
  • I am devwouter (https://keybase.io/devwouter) on keybase.
  • I have a public key ASD4ji8YjOoOsfqd8qdg_IKfIE3rN7zIhuCbTH7r0B7-2Ao

To claim this, I am signing this object:

using System;
using System.Collections.Generic;
namespace HideAndSeek
{
class Program
{
static void Main(string[] args)
{
foreach(var s in countDownTo(10)){
type RouteData = PathArgs<"/company/:companyId/customer/:customerId/vendor-user/:vendorUserId">;
// .
// /|\
var routeData: RouteData = { // |
companyId: "",// <-- Strong typed based on URL |
customerId: "",// <-- Strong typed based on URL |
vendorUserId: "", // <-- Strong typed based on URL |
};
import { Subject, BehaviorSubject, ReplaySubject, Observable } from 'rxjs'; // Subjects and Observable
import { Subscription } from "rxjs"; // Subscription
import { combineLatest, of, pipe, } from "rxjs"; // Functions
import { delay, filter, map, share, switchMap, tap } from 'rxjs/operators'; // Operators
import { fromFetch } from "rxjs/fetch"; // Fetch subject (a special subject)
////////////////////////////////////////////////////////////////////////////////////////////////
// Creating an subject.
////////////////////////////////////////////////////////////////////////////////////////////////
@DevWouter
DevWouter / git.md
Last active July 2, 2020 11:08 — forked from peterjwest/git-cleanup.sh
Git aliases

git pushup - Pushes a branch and sets the upstream to be the branch of the same name (useful if your git push.default is simple):

On Linux:

git config --global alias.pushup \!'git push --set-upstream origin `git symbolic-ref --short HEAD`'

On Windows:

git config --global alias.pushup '!git push --set-upstream origin `git symbolic-ref --short HEAD`'
void Main()
{
var factory = new System.Threading.Tasks.TaskFactory();
Console.WriteLine("Create empty task");
var basicTask = factory.StartNew(() => { });
Console.WriteLine("Queueing first message");
basicTask = basicTask.ContinueWith(t => { Thread.Sleep(3000); Console.WriteLine("First message"); });
Console.WriteLine("Queueing second message");
basicTask = basicTask.ContinueWith(t => { Thread.Sleep(1000); Console.WriteLine("Second message"); });
Console.WriteLine("All message are queued");
@DevWouter
DevWouter / pre-commit
Created July 5, 2019 09:03
Prevent fit/fdescribe in ts files
#!/bin/sh
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# uncomment next line for debugging, will print all expanded bash commands
# set -x
# Yes, if you put "fdescribe" in a comment block, this will still abort the