Skip to content

Instantly share code, notes, and snippets.

View etnichols's full-sized avatar
🎯
Focusing

Evan Nichols etnichols

🎯
Focusing
View GitHub Profile
@etnichols
etnichols / gist:8b6f4e00eea498953787fcae031993b5
Last active February 23, 2024 18:51
Example AI Quiz Request JSON with user-submitted questions
{
"_id": {
"$oid": "65d8e86443f1bf645d32acd8"
},
"appSettingId": {
"$oid": "65d8e5dc3c37b231fd032f22"
},
"formData": {
"ai_prompts": {
"quiz_familiarity": "advanced",
@etnichols
etnichols / coinbase-prices.js
Created February 9, 2024 19:37
Google Apps Script - Coinbase Public API data fetching
/**
* Get the coinbase price.
*
* @param {string} currency_pair The currency pair (BTC-EUR, ETH-EUR or LTC-EUR)
* @param {string} price_type The price type (buy, sell or spot
* @return The current price on coinbase
* @customfunction
*/
function getPrice(currency_pair = 'BTC-USD', price_type = 'sell') {
const valid_price_types = [ "buy", "sell", "spot" ]
// Colors
$DARK_BLUE: hsla(207, 87%, 31%, 0.9);
$DARK_BLUE_100: hsla(207, 87%, 31%, 100);
$BRIGHT_BLUE: #00a3e0;
$SOFT_BRIGHT_BLUE: rgba(0, 163, 224, 0.9);
$ORANGE: #ff7327;
$PURPLE: #4a245e;
$BLACK: hsla(291, 0%, 18%, 1);
$GRAY: hsla(291, 0%, 18%, 0.7);
$TEXT: hsla(291, 0%, 18%, 0.95);