Skip to content

Instantly share code, notes, and snippets.

View blairdow's full-sized avatar

Blair Dowis blairdow

View GitHub Profile
@blairdow
blairdow / Button.vue
Last active February 22, 2025 19:11
Vue 3 File Upload Input Component (with Button and ProgressBar child components)
<template>
<button
:disabled="disabled"
:type="type"
class="btn btn-form-base"
:class="{
'btn-outline': outline,
'btn-small': small,
submit: type == 'submit',
'btn-transparent': transparent,
@blairdow
blairdow / app.js
Created November 28, 2016 20:39
Jeopardy friends sockets... to be moved server side
//below code to check answers and generate questions should probably be moved to the socket server side, instead of client side
//check answer
function checkAnswer(){
var msgCheck = newMsg.value.trim()
var answerCheck = answer
if (msgCheck.toLowerCase() == answerCheck.toLowerCase()) {
console.log(userEmail + ' is the dawg now')
@blairdow
blairdow / blair-snake.js
Created October 14, 2016 16:08
A gist of my most challenging code from BlairSnake
//runs when snake hits food to add length
function eatFood() {
//if food coordinates equal snake head coordinates, eat food and add length
if(foodX === snakeHeadX && foodY === snakeHeadY) {
score++
foodSound()
//increases speed every 5 points
speedIncrease()
var length = snake.length