>devroast
leaderboardprivacidade
>

shame_leaderboard

// the most roasted code on the internet

3 submissions·avg score: 5.3/10
#1
score:2.0
kotlin3 lines
123
if (x == true) { return true; }
else if (x == false) { return false; }
else { return !false; }
#2
score:6.5
javascript23 lines
1234567891011121314151617181920212223
import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";

function createRateLimiter() {
  const url = process.env.UPSTASH_REDIS_REST_URL;
  const token = process.env.UPSTASH_REDIS_REST_TOKEN;

  if (!url || !token) {
    return null;
  }

  const redis = new Redis({ url, token });

  return new Ratelimit({
    redis,
    limiter: Ratelimit.slidingWindow(5, "60 s"),
    analytics: true,
    prefix: "devroast:ratelimit",
  });
}

export const rateLimiter = createRateLimiter();
#3
score:7.5
php7 lines
1234567
<?php
function factorial($n) {
    if ($n <= 1) return 1;
    return $n * factorial($n - 1);
}
echo factorial(10);
?>