Skip to content

Instantly share code, notes, and snippets.

Jacob Knaack JacobKnaack

Block or report user

Report or block JacobKnaack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JacobKnaack / index.html
Last active Feb 3, 2020
Class 01 index file
View index.html
<!DOCTYPE html>
<title>Class 01 Demo!!</title>
ul {
color: red;
JacobKnaack / chart.js
Created Jan 30, 2020
Flask Analysis: Grabbing our svg
View chart.js
// Selects our parent element in our html and appens a new <svg> element
const svg ="#china-map").append("svg")
.attr("width", width)
.attr("height", height)
.attr("transform", "translate(0,0)");
JacobKnaack / index.html
Last active Jan 30, 2020
Flask Analysis: index html file
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="chart.css">
<script src=""></script>
<title>Coronavirus Data</title>
JacobKnaack /
Created Jan 29, 2020
Flask Analytics: entry file for flask application logic
from flask import Flask, render_template, request
from util import data_parse
import json
import requests
app = Flask(__name__)
def index():
r = requests.get('')
JacobKnaack / bulk-request.js
Last active Jul 29, 2019
Node Module for performing a large number of http requests in a sensible manner.
View bulk-request.js
'use strict';
* Executes a large number of requests using asynchronous operations
* @param {Array} reqArray - Contains request objects formatted as per the specifications of whatever request function you are using
* @param {Function} httpPromise - A function that makes a 1 http request such as npm@request-promise:
module.exports = (reqArray, httpPromise) => {
const promiseArray = => new Promise(async (resolve, reject) => {
try {
JacobKnaack / article.js
Created Apr 17, 2019
apollo-blog Article display component
View article.js
import React from 'react'
import { Link } from 'react-router-dom'
import gql from 'graphql-tag'
import { Query } from 'react-apollo'
import { Container, Loader, Label, Image } from 'semantic-ui-react'
import './_article.css'
const GET_ARTICLE_BY_SLUG = gql`
query Article($read_key: String!, $slug: String!) {
object(bucket_slug: "apollo-blog", read_key: $read_key, slug: $slug ) {
JacobKnaack / home.js
Last active Apr 17, 2019
apollo-blog Home View
View home.js
import React from 'react'
import gql from 'graphql-tag'
import { graphql } from 'react-apollo'
import { Link } from 'react-router-dom'
// Component from Semantic UI
import { Container, Image, Card, Label, Loader } from 'semantic-ui-react'
const GET_ARTICLES = gql`
query Articles($read_key: String!) {
JacobKnaack / .env
Created Apr 16, 2019
Apollo-blog environment configuration
View .env
JacobKnaack / App.js
Last active Apr 16, 2019
Apollo-blog root App component
View App.js
import React, { Component } from 'react'
import ApolloClient from 'apollo-boost'
import { ApolloProvider } from 'react-apollo'
import { BrowserRouter, Route } from 'react-router-dom'
import './App.css'
import 'semantic-ui-css/semantic.min.css'
import Home from './views/home'
import Article from './views/article'
JacobKnaack / .env
Last active Apr 17, 2019
gatsby-docs env config
View .env
You can’t perform that action at this time.