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
| <div | |
| style="background-image: url('/some/man-with-a-dog.jpg'); | |
| background-size: cover;" | |
| ></div> | |
| <!-- The old way --> |
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
| $ node index.js |
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
| FROM node:10-slim | |
| RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
| && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | |
| && apt-get update \ | |
| && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ | |
| --no-install-recommends \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN apt-get -y update |
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
| // index.js | |
| const puppeteer = require('puppeteer') | |
| const nodemailer = require('nodemailer') | |
| require('dotenv').config() | |
| const CURRENT_MOVIES_URL = | |
| 'https://search.naver.com/search.naver?where=nexearch&sm=tab_etc&query=%ED%98%84%EC%9E%AC%EC%83%81%EC%98%81%EC%98%81%ED%99%94&mra=bkEw' | |
| const FUTURE_MOVIES_URL = | |
| 'https://search.naver.com/search.naver?where=nexearch&sm=tab_etc&query=%EA%B0%9C%EB%B4%89%EC%98%88%EC%A0%95%EC%98%81%ED%99%94&mra=bkEw' | |
| const now = Date.now() |
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
| workflow "Run every 8 AM" { | |
| on = "schedule(0 23 * * *)" | |
| resolves = [ | |
| "Take screenshots & Send Email", | |
| ] | |
| } | |
| action "Take screenshots & Send Email" { | |
| uses = "./" | |
| env = { |
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
| // ๊ด์ฐฎ์ต๋๋ค | |
| let foo = 'foo' | |
| foo = 'bar' | |
| // ์์ธ๊ฐ ๋ฐ์ํฉ๋๋ค | |
| const baz = 'baz' | |
| baz = 'qux' |
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 person = { name: 'Tyler', age: 28 }; | |
| console.log(`Hi, my name is ${person.name} and I am ${person.age} years old!`); | |
| // 'Hi, my name is Tyler and I am 28 years old!' |
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 person = { name: 'Tyler', age: 28 }; | |
| document.body.innerHTML = ` | |
| <div> | |
| <p>Name: ${person.name}</p> | |
| <p>Name: ${person.age}</p> | |
| </div> | |
| ` |
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 Person = function(firstName) { | |
| this.firstName = firstName; | |
| this.sayName1 = function() { console.log(this.firstName); }; | |
| this.sayName2 = () => { console.log(this.firstName); }; | |
| }; | |
| const john = new Person('John'); | |
| const dave = new Person('Dave'); | |
| john.sayName1(); // John |
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 transformNamesToUppercase = function(names) { | |
| return names.map(name => name.toUpperCase()); | |
| }; | |
| transformNamesToUppercase(names); // ['IRISH', 'DAISY', 'ANNA'] |