cdn/app/services/flavor_text_service.rb
2026-01-30 15:10:35 -05:00

241 lines
8.3 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# frozen_string_literal: true
class FlavorTextService
include ActionView::Helpers::NumberHelper
def initialize(user: nil, env: Rails.env, deterministic: true)
@user = user
@env = env
@seed = deterministic ? Time.now.to_i / 5.minutes : Random.new_seed
@random = Random.new(@seed)
end
def generate
flavor_text = sample
flavor_text = flavor_text.call if flavor_text.respond_to? :call
flavor_text
end
def flavor_texts
[
"bytes bytes bytes bytes bytes",
"A hard drive stuffed with cat photos",
"The Hack Foundation dba The File Store",
"Open on weekends",
"Open on holidays",
"please don't hack",
"Contentedly Delivering Nonsense",
"Cool Dino Network",
"Compressed Data Nuggets",
"Cozy Digital Nest",
"Open late",
"Now in color!",
"Filmed on location",
"Soon to be a major blockchain!",
"As seen on the internet",
"Most viewed site on this domain!",
"Coming to a browser near you",
"#{@random.rand 4..9}0% bug free!",
"#{@random.rand 1..4}0% fewer bugs!",
'Now with "code"',
"Holds lots of bytes",
"Educational!",
"Don't use while driving",
"Support local file hosting!",
"Take frequent breaks!",
"Technically good!",
"Operating at a loss since 2025!",
"Does anyone actually read this?",
"Like and subscribe!",
"As seen on cdn.hackclub.com",
"As seen on hackclub.com",
"Now running in production!",
"put files in computer",
"TODO: get that bread",
"Coming soon to a screen near your face",
"Coming soon to a screen near you",
"As seen on the internet",
"Operating at a loss so you don't have to",
"It holds files!",
"uwu",
"owo",
"ovo",
"An important part of this nutritional breakfast",
"By people with files, for people with files",
'Made using "files"',
"Chosen #1 by dinosaurs everywhere",
"IT departments HATE them",
"Congratulations, you are the #{number_with_delimiter(10**@random.rand(1..5))}th visitor!",
"You've got this",
"Don't forget to drink water!",
"Putting the 'fun' in 'upload'",
"Putting the 'fun' in 'cloud storage'",
"Putting the 'do' in 'download'",
"Putting the 'based' in 'cloud-based hosting'",
"Putting the 'host' in 'ghost'",
"Putting the 'sus' in 'sustainable bandwidth'",
"Open on weekdays!",
"Open on #{Date.today.strftime("%A")}s",
"??? storage!",
"Did you see the size of that #{%w[image video file].sample(random: @random)}?!",
"Guess how much it costs to run this thing!",
"Bytes served fresh daily by Cloudflare",
"Running with Ruby on Rails #{Rails.gem_version.canonical_segments.first}",
"Now with 1% downtime!",
"Achievement unlocked!",
"#{@random.rand(10..50)},#{@random.rand(100..999).to_s.rjust(3, '0')} lines of code",
"Your move, Dropbox",
"If you can read this, the page's status code is 200",
"If you can read this, the page has loaded",
"Now go and upload yourself something nice",
"[Insert splash text here]",
"Condemned by the sheriff of storage",
"Coded on location",
'Voted "3rd"',
"You are now breathing manually",
"If you can read this, thanks!",
"(or similar product)",
"[OK]",
"tell your parents it's educational",
"You found the 3rd Easter egg on the site",
"The best site you're using right now",
"It Is What It Is",
"Made in Vermont, with love",
"Your move S3!",
"Flash plugin failed to load",
"Upload, they said",
"U want sum storage?",
"Check the back of this page for an exclusive promo code!",
"You've found the 5th easter egg on the site!",
"A folder is fine too",
"Welcome to #{%w[data storage].sample(random: @random)} town, population: you",
"So... what's your favorite file format?",
"<span style='font-size: 2px !important'>If you can read this you've got tiny eyes</span>".html_safe,
"Page loaded in: < 24 hrs (I hope)",
"Old and improved!",
"Newly loaded!",
"Refreshing! (if you keep hitting ⌘+R)",
"Recommended by people somewhere!",
"Recommended by people in some places!",
"Recommended by hackers on this site!",
"Recommended by me!",
"Recommended by Hack Club!",
"Recommended by the recommend-o-tron 3000",
"Recommended! (probably)",
"Please stow your files in the upright and locked position",
"Loaded in #{@random.rand(10..35)}ms... jk i don't actually know how long it took",
"Loaded in #{@random.rand(10..35)}ms... jk i can't count",
"Turns out it's hard to make one of these things",
"TODO: come up with some actual jokes for this box",
"asdgfhjdk I'm out of jokes",
"Send your jokes to nora@hackclub.com",
"You're looking great today :)",
"Great! You're here!",
"You need to wake up",
"you need to wake up! Pinch yourself",
"stop dreaming, you need to wake up!",
"Are you suuuuure you aren't a robot?",
"Show emotion here if you aren't a robot",
"Your ad here!",
"Are you feeling lucky?",
"...and you can take that to the cloud",
"Ever just wonder... why?",
"Redstone update out now!",
"educational edition",
"Where's the file lebowski?!",
"We put the 'fun' in 'cloud storage' (there isn't any)",
"Not responsible for any major data loss!",
"In today's internet?!",
"Send us your best haiku!",
"«⋄⇠◇«─◆─»⇢$$$⇠«─◆─»◇⇢⋄»",
"¸¸.•*📁*•.¸¸¸.•*📁*•.¸¸¸.•*📁*•.¸¸¸.•*📁*•.¸",
"◥◤◢◤◢📁📁📁◣◥◣◥◤",
"store no evil",
"byte me",
"not running on the blockchain!",
"not available offline!",
"as seen online",
"online only!",
"new strawberry flavor!",
"same classic taste",
"<marquee scrollamount='5'>📁📁📁</marquee>".html_safe,
-> { "#{@random.rand(5..50)} users online" },
"Raccoon-tested, dinosaur-approved.",
"original recipe!",
"now sugar-free!",
"low-sodium edition",
'we put the ":3" in "S3"!',
"do not adjust your monitor.",
"only #{@random.rand(5..50)} missing files!",
"why are you reading these",
"go outside",
"posture check!",
"have you eaten today?",
"blink if you're okay",
"git commit -m 'idk'",
"git commit -m 'stuff'",
"the files understand",
"everything is fine forever",
"yippee!",
"yayyy :3",
":D",
"files :)",
"hehe",
"honk",
"meow",
"AAAAAAAAA",
"help",
"this is a cry for help disguised as a CDN",
"my lawyer advised me not to finish this jo-",
"I can see you",
"behind you",
"the call is coming from inside the server",
"this is your sign",
"you dropped this: 👑",
"I'm in your walls",
"feed me files",
"MORE",
"the prophecy is true",
"the ritual is complete",
"you have been chosen",
"you win!",
"thanks for coming to my ted talk",
"anyway",
"tl;dr: files",
"no but like actually what is a file",
"philosophy major dropout energy",
"the void stares back",
"nothing matters and that's okay",
"we're all just files in the end",
"existential dread as a service",
"powered by anxiety",
"college dropout runs a CDN, more at 11",
"I should be studying",
"due tomorrow? do tomorrow.",
"sleep is for the weak (I am weak)",
"it's 3am and I regret everything",
"made at 4am on a tuesday",
"unmedicated energy",
"no sleep, only code",
"shoutout to my therapist",
"certified mess",
"professionally unprofessional",
"fake it till you make it (we're still faking it)",
"I have no idea what I'm doing",
"stackoverflow raised me",
"ctrl+c ctrl+v my beloved",
"works on my machine (I swear)",
"100% bug-free* *no it's not",
"who let me cook",
"cooked (derogatory)",
"this seemed like a good idea at the time"
]
end
private
def sample
flavor_texts.sample(random: @random)
end
end