Skip to content

Instantly share code, notes, and snippets.

@qoomon
qoomon / conventional_commit_messages.md
Last active December 8, 2023 16:27
Conventional Commit Messages
View conventional_commit_messages.md

Conventional 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

@davestewart
davestewart / broadcast-channel.md
Last active December 6, 2023 22:33
Example of using BroadcastChannel to communicate with pages in the same domain
@gokulkrishh
gokulkrishh / media-query.css
Last active December 5, 2023 23:42
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@lukehorvat
lukehorvat / es6-map-to-object-literal.js
Last active September 27, 2023 05:01
Convert ES6 Map to Object Literal
View es6-map-to-object-literal.js
let map = new Map();
map.set("a", 1);
map.set("b", 2);
map.set("c", 3);
let obj = Array.from(map).reduce((obj, [key, value]) => (
Object.assign(obj, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't.
), {});
console.log(obj); // => { a: 1, b: 2, c: 3 }