Skip to content

Instantly share code, notes, and snippets.

View kauefraga's full-sized avatar

Kauê Fraga Rodrigues kauefraga

View GitHub Profile
const arr = ['A', 'B', 'C', 'D'];
const k = 3;
let current = 2;
console.log(arr[current]); // 'C'
for (let i = 0; i < k; i++) {
current = (current + 1) % arr.length;
}
@kauefraga
kauefraga / is-palindrome.ts
Last active April 25, 2026 20:55
Discover if a word is a palindrome, using JavaScript built-in array methods, manually reversing the string array or moving two pointers.
// $ bun init
// $ bun run is-palindrome.ts
function isPalindrome(word: string) {
return word === word.split('').reverse().join('');
}
console.log('[v1] Array<string>.reverse');
console.log('renner', isPalindrome('renner'));
console.log('cachorro', isPalindrome('cachorro'));
@kauefraga
kauefraga / fonts4coding.md
Last active March 29, 2026 02:10
The best monospaced fonts to code | As melhores fontes monoespaçadas para programar
@kauefraga
kauefraga / exemploawt.java
Last active October 19, 2024 15:55
Apresentação de linguagem de programação - Introdução ao Swing e AWT
import java.awt.*;
import java.awt.event.*;
public class IntroducaoAoSwingEAwt {
public static void main(String[] args) {
Frame frame = new Frame("Login");
Label lUsuario = new Label("Nome de usuário");
TextField tUsuario = new TextField();
@kauefraga
kauefraga / blocklist.txt
Last active September 29, 2024 15:10
Tsurugi blocklist
bsky.app
youtube.com
www.youtube.com
instagram.com
twitch.tv
www.twitch.tv
@kauefraga
kauefraga / readings.md
Last active October 8, 2025 19:45
My reading list | minha lista de leituras :)
@kauefraga
kauefraga / headers.md
Last active August 19, 2024 23:06
Some markdown headers that I saw in other projects and I use in my ones.
alt

Project name

Project description.

More description here.

@kauefraga
kauefraga / settings.json
Last active October 27, 2024 19:35
My Visual Studio Code settings
{
/* -- Security -- */
"security.workspace.trust.untrustedFiles": "newWindow",
/* -- Fonts -- */
"editor.fontSize": 18,
"editor.tabSize": 2,
"editor.lineHeight": 28,
"terminal.integrated.fontSize": 16,
"editor.fontFamily": "JetBrains Mono",
"editor.fontLigatures": true,
@kauefraga
kauefraga / jogo.java
Last active March 19, 2024 22:33
😎 Joguinho muito brabo feito durante as aulas de Banco de Dados e Lógica de Programação.
/* Autores:
* Kauê
* Gabriel
* Raphael
* Felipe
*/
import java.util.Scanner;
class joguinho {
public static void main(String[] args) {