Skip to content

Instantly share code, notes, and snippets.

View heriberto-codes's full-sized avatar

Heriberto Roman heriberto-codes

View GitHub Profile
source: https://architecture.md
[Project Root]/
├── backend/ # Contains all server-side code and APIs
│ ├── src/ # Main source code for backend services
│ │ ├── api/ # API endpoints and controllers
│ │ ├── client/ # Business logic and service implementations
│ │ ├── models/ # Database models/schemas
│ │ └── utils/ # Backend utility functions
@heriberto-codes
heriberto-codes / Setting NODE_ENV for process
Created October 16, 2021 04:59
Setting NODE_ENV for production or development
process.env.NODE_ENV="production";
if(process.env.NODE_ENV === 'production') {
// We are running in production mode
} else {
// We are running in development mode
}
console.log(`We are running in ${process.env.NODE_ENV} mode 🏃‍♂️`)
@heriberto-codes
heriberto-codes / PR
Last active April 5, 2026 06:01
PR Template
## What?
## Why?
## How?
## Testing?
## Screenshots (optional)
## Anything Else?
## Ticket:
## Reproduction:
@heriberto-codes
heriberto-codes / reactImage
Created March 30, 2021 11:33
how to deal with a broken react image
const MyCard = (props) => {
const { item } = props;
const defaultImgUrl = 'path to image'
const handleError = (event) => {
event.target.src = defaultImgUrl;
};
return (
<div>
<h1>item.name</h1>
@heriberto-codes
heriberto-codes / zshellAccess
Last active April 5, 2026 06:01
zshell access
## Open terminal and plug in the following
code ~/.zshrc
@heriberto-codes
heriberto-codes / .gitignore
Last active February 22, 2021 21:04
.gitignore template
## Node
node_modules
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
@heriberto-codes
heriberto-codes / TwoNumberSum.js
Created September 29, 2020 19:41
🎙 Live Code 💻 With Getroman [Two Number Sum Part 1] [Coding Challenge] [Javascript]
// https://www.algoexpert.io/questions/Two%20Number%20Sum
// Solution 1
function twoNumberSum(array, targetSum) {
let arr = array;
let target = targetSum;
let pairedNumbers = [];
for (let i = 0; i < array.length; i++) {
@heriberto-codes
heriberto-codes / CSS_Start_up_Page_with_Comments
Last active August 14, 2022 18:47
CSS_Start_up_Page_with_Comments
/* ======================================
CSS Reset
https://dev.to/hankchizljaw/a-modern-css-reset-6p3
Box sizing rules
========================================= */
*::before,
*::after {
box-sizing: border-box;
}
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js