Skip to content

Instantly share code, notes, and snippets.

View coltiebaby's full-sized avatar

Colton Robertson coltiebaby

  • McKinney, TX
View GitHub Profile
@Pupix
Pupix / index.js
Last active July 25, 2022 07:25
A minimal WAMP 1.0 protocol implementation to be used with the new League of Legends client (LCU)
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
const WebSocket = require('ws');
const MESSAGE_TYPES = {
WELCOME: 0,
PREFIX: 1,
CALL: 2,
CALLRESULT: 3,
CALLERROR: 4,
@1lann
1lann / replays.md
Last active April 24, 2023 09:06
Storing and playing back replays in League of Legends

Storing and playing back replays in League of Legends

How it works

When you spectate a game in League of Legends, you tell the client to use a HTTP server, and make HTTP requests to it to retrieve data in chunks which make up a game. But what if you could return back the exact same data at a later time, simulating the spectate but viewing it at anytime? That's the concept behind replays and that's how they work.

There is some behavior in the API which I do not fully understand yet, so there are if statements to catch these edge cases.

Current game information

Before you can even get the game's metadata, you'll need to retrieve necessary information for the game. This call is part of the official Riot Games API.

/observer-mode/rest/consumer/getSpectatorGameInfo/{platformId}/{summonerId}

@Starefossen
Starefossen / vim-cheats.md
Last active September 14, 2024 16:02
My vim cheat sheet for working with tabs and window splits.

Tabs

New Tab

  • :tabnew - new blank tab
  • :tabedit [file] - open file in tab

Cursor Movement

  • gt (:tabn) - next tab