Skip to content

Instantly share code, notes, and snippets.

View JackHowa's full-sized avatar

Jack Howard JackHowa

View GitHub Profile
@JackHowa
JackHowa / coin-flip-next.py
Created February 15, 2021 17:49
Write a program that counts the number of occurrences of "11" in an input sequence of zeros and ones. The input of the program is just the sequence and it should return a single number, which is the number of occurrences of "11".
def count11(seq):
# define this function and return the number of occurrences as a number
# define int for occurences of num
occurences = 0
# loop through each element
# get length of seq
seq_length = len(seq)
@JackHowa
JackHowa / settings.json
Created December 3, 2020 15:46
vs code settings
{
"eslint.alwaysShowStatus": true,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[scss]": {
"editor.codeActionsOnSave": {
@JackHowa
JackHowa / formatDate.js
Created November 27, 2020 16:09
format date
const MONTH_NAMES = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
def main():
portnames = ["PAN", "AMS", "CAS", "NYC", "HEL"]
# generate list of 1, 2, 3, 4
check = range(1,5)
port1 = 0
for port2 in range(1, 5):
for port3 in range(1, 5):
for port4 in range(1, 5):
for port5 in range(1, 5):

Keybase proof

I hereby claim:

  • I am jackhowa on github.
  • I am jackhowa (https://keybase.io/jackhowa) on keybase.
  • I have a public key ASCUXVHzVA6AAyNB0dM69_Olu_PS8QZH-JkKOtnRDseuEgo

To claim this, I am signing this object:

@JackHowa
JackHowa / StorybookNotes-fem.md
Created March 15, 2020 21:44
from Frontend Masters Storybook course ideas

Design system

Pillars

  • style guide
  • foundation
  • ui kit
    • buttons
    • text fields
@JackHowa
JackHowa / home.js
Created July 28, 2019 16:11
web-workers
(function Home(){
"use strict";
var startStopBtn;
var fibsList;
var worker;
document.addEventListener("DOMContentLoaded",ready,false);
@JackHowa
JackHowa / SearchParams.js
Created June 8, 2019 18:13
this is for the v5 with hooks, new pet api
import React, { useState } from "react";
import { ANIMALS } from "@frontendmasters/pet";
const SearchParams = () => {
// api limited to seattle and sf
const [location, setLocation] = useState("Seattle, WA");
const [animal, setAnimal] = useState("dog");
const [breed, setBreed] = useState("");
return (
@JackHowa
JackHowa / count-anagrams.js
Created April 18, 2019 16:48
Solution for counting number of lines to anagrams in a list, done recursively
'use strict';
/**
* Count the number of anagrams in a list of words.
*
* An anagram is a word made up of the same letters as another word in the array (but not
@JackHowa
JackHowa / gcd.js
Created April 18, 2019 16:46
solution for greatest common denominator
'use strict';
/**
* Find the greatest common divisor (GCD) of two positive integers.
*
* @param {number} a - The first integer