Skip to content

Instantly share code, notes, and snippets.

Avatar

Helder B. Berto helderburato

View GitHub Profile
@helderburato
helderburato / preview.js
Created Feb 8, 2022
Storybook Preview (NextJS) - Fix Link
View preview.js
module.exports = {
staticDirs: ['../public'],
stories: ['../src/components/**/stories.tsx'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'storybook-addon-next-router',
{
/**
* NOTE: fix Storybook issue with PostCSS@8
@helderburato
helderburato / rfc.md
Last active May 17, 2021
RFC Template
View rfc.md
  • RFC: Title of RFC
  • Created: YYYY-MM-DD
  • Last Update: YYYY-MM-DD

Summary

If someone only reads this far, what do you want them to know?

Goals

What problems are you trying to solve?

@helderburato
helderburato / install-nvm-nodejs-yarn-homebrew.md
Last active Apr 17, 2021
Install NVM, NodeJS, Yarn via Homebrew
View install-nvm-nodejs-yarn-homebrew.md

Prerequisites

  • Homebrew should be installed (Command line tools for Xcode are included).

Getting start

Part A: Install NVM and NodeJS

  1. Install nvm via Homebrew

$ brew install nvm

View deploy.sh
#!/usr/bin/env bash
set -euo pipefail
org_head=$(git rev-parse HEAD)
printf "Deploying updates to GitHub...\033[0m\n"
printf "\033[0;32mDeploying commit $org_head of '🧠 braindump' \n\033[0m"
## Commit and push
if [[ `git status --porcelain` ]]; then
View note-template.md

Title

A title that is neither too short nor too long, which contains keywords to facilitate the search.

Links

Links to the articles and videos I used as a study.

Tags

The tags are used to create an adequate taxonomy to keep my notes organized and facilitate the discovery of previous notes.

Code

@helderburato
helderburato / js-stack-data-structure.js
Created Dec 6, 2020
JavaScript: Stack Data Structure
View js-stack-data-structure.js
class Stack {
constructor() {
this.items = [];
}
push(elements) {
this.items.push(elements);
}
pop() {
View conventional_commit_messages.md

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

View orgmode-cheatsheet.org

Orgmode Cheatsheet

Cheatsheet

Headings

* Welcome to Org mode
@helderburato
helderburato / tmux-cheatsheet.md
Last active Jul 27, 2020 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.md

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@helderburato
helderburato / useIsMountedRef.js
Created May 12, 2020
React Hook: useIsMountedRef
View useIsMountedRef.js
import { useRef, useEffect } from 'react';
function useIsMountedRef(){
const isMountedRef = useRef(null);
useEffect(() => {
isMountedRef.current = true;
return () => isMountedRef.current = false;
});