Skip to content

Instantly share code, notes, and snippets.

View jasonmcleod's full-sized avatar

Jason McLeod jasonmcleod

View GitHub Profile
// Taken from
// https://advancedweb.hu/how-to-use-async-functions-with-array-filter-in-javascript/
// and
// https://patrickmuff.ch/blog/async-filter-array-typescript/
/**
* @param {Array} array The array to perform the map on
* @param {Function} callback to be performed on each array element
* @return {Promise} Which returns an array of the results, in order.
*/
@hansihe
hansihe / rl-api.md
Last active October 19, 2022 21:54
Rocket League API Documentation

#Rocket League API

Endpoints

All requests seem to be to the domain https://psyonix-rl.appspot.com. There are several endpoints on this domain.

Endpoint Purpose
/callproc105/ Leaderboard, player statistics
/Population/GetPopulation/ Player counts/regions
/login105/ Authentication, obtaining session ids
@exortech
exortech / parser.js
Created April 4, 2012 22:15
Naive fix for "Cannot call method 'charAt' of undefined" in Less.css
function getInput(e, env) {
if (e.filename && env.filename && (e.filename !== env.filename)) {
var baseFilename = basename(e.filename);
for (f in parser.imports.contents) {
if (parser.imports.contents.hasOwnProperty(f) && f.indexOf(baseFilename) >= 0) {
return parser.imports.contents[f];
}
}
return parser.imports.contents[baseFilename];
} else {