Skip to content

Instantly share code, notes, and snippets.

View MrZillaGold's full-sized avatar
😍

Egor Pronin MrZillaGold

😍
View GitHub Profile
@MRLokop
MRLokop / money-hotel-calculator.js
Last active July 20, 2022 17:30
Калькулятор цены с условием Гоши
const total = 35852 // Цена всего
const night = total / 4 // Цена одной ночи
const withoutGosha = night / 3 // Цена для 1 участника, при условии что участников 3
const withGosha = night / 4 // Цена для 1 участника, при условии что участников 4
console.log( "Gosha: " + withGosha * 2 ) // Сколько Георгий должен за 2 ночи
console.log( "Other: " + ((withoutGosha * 2) + (withGosha * 2)) ) // Сколько должен каждый другой участник
@Plagiatus
Plagiatus / ms_auth_class.ts
Created September 12, 2021 15:19
A basic implementation for a full flow of Microsoft-Login -> Minecraft Auth + Player Info. No error handling included for easier understandability.
import { XMLHttpRequest } from "xmlhttprequest";
interface AuthorizationTokenResponse {
token_type: string,
expires_in: number,
scope: string,
access_token: string,
refresh_token: string,
user_id: string,
foci: string
@tuxuser
tuxuser / xbl_oauth2.py
Created September 2, 2020 09:15
Sign in to Xbox Live with OAUTH2
"""
Sign in to Xbox Live with OAUTH2
1. Go to https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
2. Register new app ("+ New registration")
2.1. Enter a name for your app
2.2. Set "Supported account types" to "Personal Microsoft accounts only"
2.3. Click register
2.4. Choose "Redirect URIs" -> "Add a Redirect URI"
2.5. Click "Add a platform" -> "Mobile and desktop applications"
@acarr
acarr / ui.html
Last active July 5, 2023 14:15
Example implementation of a Web Worker within a Figma plugin.
<div id="myApp">
...
</div>
<script id="quant-worker" type="javascript/worker">
<%= compilation.assets['worker.js'].source() %>
</script>