Skip to content

Instantly share code, notes, and snippets.

View FrankMerema's full-sized avatar

Frank Merema FrankMerema

View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@FrankMerema
FrankMerema / machine.js
Last active May 29, 2020 12:28
Generated by XState Viz: https://xstate.js.org/viz
const navigationMachine = Machine(
{
id: 'navigationMachine',
initial: 'initial',
context: {
addressValid: true,
fulfilmentValid: false,
slotsValid: false,
overviewValid: false,
thankyouValid: false,
@FrankMerema
FrankMerema / machine.js
Last active April 10, 2020 09:13
Generated by XState Viz: https://xstate.js.org/viz
const canActivateNextComponent = (ctx, event, { state }) => true; // check if next component can be activated
const canActivatePreviousComponent = (ctx, event, { state }) => true; // check if previous component can be activated
const navigationMachine = Machine(
{
id: 'navigationMachine',
initial: 'overview',
context: {
addressValid: true,
@FrankMerema
FrankMerema / rest.service.ts
Created June 22, 2018 09:00
Testing Angular component with api service in OnInit (Spectator)
import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/index';
export interface someObject {
}
@Injectable({
providedIn: 'root'
})