.
├── bass
│ ├── crystal_mine__bassDry.wav
│ ├── crystal_mine__bassSyncDelay.wav [🤩floaty fun]
│ └── crystal_mine__bassVerb_middle.wav
├── crystal_mine_preMaster__20260423b.wav [the mix I sent to stereo mastering engineer]
| Query | Use when | Returns | Throws if not found? | Async? |
|---|---|---|---|---|
getBy |
Element is in the DOM right now | Element | Yes | No |
queryBy |
Asserting something is NOT there | Element or null |
No | No |
findBy |
Element appears after async work | Promise<Element> — must await |
Yes (timeout) | Yes |
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 json | |
| import base64 | |
| import os | |
| # make sure the output directory exists before running! | |
| folder = os.path.join(os.getcwd(), "imgs") | |
| with open("src.har", "r") as f: | |
| har = json.loads(f.read()) |
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 axios = require('axios') | |
| async function getCountries(s, p) { | |
| const baseUrl = `https://jsonmock.hackerrank.com/api/countries/search?name=${s}` | |
| const numCountries = await getData(baseUrl, p) | |
| async function getData(url, pop) { | |
| let hasNextPage = true | |
| let hasErrors = 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
| { | |
| "lat": 33.44, | |
| "lon": -94.04, | |
| "timezone": "America/Chicago", | |
| "timezone_offset": -21600, | |
| "current": { | |
| "dt": 1595243443, | |
| "sunrise": 1608124431, | |
| "sunset": 1608160224, | |
| "temp": 274.75, |
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 today = new Date() | |
| const dayMap = { | |
| 0: "Sunday", | |
| 1: "Monday", | |
| 2: "Tuesday", | |
| 3: "Wednesday", | |
| 4: "Thursday", | |
| 5: "Friday", | |
| 6: "Saturday" |
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 fs = require('fs') | |
| const path = require('path') | |
| const persistTweetIds = tweets => { | |
| const ids = tweets.map(tweet => tweet.id) | |
| ids.forEach(num => { | |
| fs.appendFileSync(`${path.join(__dirname, '..')}/db/ids.txt`, num + ",", (err) => { | |
| if (err) throw err; | |
| console.log(`"${num}" was appended to file!`); | |
| }); |
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 dotenv = require('dotenv') | |
| dotenv.config({ path: __dirname + '/../.env' }) | |
| // @PhilaStreets User ID | |
| const userId = 117424097; | |
| // User Tweet Timeline Endpoint | |
| const url = `https://api.twitter.com/2/users/${userId}/tweets`; | |
| // Auth Token Pulled from .env file located in project root folder |
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 fs = require('fs') | |
| const persistTweetIds = tweets => { | |
| const ids = tweets.map(tweet => tweet.id) | |
| ids.forEach(num => { | |
| fs.appendFileSync(`${process.cwd()}/db/ids.txt`, num + ",", (err) => { | |
| // err be like: "idk what file or directory you're talking about!" | |
| if (err) throw err; | |
| console.log(`"${num}" was appended to file!`); | |
| }); |
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 dotenv = require('dotenv') | |
| dotenv.config() | |
| // @PhilaStreets User ID | |
| const userId = 117424097; | |
| // User Tweet Timeline Endpoint | |
| const url = `https://api.twitter.com/2/users/${userId}/tweets`; | |
| // Auth Token Pulled from .env file located in project root folder |
NewerOlder