Skip to content

Instantly share code, notes, and snippets.

View diestrin's full-sized avatar

Diego Barahona diestrin

View GitHub Profile
@diestrin
diestrin / machine.js
Created June 26, 2021 14:41
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@diestrin
diestrin / machine.js
Created May 12, 2021 14:22
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@diestrin
diestrin / machine.js
Created February 5, 2021 19:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@diestrin
diestrin / machine.js
Last active April 12, 2021 21:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@diestrin
diestrin / machine.js
Created February 5, 2021 19:26
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@diestrin
diestrin / machine.js
Created February 5, 2021 19:26
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@diestrin
diestrin / setup.sh
Last active February 3, 2021 16:40
Citadel Setup
#!/bin/bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
echo "Generating ssh key for github"
echo "Enter your email for the key:"
read email
ssh-keygen -t rsa -b 4096 -C "$email"
@diestrin
diestrin / .zshrc
Created April 16, 2020 14:03
Oh My ZSH Config
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export GOPATH=$HOME/go
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
### Build stage
FROM node:10.19.0 AS base
WORKDIR /usr/local/src
ADD ./package.json .
RUN npm i
ADD . .
RUN npm run build:ssr
import { Observable, of } from 'rxjs';
import { tap, share } from 'rxjs/operators';
import { Injectable, isDevMode } from '@angular/core';
import { makeStateKey, TransferState } from '@angular/platform-browser';
import { HttpInterceptor, HttpRequest, HttpHandler, HttpResponse } from '@angular/common/http';
import { EnvService } from './env.service';
const STATE_KEY = 'state-key';
const StateKey = makeStateKey<Object>(STATE_KEY);