Skip to content

Instantly share code, notes, and snippets.

View malaquiasdev's full-sized avatar

Mateus Malaquias malaquiasdev

View GitHub Profile
// ==UserScript==
// @name Ebenezer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Embed Ebenezer in HubSpot
// @author StudentRoomStay
// @match https://app.hubspot.com/contacts/2113514/contact/*
// @match https://app.hubspot.com/contacts/2113514/deal/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
function sortedSquares(squares = []) {
const squaredArray = squares.map(square => square * square);
for (let i = 1; i < squaredArray.length; i++) {
const value = squaredArray[i];
let j = i - 1;
for(j; j >= 0 && squaredArray[j] > value; j--) {
squaredArray[j + 1] = squaredArray[j];
}
squaredArray[j+1] = value;
}
@malaquiasdev
malaquiasdev / non.constructible.js
Created May 3, 2022 23:53
1 - Non-Constructible Change
function nonConstructibleCoins(coins = []) {
let current = 0;
coins
.sort((a, b) => a - b)
.forEach((coin) => {
if (coin > current + 1) {
return current + 1;
}
current += coin;
});

Conventinal Commit Messages

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

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default