Skip to content

Instantly share code, notes, and snippets.

View jpwesselink's full-sized avatar
🏠
Inventing a better mouse trap

JP Wesselink jpwesselink

🏠
Inventing a better mouse trap
View GitHub Profile

Graphql federation with ...

  • Status: proposed
  • Date: 2022-10-12

Technical Story:

How to stitch multiple graphql/rest/grpc services into one graphql schema?

Decision Drivers

@jpwesselink
jpwesselink / machine.js
Created December 6, 2019 14:06
Generated by XState Viz: https://xstate.js.org/viz
const checkWifiCredentials = (context) => {
const { wifi: { ssid, password, encryptionType, hidden } } = context;
return !!ssid && !!password && !!encryptionType && hidden !== undefined;
};
const checkAccessToken = (context) => {
return !!context.accessToken;
};
const checkCredentials = (context, event, { cond }) => {
return ((checkWifiCredentials(context) && checkAccessToken(context)) ===
!cond.negate);
@jpwesselink
jpwesselink / machine.js
Last active November 10, 2019 13:20
Generated by XState Viz: https://xstate.js.org/viz
const connectionCheckerMachine = Machine({
id: 'networkConnection',
initial: 'offline',
states: {
offline: {
after: {
3000: 'connecting'
@jpwesselink
jpwesselink / machine.js
Created November 8, 2019 13:24
Generated by XState Viz: https://xstate.js.org/viz
const connectionCheckerMachine = Machine({
id: 'light',
initial: 'green',
states: {
green: {
on: {
TIMER: 'yellow',
WHATEVER: 'red'
}
{
"definition":"belangenverklaring.xml",
"name":"belangenverklaring",
"inputs":{
"Belangenverklaring":{
"commissie":"Voedsel commissie",
"Persoonsgegevens":{
"voornaam":"Voornaam",
"tussenvoegsels":"tussenvoegsel",
"achternaam":"Achternaam",
@jpwesselink
jpwesselink / react-redux-simplified.jsx
Last active June 12, 2017 08:02
Simplified anatomy of a React Redux app
import React from 'react';
import { render } from 'react-dom';
import { connect, Provider } from 'react-redux';
import { createStore } from 'redux';
// Here's a reducer...
const reducer = (state = { name: 'JP' }, action) => {
switch (action.type) {
case 'SET_NEW_NAME':
return { name: action.newName };
@jpwesselink
jpwesselink / main.js
Last active June 9, 2017 13:10
Some description
// ./main.js
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux';
import {
Container as Counter,
reducers as counterReducers
} from './CounterApp';
import {
~ ⍉ ➜ curl -I https://www.npmjs.com/search\?q\=eslint
HTTP/1.1 503 first byte timeout
Server: Varnish
Retry-After: 0
Content-Type: text/html; charset=utf-8
Content-Length: 448
Accept-Ranges: bytes
Date: Thu, 16 Feb 2017 09:34:38 GMT
Via: 1.1 varnish
Connection: close
[bacon-workshopper] bacon-love current
02. Wrapping Values as Reactive Datatypes
[bacon-workshopper] cat exercise-02.js
module.exports = (Bacon, promise, eventTarget, callback) => {
const promiseStream = Bacon.fromPromise(promise);
const eventTargetStream = Bacon.fromEvent(eventTarget, 'data');
const callbackStream = Bacon.fromCallback(callback);
return {
promise : promiseStream,
Trying to filter "out of office" emails from my inbox as I receive a lot of them when I send a blast.
I need help - what do your "out of office" emails say in your langauge? Comment Below!
Automatische Antwort
Automatic reply
AutoReply
Out of Office
Xesc Duran
Abwesend