Skip to content

Instantly share code, notes, and snippets.

View haryelramalho's full-sized avatar
🎯
Focusing

Haryel Ramalho haryelramalho

🎯
Focusing
View GitHub Profile
@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>;
};
@diego3g
diego3g / NODE.md
Last active April 29, 2025 16:13
VSCode Settings (Updated)

⚠️ Note!

With VSCode version 1.94, the APC extension broke and there is no fix yet.

So, for those having issues with APC after the VSCode update, I recommend downloading the previous version of VSCode for now (https://code.visualstudio.com/updates/v1_93) and setting updates to manual by adding this to the editor's configuration:

"update.mode": "manual",
@daluamon
daluamon / Gerar chave ssh no git
Created January 14, 2017 11:53
Gerar chave ssh no git
Primeiramente, devemos gerar um novo par de chaves usando o comando ssh-keygen:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
O comando irá perguntar em qual arquivo você deseja salvar sua chave. Se você não tem nenhuma chave configurada, não tem problema usar o nome padrão (id_rsa). Em seguida, ele perguntará se você deseja usar uma senha que será perguntada toda vez que você fizer uma autenticação baseada nas suas chaves. Recomendo configurar uma senha se você compartilha seu computador com outras pessoas.
Enter passphrase (empty for no passphrase): [digite sua senha]
Enter same passphrase again: [digite sua senha novamente]
Finalmente, sua chave será salva na pasta ~/.ssh:
@parmentf
parmentf / GitCommitEmoji.md
Last active April 30, 2025 05:10
Git Commit message Emoji
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)