Skip to content

Instantly share code, notes, and snippets.

View maxmatthews's full-sized avatar

Max Matthews maxmatthews

View GitHub Profile
@maxmatthews
maxmatthews / starter.html
Last active February 27, 2020 19:47
A starter webpage with a contact form powered by MailThis.to, Bootstrap, & Google Fonts
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Max Matthews</title>
<link
href="https://fonts.googleapis.com/css?family=Raleway:300,400&display=swap"
rel="stylesheet"
/>
const myTarotCards = [
//This is the info for my first deck of cards
{
deck: "Traditional",
categories: [
{
category: "Air",
characteristics: ["whitty", "intellectual", "detached", "sharp"],
},
{
const toDoList = [
{ name: "Import Export homework", status: "done", daysLeftToDo: 1 },
{ name: "Array homework", status: "in progress", daysLeftToDo: 1 },
{ name: "Chat App homework", status: "in progress", daysLeftToDo: 1 },
{ name: "Add to Capstone website", status: "to do", daysLeftToDo: 2 },
{ name: "Finish Resume", status: "in progress", daysLeftToDo: 3 },
];
const priorityTasks2 = toDoList.filter(
(task) => task.status !== "done" && task.daysLeftToDo < 2
@maxmatthews
maxmatthews / tip.js
Created May 12, 2022 20:35
Tip Calculator Terminal
const prompts = require("prompts");
(async () => {
let keepRunning = true;
while (keepRunning) {
const answers = await prompts([
{
name: "total",
type: "number",
@maxmatthews
maxmatthews / schools.js
Created May 12, 2022 21:05
Nested Data
const schools = [
{
type: "elementary",
teachers: [
{
name: "Mr. Smith",
class: "Pirate History",
students: [
"Toya Whitebeard",
"Snooty Helge",
@maxmatthews
maxmatthews / tip-script.js
Last active May 12, 2022 21:07
Browser Tip Calculator
document.getElementById("calculateButton").onclick = () => {
const totalInput = document.getElementById("total");
const tipInput = document.getElementById("tip");
console.log(typeof totalInput.value);
console.log(typeof tipInput.value);
const total = parseFloat(totalInput.value);
const tip = parseInt(tipInput.value);
function palindrome(str) {
str = str
.replace(/[\s\.\,_-]/g, "")
.toLowerCase()
.replace("/", "")
.replace(":", "")
.replace("(", "")
.replace(")", "");
console.log(str, str.split("").reverse().join(""));
if (str === str.split("").reverse().join("")) {
@maxmatthews
maxmatthews / index.html
Created May 25, 2022 17:14
Tic Tac Toe D1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tic Tac Toe</title>
</head>
<body>
<div id="container">
@maxmatthews
maxmatthews / index.html
Last active May 26, 2022 00:25
Tic Tac Toe
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
@maxmatthews
maxmatthews / schools.js
Created November 16, 2022 17:19
schools.js data and questions
const schools = [
{
type: "elementary",
teachers: [
{
name: "Mr. Smith",
class: "Pirate History",
students: [
"Toya Whitebeard",
"Snooty Helge",