Skip to content

Instantly share code, notes, and snippets.

View pixelsum's full-sized avatar

Pixelsum pixelsum

View GitHub Profile
@NickChristensen
NickChristensen / predictit-2020-scriptable.js
Last active September 3, 2020 13:49
Smashed this together from Scriptable’s example plus my bitbar version
let getCandidateByShortname = (candidates, shortName) =>
candidates.find((candidate) => candidate.shortName === shortName);
let floatsToInts = (candidate) => ({
...candidate,
lastTradePrice: round(candidate.lastTradePrice),
lastClosePrice: round(candidate.lastClosePrice),
});
let round = (float) => Math.round(float * 100);
@simonbs
simonbs / Create Gist.js
Last active May 6, 2024 23:07
Scriptable script for creating a gist.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: brown; icon-glyph: file-code;
// To use this script, you need to configure an OAuth App on GitHub.
// Follow the instructions on the link below to create your OAuth App.
//
// When you are asked to put in a redirect URL, you should put the URL for running this script in Scriptable. Assuming the name of this script is "Create Gist", the URL is scriptable:///run?scriptName=Create%20Gist
//
// https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/
//
@ttscoff
ttscoff / searchlink.rb
Last active February 26, 2024 07:05
SearchLink creates Markdown links from automatic searches based on special syntax.