Skip to content

Instantly share code, notes, and snippets.

View welteki's full-sized avatar

Han Verstraete welteki

View GitHub Profile
@welteki
welteki / README.md
Last active June 29, 2022 13:59
Automatically update OpenFaaS functions with the Argo CD Image Updater

Automatically update OpenFaaS functions with the Argo CD Image Updater

A short walk-through of how to use the Argo CD Image Updater to automatically update your OpenFaaS functions.

In this walk-through we bootstrap a new cluster using Argo CD with the app of apps pattern to deploy OpenFaaS and a set of OpenFaaS functions. We will then configure the Argo CD Image Updater to update our functions.

View the example on GitHub

Bootstrap a new cluster

Create a local cluster with kind

@welteki
welteki / interpreter-kvs.js
Last active January 29, 2020 00:15
Monet.js Free monad DSL and interpreter example
const { compose, identity, add, always, dissoc, assoc } = require('ramda')
const { taggedSum, tagged } = require('daggy');
const { Free } = require('monet');
const KVS = taggedSum('KVS', {
Put: ['key', 'val', 'next'],
Del: ['key', 'next'],
Get: ['key', 'val']
});
@welteki
welteki / tcp-socket.ts
Created November 13, 2018 20:38
Reactive TCP socket programming in Node.js
import { connect, NetConnectOpts } from 'net';
import { Observable, Observer, Subject } from 'rxjs';
// TCP Client
const fromSocket = (options: NetConnectOpts): Subject<Buffer> => {
const socket = connect(options);
const observable = Observable.create(function(obs) {
socket.on('data', obs.next.bind(obs));
socket.on('error', obs.error.bind(obs));
@welteki
welteki / variants.tsx
Created August 7, 2018 08:33
Using HOC to create React component variants.
import * as React from 'react';
import { omit } from 'lodash';
export const withVariants = <O extends {}, T extends {}>(
Component: React.ComponentClass<O> | React.StatelessComponent<O>,
variants: T
) => {
type Variants = keyof T;
interface ExtenralProps {
variant?: Variants;

Keybase proof

I hereby claim:

  • I am welteki on github.
  • I am welteki (https://keybase.io/welteki) on keybase.
  • I have a public key ASCRLMg05XK1of9gI2EYXFobGEDIYD4SGDmh2C-4HHGKBQo

To claim this, I am signing this object: