Skip to content

Instantly share code, notes, and snippets.

@hacker-volodya
hacker-volodya / stop-docker.sh
Created December 2, 2023 07:18
Stop all docker containers
for i in /var/lib/docker/containers/*/config.v2.json; do
touch "$i.new" && getfacl -p "$i" | setfacl --set-file=- "$i.new"
cat "$i" | jq -c '.State.Running = false' > "$i.new" && mv -f "$i.new" "$i"
done
@hacker-volodya
hacker-volodya / Dockerfile
Created March 17, 2020 10:04
Dockerfile for poetry project
FROM python:3.8
RUN mkdir /app
WORKDIR /app
RUN pip install poetry
RUN poetry config virtualenvs.create false
COPY poetry.lock pyproject.toml /app/
RUN poetry install -n --no-root --no-dev
# poetry dependencies installed, here you may want to copy your project package, set command for container, etc.
# all dependencies was installed without virtualenv, so you don't have to use `poetry run` in container
@hacker-volodya
hacker-volodya / snippet.css
Created October 14, 2016 23:50
Сокращение текста с многоточием в конце
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;