Skip to content

Instantly share code, notes, and snippets.

View tenebrousedge's full-sized avatar

Kaia Leahy tenebrousedge

View GitHub Profile
@firejox
firejox / LL(1)-pg.cr
Created November 8, 2019 12:50
LL(1) parser generator
annotation ParserAttr
end
annotation TopSymbolAttr
end
annotation SymbolAttr
end
annotation Rule
@Daniel-Worrall
Daniel-Worrall / pre-commit
Last active July 31, 2021 11:47
Crystal pre-commit - Just put in .git/hooks folder
#!/bin/sh
changed_cr_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cr$')
[ -z "$changed_cr_files" ] && exit 0
crystal tool format $changed_cr_files
shards check || exit 1
bin/ameba -f flycheck $changed_cr_files || exit 1
@basham
basham / css-units-best-practices.md
Last active April 18, 2024 16:44
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units