Skip to content

Instantly share code, notes, and snippets.

View Gesugao-san's full-sized avatar
💭
⌈Wired Sound for Wired People⌋

Gesugao-san

💭
⌈Wired Sound for Wired People⌋
View GitHub Profile
@Gesugao-san
Gesugao-san / openapi_byond.yml
Last active May 5, 2024 21:28
Swagger UI OpenAPI for http://byond.com. How to use: copy content of this file, and insert in https://editor.swagger.io. For working preview use https://mybrowseraddon.com/access-control-allow-origin.html!
openapi: 3.0.0
info:
version: "1.0"
title: BYOND API
description: "Website offer a free API that provides some info for a players and about players, hubs and worlds."
termsOfService: https://www.byond.com/TOS
contact:
name: SS13HUB Team
url: http://discord.gg/HMwbBZyEum
  1. Install Python 3
  2. Install and use mod Map Writer
  3. Download the file
  4. Type this:

CLS && py mapwriter_sorter.py

this.document.querySelectorAll('[class^="member"],[class^="container"],[class^="clickable"],[data-list-item-id^="members"]')[0];
this.document.querySelectorAll('[class^="userInfoBody"]')[0].innerText.split('\n');
@Gesugao-san
Gesugao-san / _parsing.js
Last active December 4, 2024 08:50
SS13 hub parsing. Inspured by https://ss13stats.skullnet.me but it's js, for D3 in future.
// Run in Google Chrome Console. MIT Licence.
// For "http://byond.com/games/Exadv1/SpaceStation13?format=text"
function main(_input = false) {
if ((_input === false) || (_input === null) || (_input == '')) {return console.error("User cancelled the prompt.");}
console.clear();
if (verbose) console.debug(['PROCESSING START']);
let current_entry = '', _data = {}; // let tabbed = [], notTabbed = [];
//_input = _input.split('\r\n');
//if (debug) console.log('_input:', _input);
for (var i = 0; i < _input.length; i++) {
let buttLoot, buttLeave, _debug = Boolean(1);
let _store = Array.from(document.querySelectorAll('*')).find(e => e.__vue__).__vue__.$store;
// Seach for buttons to click
// https://stackoverflow.com/a/67398903/8175291
function querySelectorIncludesText(selector, text) {
if ((!selector) || (!text)) return console.error('querySelectorIncludesText error!');
return Array.from(document.querySelectorAll(selector))
.find(el => el.textContent.includes(text));
}
// Run away if player can be killed in two successfully hits.
@Gesugao-san
Gesugao-san / markdown-text-101.md
Created May 25, 2022 06:44 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@Gesugao-san
Gesugao-san / index.js
Last active May 5, 2024 21:26
Discord - get messages' authors
// https://stackoverflow.com/questions/6991494/
javascript: (function() {
console.clear();
let unique_only = Boolean(1);
let arr = new Array();
let messages = document.querySelectorAll('[id ^= "chat-messages-"]');
Array.prototype.forEach.call(messages, callback);
function callback(element, i) {
let avatar = element.querySelector('[class ^= "avatar-"]'); // [aria-hidden ^= "true"];
// ('[src ^= "https://cdn.discordapp.com/avatars/*]');
// WARNING:
// "VK error: Действие временно невозможно, поскольку вы совершили слишком много однотипных действий за последнее время. #78101300"
var likesButtAll = document.getElementsByClassName("PostButtonReactions");
var likesButtToLike = [];
for (var i = 0; i < likesButtAll.length - 1; i++) {
if (likesButtAll[i].getAttribute("data-reaction-user-reaction-id") === null)
likesButtToLike.push(likesButtAll[i]);
}
@Gesugao-san
Gesugao-san / factorio_list_mods.py
Last active April 28, 2022 09:02
List mods for Factorio v1.1
import os, json, random, string
generateFormFromOSName = bool(1)
printMods = bool(0)
# + thumbnail.png
modpackInfo = {
"name": "example-modpack", # aka ID, no spaces
"title": "Example Modpack",
@Gesugao-san
Gesugao-san / Routes.md
Created April 4, 2022 11:27 — forked from Awoocado/Routes.md
Discord protocol routes

Home

User profile: discord://-/users/:userID example: discord://-/users/224619540263337984

Friends list: discord://-/channels/@me

Stage Discovery: discord://-/discovery/

Games Library: discord://-/library/

Store: ( redirects to nitro tab )