Skip to content

Instantly share code, notes, and snippets.

@crimastitsukq
crimastitsukq / DualSafe Password Manager Pro ed
Created February 7, 2025 21:09
DualSafe Password Manager Pro 1.4.30 Crack
DualSafe Password Manager Pro License Keyed
@daetidalsu3781
daetidalsu3781 / Nikon Camera Control Pro ed
Created February 7, 2025 21:09
Nikon Camera Control Pro 2.38.0 Crack
Nikon Camera Control Pro License Keyed
@exprobsazoh13
exprobsazoh13 / Rogue Amoeba Loopback ed
Created February 7, 2025 21:09
Rogue Amoeba Loopback 2.2.38 Crack
Rogue Amoeba Loopback License Keyed

Scaling your API with rate limiters

The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.

In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.

Request rate limiter

This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.

@thecesysbahn949
thecesysbahn949 / Exportizer Enterprise ed
Created February 7, 2025 21:08
Exportizer Enterprise 9.2.9.70 Crack
Exportizer Enterprise License Keyed
// handy dandy function to open file picker and get file
async function getFile() {
var promiseResolve;
var input = document.createElement("input");
// credit to https://codepen.io/udaymanvar/pen/MWaePBY
input.type = "file";
input.onchange = async (_) => {
let files = Array.from(input.files);
promiseResolve(files[0]);
};
@icremii12
icremii12 / Geometric Glovius Pro ed
Created February 7, 2025 21:08
Geometric Glovius Pro 6.1.0.287 Crack
Geometric Glovius Pro License Keyed
@parocysfupt362
parocysfupt362 / Avid Sibelius Ultimate ed
Created February 7, 2025 21:08
Avid Sibelius Ultimate 2024.14 Crack
Avid Sibelius Ultimate License Keyed
@getoliage5e9
getoliage5e9 / Neuratron PhotoScore Ultimate ed
Created February 7, 2025 21:08
Neuratron PhotoScore Ultimate 9.2.2 Crack
Neuratron PhotoScore Ultimate License Keyed
@DolphinOfficial
DolphinOfficial / PostShutdownFullLog.txt
Created February 7, 2025 21:07
Text file created by Roblox
-- AH POST-SERVER LOGS --
-- ServerID: 91f26178-3e4c-46ae-a412-3cfffdaf0bb2
-- Server started: February 07, 2025 09:07 PM UTC | Server uptime: 2 seconds
------------------ LOADB LOGS ------------------
{
}