Skip to content

Instantly share code, notes, and snippets.

View mikaeldui's full-sized avatar
🏢
Working on something

Mikael Dúi Bolinder mikaeldui

🏢
Working on something
View GitHub Profile
@mikaeldui
mikaeldui / DataDragon.cs
Last active November 29, 2022 13:54
Show enemy details in League of Legends champ select
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Json;
using System.Text;
using System.Threading.Tasks;
internal class DataDragonClient : IDisposable
{
private HttpClient _client;
@mikaeldui
mikaeldui / help.console.20220322.json
Created March 20, 2022 15:35
LCU Help Console format 2022-03-20
This file has been truncated, but you can view the full file.
{
"events": {
"OnCallback": {
"description": "Fired when a callback is invoked.",
"type": {
"BindingCallbackEvent": {
"description": "Represents the parameters of a call to a provided callback.",
"fields": [
{
"id": {
@mikaeldui
mikaeldui / League In-Game API.json
Created March 15, 2022 18:58 — forked from xadamxk/League In-Game API.json
All available in-game API endpoints as of Feb 1, 2020
{
"basePath": "/",
"consumes": [
"application/json",
"application/vnd.api+json",
"application/x-yaml",
"application/x-msgpack",
"application/octet-stream",
"application/x-www-form-urlencoded",
"multipart/form-data"
@mikaeldui
mikaeldui / rso.md
Created February 25, 2022 17:59 — forked from Henrik-3/rso.md
RSO

Implementing RSO

What information Riot needs to create your RSO client?

  1. Contact Emails
  2. Name of the company/service
    • Will also appear on the RSO Login Page
  3. Logo of the company/service
    • Should scale between 275x275 and 60x60
    • Suggested is an SVG, but PNG will also work
  • Will be displayed on light and dark backgrounds (see examples below)
@mikaeldui
mikaeldui / lol-wamp.js
Created February 21, 2022 21:07
League Client WAMP Implementation (minified)
function(e, t, n) {
'use strict';
function r(e, t) {
if (t && (h('Message QUEUED (' + t.length + ' bytes)'), e._sendQueue.push(JSON.stringify(t))), e._connected)
for (; 0 < e._sendQueue.length;) {
const t = e._sendQueue.shift();
h('Message SEND'), e._websocket.send(t)
}
}
@mikaeldui
mikaeldui / caddy.service
Created February 9, 2022 10:25
A Caddy Service for Raspberry Pi Model B
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target
[Service]
Type=notify
User=caddy
Group=caddy
@mikaeldui
mikaeldui / Add 1.1.1.1 for Families.ps1
Last active February 11, 2022 08:40
Add 1.1.1.1 for Families to Windows 11
# From https://developers.cloudflare.com/1.1.1.1/1.1.1.1-for-families
# After running this the templates will be available under hardware properties in the settings.
# Run as admin!
# Block malware
Add-DnsClientDohServerAddress 1.1.1.2 https://security.cloudflare-dns.com/dns-query
Add-DnsClientDohServerAddress 1.0.0.2 https://security.cloudflare-dns.com/dns-query
Add-DnsClientDohServerAddress 2606:4700:4700::1112 https://security.cloudflare-dns.com/dns-query
Add-DnsClientDohServerAddress 2606:4700:4700::1002 https://security.cloudflare-dns.com/dns-query
@mikaeldui
mikaeldui / RiotGamesApiProxyWorker.js
Last active February 2, 2022 18:02
Riot Games API proxy on Cloudflare Workers
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
/**
* Many more examples available at:
@mikaeldui
mikaeldui / JsonReadOnlyCollectionConverter.cs
Last active January 15, 2022 01:03
Deserialize ReadOnlyCollection with System.Text.Json
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Text;
namespace System.Text.Json.Serialization
{
public class JsonIReadOnlyCollectionConverter : JsonConverterFactory
{
@mikaeldui
mikaeldui / JsonReadOnlyDictionaryConverter.cs
Last active October 9, 2022 13:37
Deserialize ReadOnlyDictionary with System.Text.Json
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Text;
namespace System.Text.Json.Serialization
{
public class JsonIReadOnlyDictionaryConverter : JsonConverterFactory
{