Skip to content

Instantly share code, notes, and snippets.

View frontbastard's full-sized avatar
🇺🇦
Focusing

Pavlo Sokolov frontbastard

🇺🇦
Focusing
View GitHub Profile
@szemate
szemate / package-lock-conflicts.md
Last active May 5, 2025 07:32
How to resolve package-lock.json conflicts

How to resolve package-lock.json conflicts

It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

  1. Update the master branch with the latest changes:
    git checkout master
    git pull
    
  2. Merge your feature branch into master:
@miguelmota
miguelmota / getDates.js
Last active May 22, 2025 04:15
Get dates in between two dates with JavaScript.
// Returns an array of dates between the two dates
function getDates (startDate, endDate) {
const dates = []
let currentDate = startDate
const addDays = function (days) {
const date = new Date(this.valueOf())
date.setDate(date.getDate() + days)
return date
}
while (currentDate <= endDate) {