Skip to content

Instantly share code, notes, and snippets.

View joshtwist's full-sized avatar

Josh Twist joshtwist

View GitHub Profile
{
"openapi": "3.1.0",
"info": {
"version": "1.0.0",
"title": "My Zuplo API"
},
"paths": {
"/todos": {
"get": {
"summary": "Get all todos",
{
"openapi": "3.1.0",
"info": {
"version": "1.0.0",
"title": "SupaWeather API",
"description": "The SupaWeather API provides comprehensive weather data and forecasts for locations worldwide. Get real-time weather conditions, extended forecasts, and geocoding services.",
"contact": {
"name": "SupaWeather API Support",
"email": "[email protected]"
}
@joshtwist
joshtwist / toilet-seat.js
Last active June 20, 2025 14:21
puckJS toilet seat code
let monitoring = false;
let seatDownAccel = null;
let checkInterval = null;
let flashInterval = null;
let movedSince = null;
let flashTimerInterval = null;
// === Configuration Constants ===
const ANGLE_THRESHOLD = 25; // degrees
const SEAT_UP_WARNING_DELAY_MS = 15000; // delay before red LED starts flashing
{
"ips": ["46.208.237.23", "foo"],
"consumers": [],
"subs": []
}
class ZuploBanner extends HTMLElement {
constructor() {
super();
// Attach a shadow root
const shadow = this.attachShadow({ mode: 'open' });
// JSON data for the tools
const toolsData = {
zudoku: {
openapi: 3.0.1
info:
title: Daily Forecasts API
description: Daily Forecasts API description.
termsOfService: https://developer.accuweather.com/legal
contact:
name: AccuWeather Sales
url: https://developer.accuweather.com/
email: [email protected]
license:
{
"zudoku": {
"url": "https://zudoku.dev"
},
"rate-my-openAPI" : {
"url" : "https://ratemyopenapi.com"
},
"mockbin" : {
"url" : "https://mockbin.io"
},
{
"openapi": "3.0.0",
"info": {
"title": "Pizza Ordering API",
"description": "An API to order pizzas, check order status, and view menu options",
"version": "1.0.0"
},
"paths": {
"/pizza/order": {
"post": {
{
"openapi": "3.0.0",
"info": {
"title": "Pizza Ordering API",
"description": "An API to order pizzas, check order status, and view menu options",
"version": "1.0.0"
},
"paths": {
"/pizza/order": {
"post": {
{
"openapi": "3.1.0",
"info": {
"title": "Train Travel API",
"description": "API for finding and booking train trips across Europe.\n\n## Run in Postman\n\nExperiment with this API in Postman, using our Postman Collection.\n\n[<img src=\"https://run.pstmn.io/button.svg\" alt=\"Run In Postman\" style=\"width: 128px; height: 32px;\">](https://app.getpostman.com/run-collection/9265903-7a75a0d0-b108-4436-ba54-c6139698dc08?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D9265903-7a75a0d0-b108-4436-ba54-c6139698dc08%26entityType%3Dcollection%26workspaceId%3Df507f69d-9564-419c-89a2-cb8e4c8c7b8f)\n",
"version": "1.0.0",
"contact": {
"name": "Train Support",
"url": "https://example.com/support",
"email": "[email protected]"