Skip to content

Instantly share code, notes, and snippets.

View init.vim
let mapleader = ','
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/plugged')
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View gist:0f1eb3d683ffe28743bb1f9748a2cdd5
diff --git a/packages/gatsby-recipes/src/gui.js b/packages/gatsby-recipes/src/gui.js
index a7baf92b1..378477678 100644
--- a/packages/gatsby-recipes/src/gui.js
+++ b/packages/gatsby-recipes/src/gui.js
@@ -26,6 +26,7 @@ const {
defaultExchanges,
subscriptionExchange,
} = require(`urql`)
+const UrqlProvider = Provider
const { SubscriptionClient } = require(`subscriptions-transport-ws`)
@KyleAMathews
KyleAMathews / error
Created May 30, 2020
mdx-js/mdx failing
View error
/Users/kylemathews/programs/recipes-test/node_modules/trough/wrap.js:33
throw error
^
SyntaxError: unknown: Unexpected token (31:2)
29 | />
30 | export const FileTest = () => {
> 31 | const data = useInputByUuid("blog-title")
| ^
View test-page.mdx

Hi from MDX-landia

Click the diagram to regenerate the colors.

export const RandomColors = ({ count = 1000 }) => { const [els, setEls] = React.useState([]) const randomHexColor = () => { return '#' + ('000000' + Math.floor(Math.random()*16777215).toString(16)).slice(-6) }

@KyleAMathews
KyleAMathews / index.js
Created Apr 21, 2020
ThemeUI index.js for recipe
View index.js
// See other presets to try at https://theme-ui.com/packages/presets
import { funk } from '@theme-ui/presets'
export default {
...funk,
styles: {
...funk.styles,
},
}
View .estlintrc.js
module.exports = {
globals: {
__PATH_PREFIX__: true,
},
extends: `react-app`,
}
View home-page-home-page.js
describe('My home page', () => {
beforeEach(() => {
cy.visit('/')
})
/*
* TODO: make this test work
*/
it('contains the text hello gatsby', () => {
expect(cy.getByText('sup')).should('eq', 'Hello Gatsby')
View styled-components-example.js
import React from "react"
import styled from "styled-components"
const Container = styled.div`
margin: 3rem auto;
max-width: 600px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
View sample-emotion.js
import React from "react"
export default () => (
<div
css={{
backgroundColor: 'hotpink',
'&:hover': {
color: 'lightgreen'
}
}}