Skip to content

Instantly share code, notes, and snippets.

View fhugoduarte's full-sized avatar
😅
probably fixing a bug

Hugo Duarte fhugoduarte

😅
probably fixing a bug
View GitHub Profile
@fhugoduarte
fhugoduarte / .gitconfig
Last active February 15, 2023 13:42
git alias
# To open the .gitconfig file on xcode, run: git config --global core.editor code
# To edit the .gitconfig file, run: git config --global --edit
[core]
editor = code
[alias]
c = !git add --all && git commit -m
s = !git status -s
l = !git log --pretty=format:'%C(blue)%h %C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr'
@fhugoduarte
fhugoduarte / ThemeProvider.tsx
Last active June 17, 2021 20:07
styled-components integration
import React, { useMemo } from 'react';
import {
useScreen,
ScreenContextData,
MediaQuery,
BreakpointValues,
rem,
getNearestBreakpointValue,
validateMediaQuery
} from 'responsive-native';
@fhugoduarte
fhugoduarte / useValidateForm.ts
Created September 26, 2020 14:08
A validation hook to unform 2.0
import { FormHandles, SubmitHandler } from '@unform/core';
import { RefObject, useCallback, useState } from 'react';
import { ObjectSchema, ValidationError } from 'yup';
type Hook = <T>(
args: Props<T>,
) => {
validating: boolean;
handleSubmit: SubmitHandler<T>;
};
@fhugoduarte
fhugoduarte / hyper.js
Created July 21, 2020 17:01
Hyper Config File
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@fhugoduarte
fhugoduarte / snippets.json
Last active September 26, 2020 14:09
Snippets
{
"typescriptFunctionalComponent": {
"prefix": "rfc",
"body": [
"import React from 'react';",
"",
"// import { Container } from './styles';",
"",
"interface Props {",
"",
@fhugoduarte
fhugoduarte / settings.json
Last active July 23, 2023 03:20
settings.json
{
"javascript.suggest.autoImports": true,
"explorer.confirmDelete": false,
"gitlens.codeLens.enabled": false,
"material-icon-theme.folders.associations": {
"subscribers": "messages",
"organisms": "public",
"kube": "kubernetes",
"entities": "class",
"modules": "components",