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
| let is_valid ~email = | |
| match (String.length email, email) with | |
| | (0, _) -> Error "empty email is not valid" | |
| | (len, _) when len > max_email_length -> Error "Email length exceeds the limit" | |
| | (_, email) when string_is_bigger_than max_email_length [email] -> Error "Email is bigger than the limitations" | |
| | _ -> Ok () |
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
| SELECT | |
| i.invoice_id, | |
| CONCAT(u.first_name, ' ', u.middle_name, ' ', u.last_name) AS "Nome Completo", | |
| u.id_document AS "CPF", | |
| u.phone_number AS "Telefone", | |
| a.email AS "Email", | |
| est.establishment_name AS "Nome da Loja", | |
| i.establishment_doc AS "CNPJ da Loja", | |
| i.invoice_number AS "Número da Nota", | |
| i.invoice_series AS "Série da Nota", |
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
| package main | |
| import "fmt" | |
| type Rule struct { | |
| Length int | |
| Range []int | |
| Count int | |
| } |
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
| vim.cmd("set expandtab") | |
| vim.cmd("set tabstop=4") | |
| vim.cmd("set softtabstop=4") | |
| vim.cmd("set shiftwidth=4") | |
| vim.cmd("set number") | |
| vim.g.mapleader = " " | |
| local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
| if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
| local lazyrepo = "https://github.com/folke/lazy.nvim.git" |
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
| function toggle_layout { | |
| currentLayout=$(setxkbmap -query | grep layout | awk '{print $2}') | |
| if [ "$currentLayout" == "br" ]; then | |
| setxkbmap us && notify-send -t 1000 "Switched to US Layout" | |
| else | |
| setxkbmap br && notify-send -t 1000 "Switched to ABNT-2 Layout" | |
| fi | |
| } |
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
| # i3status configuration file. | |
| # see "man i3status" for documentation. | |
| # It is important that this file is edited as UTF-8. | |
| # The following line should contain a sharp s: | |
| # ß | |
| # If the above line is not correctly displayed, fix your editor first! | |
| general { | |
| colors = 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
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout some time, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see https://i3wm.org/docs/userguide.html for a complete reference! |
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
| // tsx seed.ts | |
| import { faker } from '@faker-js/faker'; | |
| import { pgTable, text, varchar, timestamp } from 'drizzle-orm/pg-core'; | |
| import { drizzle, PostgresJsDatabase } from 'drizzle-orm/postgres-js'; | |
| import { createInsertSchema } from 'drizzle-zod'; | |
| import { customAlphabet } from 'nanoid'; | |
| import postgres from 'postgres'; | |
| import { z } from 'zod'; |
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
| // Zed settings | |
| // | |
| // For information on how to configure Zed, see the Zed | |
| // documentation: https://zed.dev/docs/configuring-zed | |
| // | |
| // To see all of Zed's default settings without changing your | |
| // custom settings, run `zed: open default settings` from the | |
| // command palette (cmd-shift-p / ctrl-shift-p) | |
| { | |
| "outline_panel": { |
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 fetch from 'node-fetch'; | |
| import fs from "fs"; | |
| import { formatDate } from "date-fns" | |
| // provide the following | |
| const key = "" | |
| const token = "" | |
| const boardId = "" | |
| fetch(`https://api.trello.com/1/boards/${boardId}/cards?key=${key}&token=${token}`, { |
NewerOlder