Skip to content

Instantly share code, notes, and snippets.

View rostyq's full-sized avatar
🇺🇦
remember: russia is a terrorist state

Rostyslav Bohomaz rostyq

🇺🇦
remember: russia is a terrorist state
View GitHub Profile
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 25, 2024 14:26
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

@rostyq
rostyq / password.py
Last active August 22, 2020 18:40
python password generator
import string
import random
def generate(length=35, digits_count=5, upper_count=5, special_count=5):
lower_count = max(0, length - digits_count - upper_count - special_count)
digits = random.sample(string.digits, digits_count)
specials = random.sample(string.punctuation, special_count)
upper = random.sample(string.ascii_uppercase, upper_count)

ppi.js

Uses the width, height, or diagonal length of a screen in inches to determine the pixels-per-inch.

Usage

Assumed environment would be a 21.5" iMac at 1920x1080 resolution.

var display = new Display({ diagonal: 21.5 }, window.screen);