Skip to content

Instantly share code, notes, and snippets.

View juliomerisio's full-sized avatar

Julio Merisio juliomerisio

View GitHub Profile
@juliomerisio
juliomerisio / index.html
Created May 14, 2022 13:15
Trash button animation
<button class="button">
<div class="trash">
<div class="top">
<div class="paper"></div>
</div>
<div class="box"></div>
<div class="check">
<svg viewBox="0 0 8 6">
<polyline points="1 3.4 2.71428571 5 7 1"></polyline>
</svg>
import { z } from 'zod';
type SupportedLocales = 'en-US' | 'pt-BR';
export const dictionaries: Record<
SupportedLocales,
Record<string, Record<string, string>>
> = {
'en-US': {
common: {
@juliomerisio
juliomerisio / TransactionList.spec.tsx
Created February 7, 2023 22:27 — forked from AugustoCalaca/TransactionList.spec.tsx
test using relay hooks, relay-test-utils and react-testing-library
import React from 'react';
import { render, cleanup } from '@testing-library/react';
import { MockPayloadGenerator } from 'relay-test-utils';
import { useRelayEnvironment } from 'react-relay/hooks';
import TransactionList from '../TransactionList';
afterEach(cleanup);
describe('<TransactionList />', () => {
it('should reject query', () => {
@juliomerisio
juliomerisio / coveruv.glsl
Created January 29, 2024 12:39 — forked from supahfunk/coveruv.glsl
Cover UV / Contain UV
/*------------------------------
Background Cover UV
--------------------------------
u = basic UV
s = screensize
i = image size
------------------------------*/
vec2 CoverUV(vec2 u, vec2 s, vec2 i) {
float rs = s.x / s.y; // Aspect screen size
float ri = i.x / i.y; // Aspect image size