Skip to content

Instantly share code, notes, and snippets.

@5-tom
5-tom / netlify.toml
Created May 2, 2024 14:45
301 redirect
[[redirects]]
from = "*"
to = "<put URL here>"
status = 301
force = true
trigger:
branches:
include:
- master
- release
jobs:
- job: deploy_to_netlify_via_build_hook
steps:
- bash: curl -X POST -d "{}" "https://api.netlify.com/build_hooks/<>?trigger_branch=$(Build.SourceBranchName)"

app

import * as jose from "jose";

const userId = 1;
const secret = new TextEncoder().encode("secret");
const token = await new jose.SignJWT({ userId })
	.setProtectedHeader({ alg: "HS256" })
	.sign(secret);
@5-tom
5-tom / WORLD_RUGBY_API.md
Created December 18, 2023 10:53
World rugby API

For example, get the height and weight of Argentina players in 'HSBC SVNS 2024 Mens - Dubai':

curl "https://api.wr-rims-prod.pulselive.com/rugby/v3/event/5843bee9-20a7-4b80-9d45-250f9e241e9d/squads" | jq '.squads[] | select(.team.abbreviation == "ARG") | .players | .[].player.height'
curl "https://api.wr-rims-prod.pulselive.com/rugby/v3/event/5843bee9-20a7-4b80-9d45-250f9e241e9d/squads" | jq '.squads[] | select(.team.abbreviation == "ARG") | .players | .[].player.weight'

notes:

  • ?pageSize cannot exceed 100
  • ?language=EN
  • /stats/v3/ should actually be /v3/stats/