Skip to content

Instantly share code, notes, and snippets.

View TheMcMurder's full-sized avatar
🐙

Justin McMurdie TheMcMurder

🐙
View GitHub Profile
@TheMcMurder
TheMcMurder / index.html
Last active February 19, 2020 16:36
Working rxjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title></title>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.2.3/dist/system.js'></script>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.2.3/dist/extras/amd.js'></script>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.2.3/dist/extras/named-exports.js'></script>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.2.3/dist/extras/named-register.js'></script>
@TheMcMurder
TheMcMurder / index.html
Created December 31, 2019 22:28
Working SystemJS and rxjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title></title>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.1.5/dist/system.js'></script>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.1.5/dist/extras/amd.js'></script>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.1.5/dist/extras/named-exports.js'></script>
<script src='https://cdn.jsdelivr.net/npm/systemjs@6.1.5/dist/extras/named-register.js'></script>
@TheMcMurder
TheMcMurder / machine.js
Last active May 7, 2020 15:14
Generated by XState Viz: https://xstate.js.org/viz
const alwaysClasses = 'px-4 rounded'
const primaryAlways = `text-white`
const secondaryAlways = `bg-transparent border`
const buttonMachine = Machine(
{
id: 'button',
initial: 'active',
on: {
CHOOSE_BTN_TYPE: {
import React, { useEffect, useRef } from "react";
// import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
// import PeoplePage from "./people-page/people-page.component.js";
export default function Root(props) {
const iframeRef = useRef()
useEffect(() => {
setTimeout(() => {
iframeRef.current.contentWindow.postMessage(
{ source: 'quicksilver', pathname: window.location.pathname.replace('/people/', '') },
@TheMcMurder
TheMcMurder / iframe-example.ts
Last active August 4, 2020 19:49
Example of the post message set-up in Angular 9
import { Component } from '@angular/core';
import { Router, NavigationStart, Event as NavigationEvent } from '@angular/router';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(
@TheMcMurder
TheMcMurder / README.md
Last active August 23, 2021 16:49
One potential way to handle a snackbar queue using react and rxjs

notification service

A centralized API for dispatching notifications through Snackbars and Banners.

API

triggerSnackbar

Triggers a Snackbar that is displayed to the user.