Skip to content

Instantly share code, notes, and snippets.

View RuslanUC's full-sized avatar
🐈

RuslanUC RuslanUC

🐈
View GitHub Profile
@RuslanUC
RuslanUC / json.c
Last active March 18, 2025 12:34
Json parser in C (Warning: it is very simple and probably does not comply with json format described in RFC8259)
#include "json.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
char next_subtoken(const char* data, size_t* pos, const size_t size, const bool in_string) {
while(*pos < size) {
if(in_string)
return data[*pos] == '\n' ? 0 : data[(*pos)++];
@RuslanUC
RuslanUC / discord_FrecencyUserSettings.proto
Last active February 24, 2023 10:04
Recovered from https://discord.com/assets/cbc98c97c3635bf34da3.js and has FrecencyUserSettings (/users/@me/settings-proto/2) schema.
syntax = "proto3";
package discord_protos.discord_users.v1.FrecencyUserSettings;
message FrecencyUserSettings {
message Versions {
uint32 client_version = 1;
uint32 server_version = 2;
uint32 data_version = 3;
}
@RuslanUC
RuslanUC / discord_PreloadedUserSettings.proto
Last active February 24, 2023 10:04
Recovered from https://discord.com/assets/cbc98c97c3635bf34da3.js and has PreloadedUserSettings (/users/@me/settings-proto/1) schema.
syntax = "proto3";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
package discord_protos.discord_users.v1.PreloadedUserSettings;
message PreloadedUserSettings {
message Versions {
uint32 client_version = 1;