Skip to content

Instantly share code, notes, and snippets.

@iethree
iethree / loading.json
Created November 8, 2023 17:11
loading messages
[
"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...",
@iethree
iethree / mb-jars.mjs
Created October 5, 2023 15:44
Metabase jar helper
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) {
@iethree
iethree / pokemon-type-matchups.sql
Last active June 6, 2023 18:22
Pokemon Type Modifiers
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),
@iethree
iethree / shouts.txt
Created May 22, 2023 15:29
DRG dwarf lines
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!
@iethree
iethree / dailyOfficeLectionary.json
Created April 10, 2022 03:16
BCP 2019 Daily Office Lectionary JSON
{
"1001": {
"morning": [
"1 Kings 15",
"James 5",
"Psalm 78:41-73"
],
"evening": [
"Zechariah 11",
"Matthew 22:1-33",
@iethree
iethree / fetchWithTimeout.ts
Last active August 4, 2022 14:03
fetchWithTimeout
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);
@iethree
iethree / api.ts
Created February 25, 2022 17:59
Generic API fetching
// 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) {
@iethree
iethree / install.sh
Last active August 21, 2023 14:14
new computer install
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 php@7.4
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