Skip to content

Instantly share code, notes, and snippets.

View hroman-codes's full-sized avatar

Heriberto Roman hroman-codes

View GitHub Profile
## 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
@hroman-codes
hroman-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;
}
@hroman-codes
hroman-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++) {
@hroman-codes
hroman-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
@hroman-codes
hroman-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>