Skip to content

Instantly share code, notes, and snippets.

If the answer isn't "it depends" you're either lying or misinformed

Xetera Xetera

If the answer isn't "it depends" you're either lying or misinformed
View GitHub Profile
Xetera / spotify_image_size.ts
Created April 19, 2023 08:14
Function for converting between spotify album art sizes in-memory
View spotify_image_size.ts
const MagicImageBytes = {
640: 0b1011001001110011n,
300: 0b0001111000000010n,
64: 0b0100100001010001n,
} as const;
* Converts a spotify link to a new size.
* @see
Xetera / ivd-autofill.js
Last active March 28, 2023 11:55
Interaktif Vergi Dairesi Otomatik Ödeme Scripti
View ivd-autofill.js
// 🇺🇸 Turkey has the world's dumbest government portal for corporate taxes that require you to
// use a virtual keypad with shuffled buttons as if that does literally ANYTHING to benefit security
// LOL
// 🇹🇷 IVDnin 2001de kalmış vergi ödeme portalındaki salak keypadi hızlıca geçmek için kullanılır
// creditCardNumber ve diğer kısımlara kendi bilginizi girin.
// Consolea yapıştırmadan önce keypadin açık olduğundan emin olun
const creditCardNumber = "xxxx xxxx xxxx xxxx"
Xetera / kahve_dunyasi.json
Created October 19, 2022 22:01
List of all Kahve Dunyasi locations around the world
View kahve_dunyasi.json
"storeId": "d1d14969-c3e3-e711-80e0-005056010583",
"storeName": "Kahve Dünyası - Promenade",
"storeCode": "509",
"city": "HAWALLİ",
"state": "AL KUWAİT",
"district": "AL MOTASEM STREET",
"country": "KUVEYT",
"address": "Inside The Sultan Center, Al Motasem Street, Al Kuwait Hawalli",
Xetera /
Created September 18, 2022 14:29
Python function for checking when a site was banned by the Turkish government
from typing import Optional
import requests
import re
import datetime
def check_turkish_ban_date(site: str) -> Optional[]:
Looks up when a site (domain + tld) was banned in turkey.
Returns None if the site isn't banned.
Xetera / armongate.geojson
Last active September 5, 2022 05:28
All MAC Fitness locations in Turkey
View armongate.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Xetera /
Last active August 11, 2022 09:58
Scraping post data from weverse's new naver api using an hmac
from hashlib import sha1
import hmac
import time
import base64
import requests
import urllib.parse
js_link_regex = re.compile("src=\"(.+\/main.*\.js)\"")
secret_key_regex = re.compile("return\s?\"([a-fA-F0-9]+)\"")
Xetera / metrics.js
Last active May 6, 2022 00:11
Adblock-proof metric proxy. Make it impossible for adblock maintainers to block your internal metrics.
View metrics.js
import Random from "seedrandom";
import express from "express";
const alphabet = "abcdefghijklmnoprstuvwyz123456789////";
const random = (rnd: () => number, len: number, min = 0) =>
Math.floor(rnd() * (len - min)) + min;
function generateEndpoints(salts: string[]) {
return => {
Xetera / weverse.js
Last active July 25, 2021 19:25 automatic password login flow for scraping posts/images
View weverse.js
const forge = require('node-forge')
const fetch = require('node-fetch')
const publicKey = `-----BEGIN RSA PUBLIC KEY-----
const key = forge.pki.publicKeyFromPem(publicKey);
const encryptedPassword = key.encrypt("your-password-here", 'RSA-OAEP')
Xetera /
Last active June 3, 2021 13:31
Adding emoji support to the netlify build process, used for taking screenshots with puppeteer
#!/usr/bin/env bash
#check if font is installed
fc-match "Noto Color Emoji"
#if not installed install with following line
apt-get install fonts-noto-color-emoji -y
curl -L -o
Xetera / nested-find.js
Created March 29, 2021 21:31
Return a nested subdocument inside an array field from a mongodb query
View nested-find.js
// Aggregates are a powerful mongodb tool that allows us to craft complex queries.
// In this case it helps prevent repetition in a situation where we would have to
// query a document with a filter, then use a duplicate `Array.find` logic to
// extract the subdocument we were already expecting to find in the first place.
// Example person document
name: "jason",
pets: [{
type: "dog",