Skip to content

Instantly share code, notes, and snippets.

View TravisL12's full-sized avatar
🪲
Smokes if you got'em.

Travis Lawrence TravisL12

🪲
Smokes if you got'em.
View GitHub Profile
@TravisL12
TravisL12 / smb4_rosters.md
Last active May 30, 2023 18:28
Super Mega Baseball 4 Teams
Team League First Last
Boomers Legends Hank Aaron
Boomers Legends Dick Allen
Boomers Legends Vida Blue
Boomers Legends Cecil Cooper
Boomers Legends Tom Herr
Boomers Legends Tommy John
Boomers Legends Carney Lansford
Boomers Legends Frank Linzy
@TravisL12
TravisL12 / scrapeZoomTranscript.js
Last active August 29, 2024 17:04
Various chrome snippets
// when viewing a zoom recording on the web you can use this to export the transcripts
function scrape(htmlContent) {
const transcriptItems = htmlContent.querySelectorAll('.transcript-list-item');
const chatArray = Array.from(transcriptItems).reduce((acc,item)=>{
const user = item.querySelector('.user-profile-info')?.textContent.trim();
const timestamp = item.querySelector('.time')?.textContent.trim();
const chat = item.querySelector('.text')?.textContent.trim();
@TravisL12
TravisL12 / app.js
Created September 13, 2024 21:43
Tic Tac Toe React
const PLAYER_MARKS = ["X", "O"];
const EMPTY = "";
const checkWinner = (moves, player) =>
moves.every((c) => c === PLAYER_MARKS[player]);
const Board = ({ size }) => {
const [tiles, setTiles] = React.useState(new Array(size ** 2).fill(EMPTY));
const [playerIdx, setPlayerIdx] = React.useState(1);
const [isWinner, setIsWinner] = React.useState(false);