This file contains 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
console.log('Loading event'); | |
// Twilio Credentials | |
var accountSid = ''; | |
var authToken = ''; | |
var fromNumber = ''; | |
var https = require('https'); | |
var queryString = require('querystring'); |
This file contains 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
import app from "firebase/app"; | |
import "firebase/firestore"; | |
import "firebase/auth"; | |
const config = { | |
apiKey: "some_api_key", | |
authDomain: "example_not_actual_project.firebaseapp.com", | |
databaseURL: "https://testing_purposes.firebaseio.com", | |
projectId: "some_project_id", | |
storageBucket: "", |
This file contains 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
error: errorMsg => { | |
$("#results").append(`<li class="list-group-item list-group-item-danger">Oh no something went wrong...This is a ${errorMsg.status} error, but we'll fix it</li>`); | |
} |
This file contains 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
if (data.query === undefined) { | |
$("#results").append( | |
`<div class="list-group"> | |
<div class="list-group-item list-group-item-action flex-column align-items-start"> | |
<div class="d-flex w-100 justify-content-between"> | |
<h5 class="mb-1">Suggestions:</h5> | |
</div> | |
<li class="mb-1">Make sure all words are spelled correctly.</li> | |
<li class="mb-1">Try different keywords.</li> | |
<li class="mb-1">Try more general keywords.</li> |
This file contains 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
$(document).ready(() => { | |
$("#random").click(() => { | |
return window.open("https://en.wikipedia.org/wiki/Special:Random"); | |
}); | |
let endpoint = | |
"https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch="; | |
function thisWholeThing() { |
This file contains 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
$(document).ready(() => { | |
$("#random").click(() => { | |
return window.open("https://en.wikipedia.org/wiki/Special:Random"); | |
}); | |
}); |
This file contains 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> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" |
This file contains 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> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" | |
crossorigin="anonymous"> |
This file contains 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
$(document).ready(()=> { | |
console.log("ready"); | |
let quotesArray = ["quote1", "quote2", "quote3", "quote4", "quote5", "quote6", "quote7", "quote8", "quote9", "quote10"]; | |
function randomQuote() { | |
let randQuote = Math.floor(Math.random() * quotesArray.length); | |
return $("p#quote").text(quotesArray[randQuote]); | |
}; | |