Skip to content

Instantly share code, notes, and snippets.

View juliomerisio's full-sized avatar

Julio Merisio juliomerisio

View GitHub Profile
@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
@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 / shadertoy.md
Created January 28, 2022 03:26 — forked from markknol/shadertoy.md
Shader cheatsheet (from shadertoy)

This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:

Version: WebGL 2.0
Arithmetic: ( ) + - ! * / %
Logical/Relatonal: ~ < > <= >= == != && ||
Bit Operators: & ^ | << >>
Comments: // /* */
Types: void bool int uint float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 mat2 mat3 mat4 mat?x? sampler2D, sampler3D samplerCube
Format: float a = 1.0; int b = 1; uint i = 1U; int i = 0x1;

@juliomerisio
juliomerisio / actionlist.vim
Created April 4, 2021 14:04 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>

JetBrains IDE Performance Config

High Performance Configuration for Jetbrains IDEs [IntelliJ, WebStorm, etc..]

Motivation

Once you step into the realm of multi-project development, large scale dev, or just have to have like 6 IDE's open. You really start to feel a performance hit on jetbrains IDEs.

This configuration aims to give at least 10x performance increases across the board.

Goals

@juliomerisio
juliomerisio / motivation.md
Created April 25, 2020 03:07 — forked from sibelius/motivation.md
usePermission react hook to handle frontend authorization concerns

why is this a React hook?

this is a simplified version of the production/real world version

You can consume roles from context/redux/relay or other place to improve dx and void bugs