Skip to content

Instantly share code, notes, and snippets.

View josantonius's full-sized avatar

josantonius

View GitHub Profile
@josantonius
josantonius / minecraft-spectate-mode.js
Created November 18, 2022 20:49
Automatically spectate locations (simulating cameras) and players on Sparked Host Minecraft servers
class MinecraftSpectateMode {
constructor(options) {
Object.assign(this, options)
this.lastUser = ''
this.mode = this.randomize(['cam', 'user'])
this.cam = this.randomize(options.cams)
this.input = document.querySelector(options.consoleInputQuerySelector)
this.excludedPlayers.push(this.spectator)
this.excludedPlayers.push('Anonymous Player')
}
@josantonius
josantonius / language-codes.json
Last active January 10, 2024 17:16
List of 217 language codes (ISO 639-1)
{
"aa": "Afar",
"ab": "Abkhazian",
"af": "Afrikaans",
"am": "Amharic",
"ar": "Arabic",
"ar-ae": "Arabic (U.A.E.)",
"ar-bh": "Arabic (Bahrain)",
"ar-dz": "Arabic (Algeria)",
"ar-eg": "Arabic (Egypt)",
@josantonius
josantonius / http-status-codes.json
Last active March 15, 2024 16:37
Full list of HTTP status codes (Español | English)
{
"en": {
"1xx": {
"short": "Informational",
"large": "Request received, continuing process. This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. Since HTTP/1.0 did not define any 1xx status codes, servers must not send a 1xx response to an HTTP/1.0 client except under experimental conditions."
},
"100": {
"short": "Continue",
"large": "The server has received the request headers and the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient. To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed i