▲▲▼▼◄►◄► B A — ${en
? 'Konami unlocked. 30 extra lives of high availability granted.'
: 'Konami desbloqueado. 30 vidas extras de alta disponibilidade concedidas.'}
);
}
/* misc / easter-egg commands */
function miscOutput(c, lang) {
const en = lang === 'en';
const date = new Date().toLocaleString(en ? 'en-US' : 'pt-BR');
const blk = (s, cls) => `
${s}
`;
switch (c) {
case 'whoami': return blk('glauber');
case 'pwd': return blk('/home/glauber/payments');
case 'date': return blk(date);
case 'uname': return blk('devbox 6.10.0-backend x86_64 GNU/Coffee');
case 'echo': return blk('echo $WHO → glauber', 'dim');
case 'uptime':
return blk(en
? `up 10+ years, 4 squads, load average: high availability`
: `no ar há 10+ anos, 4 squads, load average: alta disponibilidade`, 'dim');
case 'neofetch': case 'screenfetch': return neofetch(en);
case 'sudo':
return blk(en ? 'Nice try. glauber is not in the sudoers file. This incident will be reported. 👀'.replace(' 👀','')
: 'Boa tentativa. glauber não está no arquivo sudoers. Este incidente será reportado.', 'dim');
case 'sudo su': case 'su':
return blk(en ? 'Permission denied. The payments cluster does not negotiate.' : 'Permissão negada. O cluster de pagamentos não negocia.', 'dim');
case 'vim': case 'vi': case 'nvim': case 'emacs':
return blk(en ? `You opened ${c}. Now you live here. (try exit)` : `Você abriu ${c}. Agora você mora aqui. (tente exit)`, 'dim');
case 'exit': case 'quit': case ':q': case ':wq': case ':q!':
return blk(en ? "There is no escape from a good terminal. But there is a contact." : 'Não há saída de um bom terminal. Mas há um contato.', 'dim');
case 'coffee': case 'make coffee': case 'brew':
return blk(en ? '☕ brewing… HTTP 418: I’m a teapot. Back-end still compiles though.'.replace('☕ ','> ')
: '> preparando café… HTTP 418: I’m a teapot. Mas o back-end compila mesmo assim.', 'dim');
case 'git': case 'git status':
return blk(`On branchmain\n${en ? 'Your career is ahead of origin/main by 10 years.' : 'Sua carreira está 10 anos à frente de origin/main.'}`.replace('\n',' '));
case 'git blame':
return blk(en ? 'It was probably the gateway. It’s always the gateway.' : 'Provavelmente foi o gateway. É sempre o gateway.', 'dim');
case 'rm -rf /': case 'rm -rf': case 'rm -rf /*':
return blk(en ? 'Refused. Production is sacred. 🛡 We don’t do that here.'.replace(' 🛡','')
: 'Recusado. Produção é sagrada. A gente não faz isso aqui.', 'dim');
case 'ping':
return blk(en ? '64 bytes from glauberborges.me: time=0.1ms — always reachable.' : '64 bytes de glauberborges.me: time=0.1ms — sempre disponível.', 'dim');
case 'top': case 'htop': case 'ps':
return blk([
`PID COMMAND %CPU`,
`1 payments-core 42.0`,
`7 side-projects 18.0`,
`15 mentoring 12.0`,
`42 learning (always) ∞`,
].join(' '));
case 'joke': case 'fortune':
return blk(randomFrom(en ? JOKES_EN : JOKES_PT), 'dim');
case 'motd':
return blk(en ? '“The best system is the one nobody notices is running.”' : '“O melhor sistema é aquele que ninguém percebe que está rodando.”', 'dim');
case 'theme': return ''; // handled in run()
case 'matrix': return ''; // handled in run()
case 'hire': case 'hire glauber': case 'hire me':
return blk(`${en ? 'Let’s talk. Reach out:' : 'Vamos conversar. Fale comigo:'} ola@glauberborges.me`);
case 'sl': return blk(en ? 'You meant `ls`. The train has left the station anyway. 🚂'.replace(' 🚂','') : 'Você quis dizer `ls`. Mas o trem já partiu.', 'dim');
case 'help me': case '?':
return blk(en ? 'Aren’t we all. Try help.' : 'Quem não, né. Tente help.', 'dim');
case 'secret': case 'eggs': case 'easter':
return blk(en
? `psst — try: neofetch · matrix · coffee · top · joke · sudo · theme · and the Konami code ↑↑↓↓←→←→ b a`
: `psiu — tente: neofetch · matrix · coffee · top · joke · sudo · theme · e o código Konami ↑↑↓↓←→←→ b a`, 'dim');
default:
return `
${en ? 'command not found' : 'comando não encontrado'}: ${escapeHtml(c)} ${en ? 'type' : 'digite'} help ${en ? 'or' : 'ou'} secret
`;
}
}
const JOKES_PT = [
'Existem 2 tipos de problema em sistemas distribuídos: 2. entrega exatamente uma vez 1. ordem das mensagens 2. entrega exatamente uma vez.',
'Não é bug, é uma feature não documentada com alta disponibilidade.',
'Cache invalidation, naming things, e contar pessoas em uma daily.',
'O deploy passou em staging. — frase dita momentos antes do desastre.',
'Funciona na minha máquina. ☑ — então mandamos sua máquina pra produção.'.replace(' ☑',''),
];
const JOKES_EN = [
'There are 2 hard problems in distributed systems: 2. exactly-once delivery 1. message ordering 2. exactly-once delivery.',
'It’s not a bug, it’s an undocumented feature with high availability.',
'Cache invalidation, naming things, and counting people in a standup.',
'It passed in staging. — words said moments before disaster.',
'It works on my machine. — so we shipped my machine to production.',
];
function randomFrom(a) { return a[Math.floor(Math.random() * a.length)]; }
function neofetch(en) {
const logo = [
" __ ",
" ___ / / __ _ ",
" / _ `/ _ \\/ ' \\ ",
" \\_, /_.__/_/_/_/ ",
" /___/ payments ",
].join('\n');
const rows = [
['OS', 'devbox · Backend Linux'],
['Host', 'Tech Lead'],
['Uptime', en ? '10+ years' : '10+ anos'],
['Shell', 'zsh · php · laravel'],
['Kernel', 'microservices 6.x (AWS · Azure · K8s)'],
['Stack', 'PHP · Redis · RabbitMQ · Elasticsearch'],
['Editor', 'nvim · Cursor · Claude Code'],
['Locale', en ? 'remote · UTC-3' : 'remoto · UTC-3'],
].map(([k, v]) => `${k}${v}`).join('');
const bar = ['#ec6a5e','#f4bf4f','#61c554','#79c0ff','#b48ead','#56d4dd']
.map((c) => `███`).join('');
return `