Skip to content

Instantly share code, notes, and snippets.

View brookslyrette's full-sized avatar
🏠
Working from home from now until forever.

Brooks Lyrette brookslyrette

🏠
Working from home from now until forever.
View GitHub Profile
import React from 'react'
import Gist from 'react-gist'
import Markdown from 'markdown-to-jsx'
import ExpoSnack from 'react-expo-snack'
import Layout from '../components/layout'
import SEO from '../components/seo'
import Image from '../components/image'
const ScriptHandler = (props) => {
import React from 'react'
import Gist from 'react-gist'
import Markdown from 'markdown-to-jsx'
import Layout from '../components/layout'
import SEO from '../components/seo'
const ScriptHandler = (props) => {
// if the script is a gist override it with our react component.
if (props.src && props.src.includes('gist.github.com')) {
import React from 'react'
import Gist from 'react-gist'
import Markdown from 'markdown-to-jsx'
import Layout from '../components/layout'
import SEO from '../components/seo'
const ScriptHandler = (props) => {
// if the script is a gist override it with our react component.
if (props.src && props.src.includes('gist.github.com')) {
import React from 'react'
import Layout from '../components/layout'
import Markdown from 'markdown-to-jsx'
export default ({ pageContext }) => {
const { post } = pageContext
return (
<Layout>
<h1> {post.title} </h1>
const path = require(`path`)
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions
return new Promise((resolve) => {
graphql(`
{
allPostsJson(sort: { fields: published_at, order: DESC }, filter: { status: { eq: "published" } }) {
edges {
node {
import React from 'react'
import { Link, graphql } from 'gatsby'
import Layout from '../components/layout'
import SEO from '../components/seo'
const IndexPage = ({ data }) => {
return (
<Layout>
<SEO title="Home" keywords={[`gatsby`, `application`, `react`]} />
//...
`gatsby-transformer-json`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `./src/data/`,
},
},
//....
@brookslyrette
brookslyrette / sample_posts.json
Created December 31, 2018 14:11
sample_posts.json
[
{
"id": 2,
"uuid": "68d7aa2c-8646-49ae-84fe-4abfe079208e",
"title": "Why a blog?",
"slug": "testing-the-new-blog",
"markdown": "It's been ages since I told myself *\"You should really start a blog\"*. I'm finally making good on that idea today. \n\nFirst a little about me. I'm a software engineer from Ottawa Canada. I am the CTO at [Dotsub](https://dotsub.com) a very amateur [guitarist](https://www.youtube.com/user/Broonix) and avid [sim-racer](https://www.youtube.com/channel/UCK_orOmsbx7gfi6OoS_vn2g). Like most Canadians I enjoy hockey and beer. \n\nOn this blog I hope to share a few random thoughts. Maybe a few how to articles. \n\nYou'll have to excuse my spelling and grammar. You know the old joke: \n\n![I'm good with math](https://s-media-cache-ak0.pinimg.com/236x/e3/bd/c0/e3bdc06147a14b23dbf23a725b4184bb.jpg)\n\nThis idea may or may not pan out, but for now I'm hoping to blog at least once a week. \n\nLet's see how this goes!\n\n*I'm pretty sure no one will read this.*\n\n\n\n",
@brookslyrette
brookslyrette / blog_data.json
Last active December 31, 2018 13:42
blog_data.json
{
"db": [
{
"meta": {
"exported_on": 1545835453629,
"version": "009"
},
"data": {
"app_fields": [],
"app_settings": [],
{
"name": "sudoku-solver",
"version": "0.1.0",
"private": true,
"homepage": "https://brookslyrette.github.io/react-sudoku-solver/",
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-redux": "^5.0.6",
"react-scripts": "1.0.14",