You are given a data structure that represents Pokemon evolutions
The data structure looks like this:
{
name: "A", // can evolve to B and E
evolutions: [{
[ | |
"Fetching data...", | |
"I'm thinking...", | |
"Still thinking...", | |
"Analyzing data...", | |
"Getting snacks...", | |
"Reticulating splines...", | |
"Generating witty dialog...", | |
"Swapping time and space...", | |
"Spinning violently around the y-axis...", |
const version = process.argv[3]; | |
const edition = process.argv[4] === 'oss' ? 'oss' : 'ee'; | |
const [major, minor] = version.split('.'); | |
const jarName = `metabase-${edition}-${version}.jar`; | |
const fileExists = fs.existsSync(jarName); | |
if (!fileExists) { |
CREATE TABLE type_modifiers ( | |
attacking_type VARCHAR(32), | |
defending_type VARCHAR(32), | |
modifier FLOAT | |
); | |
INSERT INTO | |
type_modifiers (attacking_type, defending_type, modifier) | |
VALUES | |
('Bug', 'Bug', 1), |
Rock on! | |
Rock and Stone... Yeeaaahhh! | |
Rock and Stone forever! | |
ROCK... AND... STONE! | |
Rock and Stone! | |
For Rock and Stone! | |
We are unbreakable! | |
Rock and roll! | |
Rock and roll and stone! | |
That's it lads! Rock and Stone! |
{ | |
"1001": { | |
"morning": [ | |
"1 Kings 15", | |
"James 5", | |
"Psalm 78:41-73" | |
], | |
"evening": [ | |
"Zechariah 11", | |
"Matthew 22:1-33", |
import fetch from 'node-fetch'; | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
export type ObjectWithStringKeys = { [key: string]: any }; | |
export function fetchWithTimeout(url: string, options: ObjectWithStringKeys = {}) { | |
const controller = new AbortController(); | |
const timeout = setTimeout(() => { | |
controller.abort(); | |
}, options?.timeout || 7000); |
// generic API fetching | |
const BASE_URL = '/api/'; | |
const handleResponse = async (r: Response) => { | |
try { | |
if (r.ok) { | |
return r.json(); | |
} | |
return Promise.reject(await r.json()); | |
} catch (e) { |
xcode-select --install | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install git | |
brew install bash | |
brew install [email protected] | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
nvm install 13 | |
nvm install 12 |