Skip to content

Instantly share code, notes, and snippets.

@guilhermerodz
guilhermerodz / settings.json
Last active February 26, 2025 19:44
Tailwind Styled Utility inspired by styled-components and emotion
// .vscode/settings.json
{
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
["styled\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
}
@guilhermerodz
guilhermerodz / gist:53f29ffc1b03a9b6e6be60b822ad0aa5
Created January 27, 2025 09:41
example of long prompt reasoning for deepseek-r1
Convert this 2d context shader
```js
// start effect when dom is loaded
document.addEventListener("DOMContentLoaded", function() {
var canvas = document.getElementById('fire');
var ctx = canvas.getContext('2d');
var canvasWidth = canvas.width;
var canvasHeight = canvas.height;
var intensity = null;
'use client'
import * as React from 'react'
import { cn } from '@/lib/cn'
import Image from 'next/image'
export default function Home() {
const mirrorRef = React.useRef<HTMLDivElement>(null)
const mainRef = React.useRef<HTMLDivElement>(null)
@guilhermerodz
guilhermerodz / gist:c073ad56f1104f48dc75b9e9c16fb34c
Created February 28, 2024 21:01
CSS hack for hiding input while autofill is ON
syncTimeouts(() => {
if (input.matches(':autofill')) {
console.log('input has autofilled')
input.style.opacity = '0 !important'
} else {
console.log('input is no longer autofilled')
input.style.opacity = '1'
}
})
@guilhermerodz
guilhermerodz / coc-settings.json
Created February 2, 2021 21:45
NeoVim Config - ~/.config/nvim/
{
"suggest.noselect": false,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"typescript",
"typescriptreact",
"json",
"javascriptreact",
"typescript.tsx",
"graphql"
@guilhermerodz
guilhermerodz / Omni.colorscheme
Last active February 5, 2021 23:53
Konsole - Omni
# ~/.local/share/konsole/Omni.colorscheme
[Background]
Color=25,22,34
[BackgroundFaint]
Color=77,77,77
[BackgroundIntense]
Color=25,22,34
@guilhermerodz
guilhermerodz / argv.json
Last active March 21, 2025 17:08
VSCode setup
// This configuration file allows you to pass permanent command line arguments to VS Code.
// Only a subset of arguments is currently supported to reduce the likelyhood of breaking
// the installation.
//
// PLEASE DO NOT CHANGE WITHOUT UNDERSTANDING THE IMPACT
//
// NOTE: Changing this file requires a restart of VS Code.
{
// Use software rendering instead of hardware accelerated rendering.
// This can help in cases where you see rendering issues in VS Code.
@guilhermerodz
guilhermerodz / .vimrc
Last active March 2, 2020 16:17
.vimrc
" Must come first because it changes other options
set nocompatible
" [vim-plug] Load plugins
call plug#begin()
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'junegunn/vim-easy-align'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'tpope/vim-bundler'
@guilhermerodz
guilhermerodz / .zshrc
Last active February 5, 2021 02:59
.zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/guilhermerodz/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes