Skip to content

Instantly share code, notes, and snippets.

View helderberto's full-sized avatar

Helder Berto helderberto

View GitHub Profile
@helderberto
helderberto / parse-md-names.js
Created June 12, 2023 10:18
YYYY_MM_DD.md to YYYY-MM-DD.md
const fs = require('fs');
const path = require('path');
const targetDir = './your_folder'; // Replace with your target folder
// Regular expression pattern to match files by YYYY_MM_DD.md format
const filePattern = /^\d{4}_\d{2}_\d{2}\.md$/;
// Get a list of all files in the target folder
fs.readdir(targetDir, (err, files) => {
@helderberto
helderberto / pull_request_template.md
Last active September 14, 2022 16:51
Pull Request Template

Description

Issue

What kind of change does this PR introduce? (check at least one)

@helderberto
helderberto / git-sync.sh
Created August 25, 2022 19:50
Git Sync
#!/usr/bin/env bash
org_head=$(git rev-parse HEAD)
printf "Deploying updates to GitHub...\033[0m\n"
printf "\033[0;32mDeploying commit $org_head of '🔒 vaults' \n\033[0m"
## Commit and push
if [[ `git status --porcelain` ]]; then
git add .
@helderberto
helderberto / preview.js
Created February 8, 2022 10:30
Storybook Preview (NextJS) - Fix Link
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
@helderberto
helderberto / rfc.md
Last active May 17, 2021 10:30
RFC Template
  • 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?

@helderberto
helderberto / install-nvm-nodejs-yarn-homebrew.md
Last active April 17, 2021 10:02
Install NVM, NodeJS, Yarn via Homebrew

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

@helderberto
helderberto / deploy.sh
Created March 6, 2021 11:33
Automatic Deploy
#!/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
@helderberto
helderberto / note-template.md
Last active February 17, 2021 20:21
Note Template

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

@helderberto
helderberto / js-stack-data-structure.js
Created December 6, 2020 16:10
JavaScript: Stack Data Structure
class Stack {
constructor() {
this.items = [];
}
push(elements) {
this.items.push(elements);
}
pop() {
@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