Skip to content

Instantly share code, notes, and snippets.

View JacobKnaack's full-sized avatar

Jacob Knaack JacobKnaack

View GitHub Profile

Jacob Knaack

Seattle Wa, | 206-850-3988 | jacobknck@gmail.com

github.com/JacobKnaack | linkedin.com/in/jacobknaack | jacobknaack.me

Full stack JavaScript Developer with a passion for design and a background in technical writing, psychology, and linguistics. My goal is to use my knowledge of human Psychology and Programming to build interactive web applications that are interesting to look at, easy to use, and serve a core purpose.

import json
import requests
import base64
import markdown
import sys
if not sys.argv[1]:
raise Exception(
'NO USER SPECIFIED, please provide a user as second argument')
elif not sys.argv[2]:
@JacobKnaack
JacobKnaack / migration.py
Last active December 16, 2018 01:38
Movie Blog DB Migrations Script
import json
import requests
import base64
import markdown
BASE_URL = 'api-url-goes-here'
USER_INFO = [{"username": "Jacob", "password": "password-goes-here", "email": "email-goes-here"}, {"username": "e-vaughn",
"password": "passwor-goes-here", "email": "email-goes-here"}, {"username": "Megan", "password": "password-goes-here", "email": "email-goes-here"}]
NIT_PICKERS = []
# Check if proper users exist
@JacobKnaack
JacobKnaack / gatsby-config.js
Created January 24, 2019 18:29
Gatsby config file for gatsby-docs
module.exports = {
siteMetadata: {
title: `Gatsby Docs`,
description: `Create and View Minimalistic Documentation, powered by GatsbyJs and CosmicJS`,
author: `@jacobknaack`,
},
plugins: [
`gatsby-plugin-eslint`,
`gatsby-plugin-react-helmet`,
`gatsby-transformer-sharp`,
@JacobKnaack
JacobKnaack / gatsby-node.js
Created January 24, 2019 18:51
initial gatsby node without createPages
require("dotenv").config();
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
exports.onCreatePage = ({ page, actions }) => {
const { createPage, deletePage } = actions
@JacobKnaack
JacobKnaack / index.js
Created January 24, 2019 19:30
Home page for gastby-docs
import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'gatsby'
import Layout from '../components/layout'
import SEO from '../components/seo'
import Docs from '../components/docs'
const IndexPage = ({ data, pageContext }) => {
return (
@JacobKnaack
JacobKnaack / createDoc.js
Last active January 27, 2019 07:09
Form for creating a doc object on Cosmic JS
import React from 'react'
import PropTypes from 'prop-types'
import Cosmic from 'cosmicjs'
import showdown from 'showdown'
const api = Cosmic()
const converter = new showdown.Converter({ ghCompatibleHeaderId: true })
const initialState = {
open: false,
@JacobKnaack
JacobKnaack / index.js
Last active February 8, 2019 19:29
docs - initial setup before createDoc
import React from 'react'import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'gatsby'
// formats our slugs to be used in links to our display page
function formatSlug(title) {
return title
.toLowerCase()
.replace(/[^a-zA-Z ]/g, "")
.replace(/\s/g, '-')
@JacobKnaack
JacobKnaack / docPage.js
Last active February 8, 2019 19:45
docPage for gatsby-docs
import React from 'react'
import showdown from 'showdown'
import PropTypes from 'prop-types'
import Layout from '../components/layout.js'
import SEO from '../components/seo.js'
import { graphql, Link } from 'gatsby'
import hljs from 'highlight.js'
import 'highlight.js/styles/github.css'
const converter = new showdown.Converter({ ghCompatibleHeaderId: true })
@JacobKnaack
JacobKnaack / gatsby-node.js
Last active February 15, 2019 17:21
Final gatsby-node
require("dotenv").config();
const path = require('path');
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
exports.onCreatePage = ({ page, actions }) => {
const { createPage, deletePage } = actions