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 fetch from "node-fetch"; | |
| import cheerio from "cheerio"; | |
| const TRACKING_NUMBER = ""; | |
| (async () => { | |
| const content = await getTrackingResponse(); | |
| const $ = cheerio.load(content, { | |
| normalizeWhitespace: true, | |
| decodeEntities: false |
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>Document</title> | |
| <link | |
| rel="stylesheet" | |
| href="https://unpkg.com/fullcalendar@alpha/dist/fullcalendar.min.css" |
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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "syscall" |
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 SERVER_URL = "https://donamaid.herokuapp.com"; | |
| class API { | |
| constructor() { | |
| this.token = null; | |
| this.currentUser = null; | |
| this.defaultParams = this.defaultParams.bind(this); | |
| this.fetchJSON = this.fetchJSON.bind(this); | |
| this.authenticate = this.authenticate.bind(this); |
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 SERVER_URL = "https://donamaid.herokuapp.com"; | |
| const fetchServer = async (path, opts = {}) => | |
| (await fetch(`${SERVER_URL}/${path}`, opts)).json(); | |
| const createServerAPI = token => ({ | |
| get: (path, opts = {}) => { | |
| return fetchServer(path, { | |
| method: "GET", | |
| headers: { |
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
| bigdecimal (1.2.8) | |
| CFPropertyList (2.2.8) | |
| did_you_mean (1.0.0) | |
| io-console (0.4.5) | |
| json (1.8.3.1) | |
| libxml-ruby (2.9.0) | |
| minitest (5.8.5) | |
| net-telnet (0.1.1) | |
| nokogiri (1.5.6) | |
| power_assert (0.2.6) |
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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "log" | |
| "os" | |
| ) |
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>Document</title> | |
| </head> |
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 fib = | |
| n => | |
| n < 2 | |
| ? 1 | |
| : fib(n - 1) + fib(n - 2) | |
| const range = | |
| (min, max) => | |
| Array(max - min + 1).fill().map((_, i) => i + min) |
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
| -- Drop while matches Char | |
| dropInitialMatches :: Char -> String -> String | |
| dropInitialMatches c xs = dropWhile (==c) xs | |
| -- Drop preceding spaces | |
| dropInitialSpaces :: String -> String | |
| dropInitialSpaces xs = dropInitialMatches ' ' xs | |
| -- Drop preceding linefeeds | |
| dropInitialNewLines :: String -> String |