Skip to content

Instantly share code, notes, and snippets.

View willgriffiths's full-sized avatar
🧗
Hanging out in the back of the front end.

Will Griffiths willgriffiths

🧗
Hanging out in the back of the front end.
View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@willgriffiths
willgriffiths / ts-beginner-resources.md
Last active November 15, 2019 04:04
TypeScript Beginner Resources - Some resources that are help when you start learning

Don't hide your ignorance

Some of us like to learn alone. Succeeding and failing privately. There are many reasons why but sometimes it's because they're afraid to make mistakes.

Recently I read a few articles encouraging everyone to learn in public. These articles spelled out the obvious benefits:

  • Teaching is the best way to learn.
  • You make yourself more employable.
  • You add value to the world.
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@willgriffiths
willgriffiths / reddit.md
Last active July 24, 2019 11:37 — forked from davidkpiano/reddit.md
XState + React + Reddit API Tutorial (Review)

Reddit API

Suppose we wanted to create an app that displays a selected subreddit's posts. Specifically, the app should be able to:

  • Have a predefined list of subreddits that the user can select from
  • Load the selected subreddit
  • Display the last time the selected subreddit was loaded
  • Reload the selected subreddit
  • Select a different subreddit at any time
@willgriffiths
willgriffiths / machine.js
Last active July 22, 2019 06:54
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

This shows the meteorite strikes on the surface of the Earth. Mouse over for tooltips.

The Earth is rendered in canvas with svg tooltips on top.

If you've got any tips to improve the performance of zooming and rotating please message me. :)

<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
}
svg {
position: absolute;
}