Skip to content

Instantly share code, notes, and snippets.

View sandalsoft's full-sized avatar
🏖️
Working from the beach

Eric Nelson sandalsoft

🏖️
Working from the beach
View GitHub Profile
#!/bin/bash
# Reads a JWT on stdin and outputs the number of seconds until it expires
# If a JWT has expired, the output will be the seconds since expiration as a negative number
#
# Examples:
#
# # Token expired 5 minutes ago
# echo "eyJhbGc..." | ./jwt_expires.sh
# -300
# Check required environment variables
if [ -z "$PROMPTQL_ACCESS_TOKEN" ]; then
echo "Error: PROMPTQL_ACCESS_TOKEN environment variable is not set or empty. Use a project service account token or Personal Access Token (PAT)" >&2
exit 1
fi
if [ -z "$PROMPTQL_PROJECT_ID" ]; then
echo "Error: PROMPTQL_PROJECT_ID environment variable is not set or empty" >&2
exit 1
fi
// Check required environment variables
const PROMPTQL_ACCESS_TOKEN = process.env.PROMPTQL_ACCESS_TOKEN;
if (!PROMPTQL_ACCESS_TOKEN) {
console.error("Error: PROMPTQL_ACCESS_TOKEN environment variable is not set or empty. Use a project service account token or Personal Access Token (PAT)");
process.exit(1);
}
const PROMPTQL_PROJECT_ID = process.env.PROMPTQL_PROJECT_ID;
if (!PROMPTQL_PROJECT_ID) {
import os
import sys
import requests
# Check required environment variables
access_token = os.getenv('PROMPTQL_ACCESS_TOKEN')
if not access_token:
print("Error: PROMPTQL_ACCESS_TOKEN environment variable is not set or empty. Use a project service account token or Personal Access Token (PAT)", file=sys.stderr)
sys.exit(1)
@sandalsoft
sandalsoft / api-football.llms.txt
Created July 11, 2025 01:01
API Football docs llms.txt
# https://www.api-football.com/documentation-v3 llms-full.txt
## API-Football Documentation
We use cookies
We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.
OKChange my preferences
[![api-football logo](https://www.api-football.com/public/img/home1/hero-banner.png)](https://www.api-football.com/)
@sandalsoft
sandalsoft / fbrapi.oas.yaml
Created June 3, 2025 00:48
FBRAPI OpenAPI
openapi: 3.0.3
info:
title: FBR API
description: |
The FBR API provides developers, statistics enthusiasts, and football (soccer) fans with convenient access to data from fbref.com.
As a premier source of football statistics, fbref.com offers comprehensive information on leagues, teams, and players from around the world.
**Rate Limiting**: Users are limited to one request every 3 seconds to comply with fbref.com scraping restrictions.
**Authentication**: All endpoints require an API key obtained from the `/generate_api_key` endpoint.
@sandalsoft
sandalsoft / fbrapi.llms.txt
Created June 2, 2025 00:53
llms-txt for fbrapi.com
# https://fbrapi.com/documentation llms-full.txt
## FBR API Documentation
## Table of Contents
- [Introduction](https://fbrapi.com/documentation#introduction) \- [Important Note: Scraping Restriction](https://fbrapi.com/documentation#scraping-restriction) -
[About FBR API](https://fbrapi.com/documentation#about) \- [Base URL](https://fbrapi.com/documentation#base-url) -
[Authentication](https://fbrapi.com/documentation#authentication)
- [Usage](https://fbrapi.com/documentation#usage) \- [Supported Endpoints](https://fbrapi.com/documentation#supported-endpoints)
- [All Endpoints](https://fbrapi.com/documentation#all-endpoints) \- [Countries](https://fbrapi.com/documentation#countries) \- [Leagues](https://fbrapi.com/documentation#leagues) \- [League Seasons](https://fbrapi.com/documentation#league-seasons) \- [League Season Details](https://fbrapi.com/documentation#league-season-details) \- [League Standings](https://fbrapi.com/documentation#league-standings) \- [Teams](https://fbrapi.com/documentation#teams
@sandalsoft
sandalsoft / leonardo-api-llms.txt
Created May 20, 2025 12:38
leonardo-api LLMs.txt
# https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model llms-full.txt
## Generate Images with Leonardo
Follow this recipes to generate images using the Leonardo Phoenix model.
🖼️
Generate Images Using Leonardo Phoenix Model in Ultra Mode
Open Recipe
# https://www.recraft.ai/docs#vectorize-image llms-full.txt
## Vectorize Image Guide
[![](https://cdn.prod.website-files.com/655727fe69827d9a402de12c/66f2c145708321e532690bc1_%5BLogo%20sign%5D.png)](https://www.recraft.ai/)
Features
Use Cases
[Gallery](https://app.recraft.ai/community)
@sandalsoft
sandalsoft / gc.bash
Created May 19, 2025 18:40
Use an LLM to create your commit message based on git diff (uses sigoden/aichat)
function gc() {
# Stage all changes
git add .
CHAR_LIMIT=400
# Get the staged changes using git diff
STAGED_CHANGES=$(PAGER="" git diff --cached)
if [ -z "$STAGED_CHANGES" ]; then
echo "No staged changes found. Please stage your changes first using 'git add'"
return 1