Skip to content

Instantly share code, notes, and snippets.

View alexswilliams's full-sized avatar

Alex Williams alexswilliams

View GitHub Profile
@alexswilliams
alexswilliams / pre-cache.js
Created April 6, 2024 23:25
GoL Pre-Fetch
// Frequently finding this site constantly stuttering and buffering. I run this in the console to pre-fetch all dash parts
// for the current episode, so that the video player fetches them from the browser cache instantly.
async function fetchFilm(baseUrl, startAt, { signal }) {
const uid = baseUrl.split('/').findLast(() => true);
let segmentNumber = startAt;
const remoteOptions = { "credentials": "include", "referrer": "https://www.gagaoolala.com/", "method": "GET", "mode": "cors" };
const fileServerOptions = { method:"PUT", mode:"cors", referrer: "https://www.gagaoolala.com", headers: new Headers({ "Content-Type":"video/mp4" }) };
await fetch(baseUrl + "/video/1080p/dash/init.mp4", remoteOptions)
await fetch(baseUrl + "/audio/eng/dash/128000/init.mp4", remoteOptions)
@alexswilliams
alexswilliams / Apple (UK) Key Bindings
Last active March 27, 2022 15:16
List of all apple key bindings for a UK keyboard layout
normal, shift, option, shift+option:
§± (has no option variant)
1!¡⁄
2@€™
3£#‹
4$¢›
5%∞fi
6^§fl
7&¶‡
@alexswilliams
alexswilliams / keybase.md
Created February 4, 2018 13:23
Keybase Identification

Keybase proof

I hereby claim:

  • I am alexswilliams on github.
  • I am alexswilliams (https://keybase.io/alexswilliams) on keybase.
  • I have a public key ASBJM0bB3JP7nLPNXnDUQFAlUjWLcHc9b_mGBUdug60N6go

To claim this, I am signing this object: