Skip to content

Instantly share code, notes, and snippets.

View helderberto's full-sized avatar

Helder Berto helderberto

View GitHub Profile
@helderberto
helderberto / conventional_commit_messages.md
Created September 14, 2020 20:22 — forked from qoomon/conventional_commit_messages.md
Conventional Commit Messages

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@helderberto
helderberto / orgmode-cheatsheet.org
Last active August 8, 2020 21:56
Orgmode Cheatsheet

Orgmode Cheatsheet

Cheatsheet

Headings

* Welcome to Org mode
@helderberto
helderberto / tmux-cheatsheet.md
Last active July 27, 2020 16:50 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@helderberto
helderberto / useIsMountedRef.js
Created May 12, 2020 13:28
React Hook: useIsMountedRef
import { useRef, useEffect } from 'react';
function useIsMountedRef(){
const isMountedRef = useRef(null);
useEffect(() => {
isMountedRef.current = true;
return () => isMountedRef.current = false;
});
@helderberto
helderberto / api.js
Created January 20, 2020 14:15 — forked from mariocesar/api.js
Axios single configured instance
import axios from "axios";
const singleton = Symbol();
const singletonEnforcer = Symbol();
function readCookie(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
}
@helderberto
helderberto / simple-README.md
Last active June 24, 2019 20:55
Simple README.md
@helderberto
helderberto / github-two-factor-auth-brazil.js
Created June 13, 2019 13:29
Github Two-Factor Authentication (2FA) for Brazil via SMS
const brazilOption = document.createElement('option');
brazilOption.value = '+55';
brazilOption.appendChild(document.createTextNode('Brazil +55'));
document.querySelectorAll('#countrycode').forEach((select) => select.appendChild(brazilOption));
@helderberto
helderberto / license-badges.md
Created June 9, 2019 15:38 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

@helderberto
helderberto / npm-init.md
Last active January 14, 2019 00:13
NPM Default Config

Initial Configs

npm set init-author-name "Your name"
npm set init-author-email "your@email.com"
npm set init-author-url "https://yoururl.com"
npm set init-license "MIT" <choose your prefered license>

Reference

@helderberto
helderberto / git-cheat-sheet.md
Last active March 18, 2019 20:52
Git Cheat Sheet

CONFIGURATION

See all local configs:

git config --list

Get username or email:

git config user.name