Skip to content

Instantly share code, notes, and snippets.

View eliac7's full-sized avatar
👨‍💻

Ilias Nikolaos Thalassochoritis eliac7

👨‍💻
View GitHub Profile
@gioiliop7
gioiliop7 / apli_analogiki.js
Last active May 23, 2023 22:20
Calculate the seats in "Apli Analogiki" elections format, in greek elections
function distributeSeats(percentages, totalSeats, threshold) {
const validParties = percentages.filter((percentage) => percentage >= threshold);
const totalValidPercentages = validParties.reduce((a, b) => a + b, 0);
const seatDistribution = [];
validParties.forEach((percentage) => {
const seats = Math.floor((percentage / totalValidPercentages) * totalSeats);
seatDistribution.push(seats);
});
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active October 5, 2024 04:38
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default