Skip to content

Instantly share code, notes, and snippets.

View ekiauhce's full-sized avatar
🙂
Hi there!

Daniil Belyak ekiauhce

🙂
Hi there!
View GitHub Profile
@srittau
srittau / sqlparse_delimiters.py
Last active April 18, 2024 08:04
sqlparse with delimiter support
# Split SQL file using sqlparse with delimiter handling.
#
# The SQL string is pre-processed before handing it off to sqlparse.split:
# DELIMITER statements are removed, semicolons within non-standard
# delimiter blocks are replaced by the Unicode Object Replacement
# Character, and custom delimiters replaced with semicolons. After
# processing the string with sqlparse.split, the Object Replacement Characters
# are replaced with semicolons again.
import re
@efrecon
efrecon / run.tpl
Last active May 30, 2024 03:12
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@basham
basham / css-units-best-practices.md
Last active June 21, 2024 09:59
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