Skip to content

Instantly share code, notes, and snippets.

View waldothedeveloper's full-sized avatar
🎖️
Never give up!

Waldo Lavaut waldothedeveloper

🎖️
Never give up!
View GitHub Profile
@waldothedeveloper
waldothedeveloper / AWSLambdaSimpleSMS.js
Created February 21, 2020 21:03 — forked from stevebowman/AWSLambdaSimpleSMS.js
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');
@waldothedeveloper
waldothedeveloper / I dont like line 28
Created February 25, 2019 22:17
Why I am not conviced of this...
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: "",
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>`);
}
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>
@waldothedeveloper
waldothedeveloper / wiki.js
Created June 5, 2018 15:14
The JS file for my Shortcutpedia Freecodecamp challenge of the Wikipedia API
$(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() {
@waldothedeveloper
waldothedeveloper / wiki.js
Last active June 5, 2018 15:05
Binding a click event to our random button on the wikipedia search API challenge from FreeCodeCamp
$(document).ready(() => {
$("#random").click(() => {
return window.open("https://en.wikipedia.org/wiki/Special:Random");
});
});
@waldothedeveloper
waldothedeveloper / index.html
Created June 5, 2018 13:00
This is the HTML file for my Wikipedia Viewer from FreeCodeCamp
<!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"
@waldothedeveloper
waldothedeveloper / index.html
Created May 18, 2018 12:12
The HTML for the workaround of the FreeCodeCamp random quotes app
<!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">
@waldothedeveloper
waldothedeveloper / app.js
Created May 18, 2018 12:10
Another workaround for the random quotes assuming you save a bunch of quotes in an array
$(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]);
};