Skip to content

Instantly share code, notes, and snippets.

@tcK1
tcK1 / geitemprice.js
Created September 16, 2016 15:05
GE Item Price - Runescape
function valorge(itemId){
var url = "http://services.runescape.com/m=itemdb_rs/api/catalogue/detail.json?item="+itemId;
var jsondata = UrlFetchApp.fetch(url);
var object = JSON.parse(jsondata.getContentText());
return object.item.current.price;
}
@tcK1
tcK1 / edges.ts
Created September 20, 2024 13:51
type Positions = 'top' | 'left' | 'right' | 'bottom';
type CombinationTwoElements<T extends Positions = Positions> = T extends infer U
? [U, Exclude<Positions, U>]
: never;
type CombinationThreeElements<T extends Positions = Positions> =
T extends infer First
? [
First,