Skip to content

Instantly share code, notes, and snippets.

View Temirtator's full-sized avatar
🎯
Focusing

Temirlan Shagyrov Temirtator

🎯
Focusing
View GitHub Profile
@Temirtator
Temirtator / index.html
Created January 17, 2021 11:44
Rendering UI, problem with event loop.
<div id="progress"></div>
<script>
function count() {
for (let i = 0; i < 1e6; i++) {
i++;
progress.innerHTML = i;
}
}
@Temirtator
Temirtator / _base.ts
Last active February 17, 2020 11:51
Refresh token realization
const GET = async(navigation: any, url: string, sec: boolean = true, baseURL: boolean = true) => {
const headers = await getHeaders(sec);
const params = { method: "GET", headers };
const requestURL = baseURL ? `${BASE_URL}${url}` : url;
const result = await makeRequest(requestURL, params, navigation);
return result;
};
const makeRequest = async(url: string, params: any, navigation: any) => {
try {
<html>
<head>
<title>Hello World</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>