This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-image: url("https://i.ibb.co/YTN069M/tetris.jpg"); | |
padding-top: 1em; | |
text-align: center; | |
background-size: cover; | |
} | |
h2, | |
h3, | |
h4 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Tetris Challenge</title> | |
<!--Import font --> | |
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
Write a function oddOnesOut(array) that takes in an array of strings and | |
returns a new array array containing only elements that appeared an even | |
number of times in the input array. | |
Examples: | |
const arr1 = ['a', 'b', 'b', 'c', 'd', 'c', 'c', 'd'] | |
const arr2 = ['fish', 'fish', 'dog', 'cat', 'dog', 'dog'] | |
oddOnesOut(arr2); // => [ 'fish' ] | |
***********************************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
Write a function greatestCommonFactor(num1, num2) that returns the | |
greatest common factor between num1 and num2. This means that the | |
function should return the largest number that divides both num1 and | |
num2. | |
Examples: | |
greatestCommonFactor(6, 10); // => 2 | |
greatestCommonFactor(10, 15); // => 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
Write a function nickname(name) that takes in a name string and returns | |
a string representing their nickname. A nickname is the name up to the | |
second vowel repeated twice. See the examples. | |
Examples: | |
nickname('pikachu'); // => 'PIKA-PIKA' | |
nickname('engineer'); // => 'ENGI-ENGI' | |
nickname('bob'); // => 'BOB-BOB' | |
***********************************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const qrcode = require('qrcode'); | |
/** | |
* Creates a QR Code for websites | |
* @param {string} url The URL for the website | |
* @returns {object.http} The QR Code image | |
*/ | |
module.exports = async (url = 'url') => { | |
let result = await new Promise((resolve, reject) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lib = require('lib')({ | |
token: process.env.STDLIB_SECRET_TOKEN | |
}); | |
/** | |
* An HTTP endpoint that acts as a webhook for Slack command event | |
* @param {object} event | |
* @returns {object} result Your return value | |
*/ | |
module.exports = async (event) => { | |
// Store API Responses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lib = require('lib')({ | |
token: process.env.STDLIB_SECRET_TOKEN | |
}); | |
/** | |
* An HTTP endpoint that acts as a webhook for Scheduler daily event | |
* @returns {object} result Your return value | |
*/ | |
module.exports = async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lib = require('lib')({ | |
token: process.env.STDLIB_SECRET_TOKEN | |
}); | |
/** | |
* An HTTP endpoint that acts as a webhook for Slack command event | |
* @param {object} event | |
* @returns {object} result Your return value | |
*/ | |
module.exports = async (event) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN}); | |
/** | |
* An HTTP endpoint that acts as a webhook for Slack command event | |
* @param {object} event | |
* @returns {object} result Your return value | |
*/ | |
module.exports = async (event) => { | |
// Store API Responses | |
const result = {slack: {}, crawler: {}}; | |