Skip to content

Instantly share code, notes, and snippets.

View Auwalms's full-sized avatar

Auwal MS Auwalms

View GitHub Profile
@Auwalms
Auwalms / matches.js
Last active July 14, 2023 10:43
Take Home Assignment
// Design a webpage based on the spec below using React + Tailwind.css to display the data below.
// Design Spec: https://www.figma.com/file/7gL0IbxB9dqhBSZAH4am4v/InternshipTakeHomeDesign?type=design&node-id=0%3A1&mode=design&t=ma7uNppJpMIc0TIP-1
// Optional: Display the score of each player as shown in the SetA, Set B, Set C and Set D nodes of the match object.
[
{
"_id": "64aee214dc9aa671f6403028",
"_club": "6484be0d6d1434cb280502fb",
"_tournament": "64aee078dc9aa671f6402e6f",
"challenger": {
@Auwalms
Auwalms / tournament.js
Last active July 10, 2023 10:54
Tournament BYE Concept
function isPowerOf2(number) {
// If the number is 0, it is not a power of 2
if (number === 0) {
return false;
}
// Check if the number is divisible by 2 without a remainder
while (number % 2 === 0) {
number = number >> 1;
}
@Auwalms
Auwalms / AutoDeploy.yml
Created July 4, 2023 07:53
This action builds, authenticate and deploy an app to two seperate instances depending on the branch a push is made to.
name: api-deployment
on:
push:
branches:
- master
- stagging
jobs:
build-staging:
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [{
"source": "**",
let Cache_Name = `Auwsum-Kitchen-1`;
let filesToCache = [
'/',
'/index.html',
'/styles/bootstrap.min.css',
'/styles/app.css',
'/scripts/jquery-3.3.1.slim.min.js',
'/scripts/bootstrap.min.js',
'/scripts/services.js',
@Auwalms
Auwalms / index.html
Last active May 25, 2019 12:03
Index.html containing firebase and firestore library
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>AuwSum Kitchen</title>
<meta
name="description"
content="This app gives users the ability to check and order food items and get it delivered to their door"
/>
"use strict";
const categoriesContainer = document.getElementById("categories-container");
window.addEventListener("DOMContentLoaded", () => {
getCategories();
});
const createCategoryHTML = category => {
const categoryPath = document.createElement("a");
"use strict";
/**
* the config object contains secrets needed for identification and interaction
* with firebase/firestore.
* ALWAYS STORE THIS SECRETS IN A PROTECTED FILE AND DON'T SEND IT TO YOUR REPOSITORY.
* THIS METHOD IS ONLY USED IN THE CASE OF AN OPTION PROJECT LIKE THIS
*/
const config = {
apiKey: "AIzaSyBcd5WmLL4Bwyh1cj0zkbHcBp8LZLg_rMY",
databaseURL: "https://auwsum-kitchen.firebaseio.com",
@Auwalms
Auwalms / Form-snippet.vue
Last active December 26, 2017 12:01
Signup screen
<template>
<div>
<div is="sui-container">
<sui-grid>
<sui-grid-row>
<sui-grid-column :width="7" class="centered" >
<sui-segment centered class="signup-div">
<sui-image :src="require('./../../assets/dummy-img.png')" size="tiny" shape="circular" class="centered" />
<form is="sui-form" @submit="signupUser">
<div is="sui-form-field">
//add to src/sw.js
importScripts('workbox-sw.dev.v2.0.0.js');
const workboxSW = new self.WorkboxSW();
workboxSW.precache([]);
//create a folder in the project folder and name it 'workbox-cli-config.js'
// then add the below snippet
module.exports = {