This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ── Rust ──────────────────────────────────────────────────────────────────── | |
| [[language]] | |
| name = "rust" | |
| auto-format = true | |
| formatter = { command = "rustfmt" } | |
| # ── Rust LSP config ───────────────────────────────────────────────────────── | |
| [language-server.rust-analyzer.config.check] | |
| command = "clippy" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| theme = "github_dark_dimmed" | |
| [editor] | |
| line-number = "relative" | |
| cursorline = true | |
| bufferline = "multiple" | |
| true-color = true | |
| color-modes = true | |
| rulers = [120] | |
| auto-format = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function safeFetch<TResponse>( | |
| url: string | URL, | |
| options: RequestInit & { body?: unknown } = {} | |
| ): Promise<[data: TResponse, error: null] | [data: null, error: Error]> { | |
| try { | |
| const { body, headers, ...restOptions } = options; | |
| const isFormData = body instanceof FormData; | |
| const response = await fetch(url, { | |
| ...restOptions, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const get = async ( | |
| url: string, | |
| input: Record<string, string> | |
| ) => { | |
| return fetch( | |
| `${url}?${new URLSearchParams(input).toString()}` | |
| ); | |
| }; | |
| export const post = async ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { z } from "zod"; | |
| const paraguayMobileRegex = | |
| /^(?:(?:\+?595|0)9|9?)(?:8[1-7]|7[1-6]|9[1-5]|6[1-3])\d{6}$/; | |
| export const paraguayPhoneSchema = z | |
| .string() | |
| .trim() | |
| .regex(paraguayMobileRegex, "Número de celular paraguayo inválido") | |
| .transform((val) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [client] | |
| user=dbuser | |
| password=dbpassword | |
| host=dbhost | |
| database=dbname | |
| [mysql] | |
| pager=less -n -i -S -F -X | |
| prompt="@\u [\d] → " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Axios, { isAxiosError } from "axios"; | |
| import type { | |
| CreateAxiosDefaults, | |
| AxiosInstance, | |
| AxiosResponse, | |
| InternalAxiosRequestConfig, | |
| } from "axios"; | |
| export const createApiClient = (config: CreateAxiosDefaults): AxiosInstance => { | |
| const api = Axios.create(config); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "baseUrl": "src", | |
| "paths": { | |
| "#*": [ | |
| "./src/*" | |
| ] | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Basic settings | |
| vim.opt.number = true -- Show line numbers | |
| vim.opt.relativenumber = true -- Show relative line numbers | |
| vim.opt.clipboard = "unnamedplus" -- Enable system clipboard integration | |
| vim.opt.expandtab = true -- Use spaces instead of tabs | |
| vim.opt.shiftwidth = 4 -- Number of spaces per indentation | |
| vim.opt.tabstop = 4 -- Number of spaces for a tab | |
| vim.opt.termguicolors = true -- Enable true color support | |
| vim.opt.wrap = false -- Disable line wrapping | |
| vim.opt.swapfile = false -- Disable swap file creation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jwt from "jsonwebtoken"; | |
| import jwksClient from "jwks-rsa"; | |
| const idToken = "<idtoken>"; | |
| const decoded = jwt.decode(idToken, { complete: true }) as any; | |
| const { kid } = decoded.header; | |
| const { iss } = decoded.payload; | |
| const response = await fetch( |
NewerOlder