Skip to content

Instantly share code, notes, and snippets.

Avatar

Miklós kmikiy

View GitHub Profile
View machine.js
const addLockedOpening = assign({
openings: (ctx) => [...ctx.openings, {locked: true}]
})
const addUnlockedOpening = assign({
openings: (ctx) => [...ctx.openings, {locked: false}]
})
const removeOpening = assign({
@kmikiy
kmikiy / crypto.gs
Last active May 23, 2021
Google Sheets Apps Script for fetching latest crypto price from Binance
View crypto.gs
function BINANCE_PRICE(coinsymbol, pair) {
var url = "https://api.binance.com/api/v3/ticker/price?symbol="+coinsymbol.toUpperCase()+pair.toUpperCase()
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true});
var json = response.getContentText();
var data = JSON.parse(json);
return data.price
}
/*