build-docker-image.sh -r http://dl.astralinux.ru/astra/frozen/1.7_x86-64/1.7.4/repository-main \
-c 1.7_x86-64 -i alse:174-base --cache-dir $HOME/debcache
build-docker-image.sh -r http://dl.astralinux.ru/astra/frozen/1.7_x86-64/1.7.4/repository-main \
-c 1.7_x86-64 -i alse:174-slim --cache-dir $HOME/debcache -s
build-docker-image.sh -r http://dl.astralinux.ru/astra/frozen/1.7_x86-64/1.7.4/repository-main \
-u http://dl.astralinux.ru/astra/frozen/1.7_x86-64/1.7.4/repository-update \
-c 1.7_x86-64 -i alse:174-update --cache-dir $HOME/debcache
build-docker-image.sh -r http://dl.astralinux.ru/astra/frozen/1.7_x86-64/1.7.4/repository-main \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo snap disconnect skype:opengl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Проверяем, запущен ли скрипт от имени администратора | |
net session >nul 2>&1 | |
if %errorlevel% neq 0 ( | |
echo Elevation to administrator... | |
powershell -Command "Start-Process '%~f0' -Verb RunAs" | |
exit /b | |
) | |
:: Выполнение команды |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ $- =~ i ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_TTY" ]]; then | |
tmux new -A -s ssh_tmux | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"registry-mirrors": ["https://mirror.gcr.io", "https://daocloud.io"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# notice create snapshot VM before continue | |
# git official winget install command https://git-scm.com/download/win | |
winget install --id Git.Git -e --source winget | |
winget install Python.Python.3.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG GO_VERSION=1.20 | |
FROM golang:${GO_VERSION}-bookworm as builder | |
WORKDIR /app | |
RUN git clone --depth 1 https://github.com/opentofu/opentofu.git . | |
RUN go mod download && go mod verify | |
RUN CGO_ENABLED=0 GOOS=linux go build -v -o bin/ ./cmd/tofu | |
FROM scratch AS export-stage | |
COPY --from=builder /app/bin/tofu / |
An example of how sometimes you have to denormalize your schema, so that you can build compound indexes, to get acceptable performance. In some cases a normalized schema with join(s) just won't be fast enough.
Note: I think in almost all cases you should start with a normalized schema and use joins. But when you hit cases like the above, it's fine to denormalize just for these specific cases - often you'll just have one or a few such cases in your entire app, where the combination of data size/shape/queries means you cannot have efficient queries without denormalizing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Первая стадия создание образа который копирует исходник wsdd | |
FROM python:3.10.5-alpine3.15 as builder | |
# указываем папку в которой работаем тоже самое что cd | |
WORKDIR /app | |
# ставим git | |
RUN apk add --no-cache git | |
# клонируем образ | |
RUN git clone --depth=1 https://github.com/christgau/wsdd.git | |
# вторая стадия запуск wsdd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Put in your Rust repository's .git/hooks/pre-commit to ensure you never breaks rustfmt. | |
for FILE in `git diff --cached --name-only`; do | |
if [[ $FILE == *.rs ]] && ! rustfmt --edition=2018 --check $FILE; then | |
echo -e "\n Commit rejected due to invalid formatting of \"$FILE\" file." | |
exit 1 | |
fi | |
done |