Skip to content

Instantly share code, notes, and snippets.

View O4epegb's full-sized avatar
🙉
Procrastinating probably

Danila O4epegb

🙉
Procrastinating probably
View GitHub Profile
@O4epegb
O4epegb / gist:ce9e01ab7e3d5bb20e6bc5aa71bca12d
Last active August 6, 2021 13:28
Weird Postgres index
EXPLAIN ANALYZE
SELECT "Game"."id" FROM "Game"
WHERE ("Game"."id")
IN (SELECT "t0"."id" FROM "Game" AS "t0" INNER JOIN "Player" AS "j0" ON ("j0"."id") = ("t0"."playerId") WHERE ("j0"."id" = 'gargoyl'))
ORDER BY "Game"."startAt" ASC
LIMIT 1
QUERY PLAN
@O4epegb
O4epegb / telegramoauth.ts
Created August 26, 2020 09:04
Telegram oauth
const openTgWindow = (options: {
bot_id: string;
request_access?: boolean;
lang?: string;
}, callback) => {
let timeoutId = null;
const popup_url =
'https://oauth.telegram.org/auth?bot_id=' +
encodeURIComponent(options.bot_id) +