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( |
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
| PROJECT_NAME="" # my-app | |
| MAIN="" # index.mjs | |
| # npm config set init-author-name "Your name" | |
| # npm config set init-author-email "Your email" | |
| # npm config set init-license "MIT" | |
| # npm config set init-version "0.1.0" | |
| mkdir $PROJECT_NAME | |
| cd $PROJECT_NAME |
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 pc from "picocolors"; | |
| // Assign colors. | |
| export const success = pc.green; | |
| export const ok = pc.green; | |
| export const info = pc.cyan; | |
| export const msg = pc.blue; | |
| export const message = pc.blue; | |
| export const notice = pc.magenta; | |
| export const spam = pc.gray; |
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
| set -g default-terminal "screen-256color" | |
| setw -g xterm-keys on | |
| set -s escape-time 10 | |
| set -sg repeat-time 600 | |
| set -s focus-events on | |
| set -g prefix2 C-a | |
| bind C-a send-prefix -2 | |
| set -q -g status-utf8 on | |
| setw -q -g utf8 on | |
| set -g history-limit 5000 |
NewerOlder