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
| import puppeteer from "puppeteer"; // import the npm package that we installed | |
| (async () => { | |
| // the rest of the code must be enclosed in an `async` function to be able to `await` for results | |
| const browser = await puppeteer.launch(); // launches an "invisible" chromium browser | |
| const page = await browser.newPage(); // takes the browser to a new tab (page) | |
| await page.goto("https://example.com"); // takes the page to a specific url | |
| // Get the "viewport" of the page, | |
| // as reported by the page. |
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
| console.log("Twitter, here we come"); |
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
| /* PrismJS 1.17.1 | |
| https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+c+bash+cpp+ruby+dart+markup-templating+docker+go+haskell+java+scala+php+markdown+json+jsonp+json5+latex+lisp+js-templates+typescript+scss+python+rust+sass+swift+yaml&plugins=line-numbers+normalize-whitespace */ | |
| /** | |
| * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML | |
| * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics); | |
| * @author Tim Shedor | |
| */ | |
| code[class*="language-"], | |
| pre[class*="language-"] { |
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
| /* PrismJS 1.17.1 | |
| https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+c+bash+cpp+ruby+dart+markup-templating+docker+go+haskell+java+scala+php+markdown+json+jsonp+json5+latex+lisp+js-templates+typescript+scss+python+rust+sass+swift+yaml&plugins=line-numbers+normalize-whitespace */ | |
| var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function n(e,t){var r,a,i=C.util.type(e);switch(t=t|| |
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
| app.get("/:user", (req, res) => { | |
| console.log(`[GET REQUEST TO /${user}] Sending back information about the user ${user}`); | |
| } |
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
| // init project | |
| const express = require('express'); // the library we will use to handle requests. import it here | |
| const app = express(); // instantiate express | |
| app.use(require("cors")()) // allow Cross-domain requests | |
| app.use(require('body-parser').json()) // When someone sends something to the server, we can recieve it in JSON format | |
| // base route. Responds to GET requests to the root route ('/') | |
| app.get("/", (req, res) => { | |
| res.send("Home sweet home 🏚") // always responds with the string "TODO" | |
| }); |
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
| var COUNTER = 0; | |
| // first test case | |
| // should return 3 | |
| var nums = | |
| `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| ~~~********~~~~~~~********~~~~ | |
| ~~~~****~~~~~~~~~~**~~*~**~~~~ | |
| ~~~~*~~~*~~~~~~~~~**~~~~**~~~~ | |
| ~~~~*~~~*~~~~~~~~~********~~~~ |
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
| import java.util.Scanner; | |
| /** | |
| * This class will contain an array of integer values and methods to update, search, sort and print the data. | |
| */ | |
| public class ArraySearchAndSort { | |
| /** | |
| * This array keeps track of all of the scores and can hold UP TO 100 elements | |
| */ | |
| static int[] scores = new int[100]; |
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
| <!--<section data-background-transition='zoom' data-transition='concave' data-state='blackout'>--> | |
| <section data-background-transition='zoom' data-state='blackout'> | |
| <h2>My Gist! Cool. Daniel Denenberg</h2> | |
| <h1>Made usingReveal.js</h1> | |
| <h2>Slideshow Presentations</h2> | |
| <br/> | |
| <h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1> | |
| </section> | |
| <section data-background-transition='zoom' data-transition='linear' id='try-it'> | |
| <h2>Try it out!</h2> |
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
| ## NOTE: When sending from gmail. The first time, it will tell you that there is suspicious acitivity going on. Just | |
| # click on 'review activity' and say that it was you and then it will work. | |
| # Python code to illustrate Sending mail from | |
| # your Gmail account | |
| import smtplib | |
| def send_email(sender_email, sender_pass, recipient_email, subject, mes): | |
| # creates SMTP session |