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 / settings.json
Last active July 4, 2024 18:37
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 15,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
@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 "seu-email@seu-servidor.com"
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 July 4, 2024 10:57
Git Commit message Emoji
@lttlrck
lttlrck / 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)