Skip to content

Instantly share code, notes, and snippets.

View JacobKnaack's full-sized avatar

Jacob Knaack JacobKnaack

View GitHub Profile
<!DOCTYPE html>
<title>My first or second website</title>
h1 {
background-color: blue;
color: white;
p {
JacobKnaack /
Created July 23, 2020 05:58
React Initialization Script, used for implementing a minimal bootstrap of reacr-scripts from facebook.
if [ $1 ]
echo "****8 \n Creating project directory\n*****"
mkdir $1
cd $1
echo "***** \n No directory specified, adding project files to CWD\n*****"
JacobKnaack / chart.js
Created January 30, 2020 02:00
Flask Analysis: Grabbing our svg
// 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 January 30, 2020 06:24
Flask Analysis: index html file
<!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 January 29, 2020 23:20
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 July 29, 2019 20:53
Node Module for performing a large number of http requests in a sensible manner.
'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 April 17, 2019 16:55
apollo-blog Article display component
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 April 17, 2019 16:47
apollo-blog Home View
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 April 16, 2019 23:50
Apollo-blog environment configuration
JacobKnaack / App.js
Last active April 16, 2019 23:47
Apollo-blog root App component
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'