Skip to content

Instantly share code, notes, and snippets.

View regisdiogo's full-sized avatar

regisdiogo

  • Amsterdam, The Netherlands
View GitHub Profile
@desinas
desinas / avoidManyEvents.js
Last active June 12, 2023 20:17
Avoid too many events & Event Delegation - Working w Browser Events - Udacity FrontENDev
const myCustomDiv = document.createElement('div');
function respondToTheClick(evt) {
console.log('A paragraph was clicked: ' + evt.target.textContent);
}
for (let i = 1; i <= 200; i++) {
const newElement = document.createElement('p');
newElement.textContent = 'This is paragraph number ' + i;
@santisbon
santisbon / Update-branch.md
Last active October 16, 2024 09:09
Deploying from #Git branches adds flexibility. Bring your feature branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master.