Skip to content

Instantly share code, notes, and snippets.

View kazzkiq's full-sized avatar

Claudio Holanda Jr. kazzkiq

View GitHub Profile
View Erros da API.yaml
required: "The '{field}' field is required.",
string: "The '{field}' field must be a string.",
stringEmpty: "The '{field}' field must not be empty.",
stringMin: "The '{field}' field length must be greater than or equal to {expected} characters long.",
stringMax: "The '{field}' field length must be less than or equal to {expected} characters long.",
stringLength: "The '{field}' field length must be {expected} characters long.",
stringPattern: "The '{field}' field fails to match the required pattern.",
stringContains: "The '{field}' field must contain the '{expected}' text.",
stringEnum: "The '{field}' field does not match any of the allowed values.",
kazzkiq / exemplo-rota-hydration.svelte
Last active April 17, 2022 02:20
Exemplo de rota SvelteKit que chama APIs já no backend e retorna a tela hidratada no front.
View exemplo-rota-hydration.svelte
<script context="module">
// Ao invés de fazer essas chamadas para APIs dentro dos componentes (Componente1 e Componente2)
// ela já é feita aqui na rota, dentro desse bloco context="module", e retornada como props
// para a própria tela.
// E aí a tela é que passa os dados para os componentes via props.
export async function load ({ params, fetch }) {
const result = await (await fetch("ENDPOINT_DA_API_AQUI")).json();
return {
props: {
kazzkiq /
Created January 19, 2022 02:12
Download entire website with wget

Simply run this command:

wget --mirror --convert-links --adjust-extension --page-requisites --no-parent

The command will download the website and any link it finds, and update those links to run even if you call them locally.

View Error stacktrace
INFO [14:40:32.431 #75876] ⬛ Onyx::HTTP::Server is listening at
DEBUG [14:40:35.927 #75876] [sql] SELECT * FROM bookmarks WHERE ( = ?)
DEBUG [14:40:35.929 #75876] 2.42ms
DEBUG [14:40:35.929 #75876] [sql] UPDATE bookmarks SET date_modified = ? WHERE ( = ?)
ERROR [14:40:36.175 #75876] [875ff9eb] ERROR cast from DB::ExecResult to DB::ResultSet+ failed, at /Users/kazzkiq/Works
cast from DB::ExecResult to DB::ResultSet+ failed, at /Users/kazzkiq/Workspace/Favhive/favhive-api/lib/mysql/src/mysql/st (TypeCastError)
from lib/mysql/src/mysql/ in 'perform_query'
struct Endpoints::Bookmarks::Update
include Onyx::HTTP::Endpoint
params do
path do
type id : Int32
json require: true do
type id_category : Int32?
kazzkiq / Link.html
Created June 5, 2018 23:44
Link Svelte Component (which replaces <a>)
View Link.html
kazzkiq /
Created November 16, 2017 20:55
[bash] Resize image and create thumbnail with ImageMagick
for file in ./*.jpg; do
[ -e "$file" ] || continue
convert $file -resize 1000x1000^ $file
for file in ./*.jpg; do
[ -e "$file" ] || continue
View unologo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View sample.ux
<Rectangle Dock="Top" Background="#515a6d" Height="50">
<Text Alignment="Center" TextColor="#fff">Scroll Down</Text>
<Rectangle Dock="Bottom" Background="#515a6d" Height="50">
<Text Alignment="Center" TextColor="#fff">Scroll Down</Text>
<ScrollView Padding="20">
<Text TextWrapping="Wrap">
kazzkiq / tmce.css
Last active December 10, 2017 10:48
View tmce.css
@import url(',300i,400,400i');
.mce-content-body {
font-family: 'Lato', sans-serif;
font-size: 15px;
.mce-content-body * {
word-break: break-all;