Skip to content

Instantly share code, notes, and snippets.

class PathMe {
moves: string[] = [];
constructor() {
this.moves = [];
return this;
}
moveTo(x: number, y: number) {
@coughski
coughski / subway_widget.js
Created April 8, 2022 19:50
A NYC subway departure timeline widget with status alerts
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: subway;
let GtfsRealtimeBindings = importModule("gtfs-realtime.js") // add this file to Scriptable from https://github.com/MobilityData/gtfs-realtime-bindings/blob/master/nodejs/gtfs-realtime.js
// also add https://github.com/protobufjs/protobuf.js/blob/master/dist/protobuf.min.js to Scriptable
const API_KEY = "paste_your_api_key_here" // get a free MTA API key at https://api.mta.info/#/landing
const ROOT = "entity"
const ALERT = "alert"
@spencerwooo
spencerwooo / termiWidget.js
Last active April 21, 2024 01:04
🍋 TermiWidget - Terminal-like Widget for iOS 14, made with Scriptable.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: quote-right;
// Change these to your usernames!
const user = "spencer"
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E"
const telegram = "realSpencerWoo"
const github = "spencerwooo"
@DefiantBidet
DefiantBidet / index.html
Created May 15, 2013 21:01
A CodePen by James Dean. Sample D3 Stacked Area Chart - attempting to refactor live example using csvParse
<div id="chart"></div>
@chluehr
chluehr / date_loop.sh
Created April 26, 2012 20:28
Bash: Loop over dates
#!/bin/bash
now=`date +"%Y-%m-%d" -d "05/06/2012"`
end=`date +"%Y-%m-%d" -d "05/23/2012"`
while [ "$now" != "$end" ] ;
do
now=`date +"%Y-%m-%d" -d "$now + 1 day"`;
echo $now
done