Skip to content

Instantly share code, notes, and snippets.

View mwarger's full-sized avatar
😎
coooode

Mat Warger mwarger

😎
coooode
View GitHub Profile
@mwarger
mwarger / windows-dev-setup
Last active June 12, 2023 16:08
utilities for setting up windows dev machine
DO THIS
install scoop from scoop.sh
(use `scoop search` to find packages - more docs on website)
DO THESE
scoop install sudo
scoop install 7zip git openssh
scoop install aria2 curl grep sed less touch coreutils
MAYBE THIS
@mwarger
mwarger / schema.graphql
Created July 17, 2018 01:09
Games and Reviews Schema
input CreateGameInput {
id: ID!
title: String!
description: String
rating: Int
}
input CreateReviewInput {
id: ID!
rating: Int!
@mwarger
mwarger / TypedQuery.js
Last active July 21, 2018 20:07
Typed Query Component
// @flow
import * as React from 'react'
import { Query } from 'react-apollo'
type TypedQueryProps<D, V> = {
query: any,
variables?: V,
children: (data: D) => React.Node,
fetchPolicy?: string
}
@mwarger
mwarger / flutter emulator setup
Created July 12, 2019 18:16
how to correctly setup emulator for use with vs code flutter plugin
flutter emulators --create --name Pixel-test
flutter emulators --launch Pixel-test
@mwarger
mwarger / react-ts.code-snippets
Created August 7, 2019 17:17
ts code snippets for react, ts, theme-ui
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
@mwarger
mwarger / machine.js
Created February 20, 2020 02:26
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mwarger
mwarger / machine.js
Created February 20, 2020 02:43
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mwarger
mwarger / machine.js
Created February 20, 2020 02:50
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mwarger
mwarger / machine.js
Created March 1, 2020 21:53
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'idle',
context: {
retries: 0
},
states: {
idle: {
on: {
FETCH: 'loading'
@mwarger
mwarger / machine.js
Last active March 8, 2020 19:00
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine(
{
id: "fetch",
initial: "idle",
context: {
url: {},
data: null,
error: null,
retries: 0,
maxRetries: 3