gh api repos/username/repo_name/branches/main/protection \
--method PUT \
--input - <<'JSON'
{
"required_status_checks": null,
"enforce_admins": true,
"required_pull_request_reviews": {
"dismiss_stale_reviews": false,
"require_code_owner_reviews": true,
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
| from math import log | |
| import requests | |
| import json | |
| import logging | |
| from requests.exceptions import ( | |
| ConnectionError, | |
| Timeout, | |
| RequestException, |
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
| #!/bin/bash | |
| SERVER="192.168.10.211" | |
| TMPFILE=$(mktemp) | |
| showmount -e $SERVER > "$TMPFILE" | |
| echo "# ===============================" | |
| echo "# NFS mounts for $SERVER" | |
| echo "# ===============================" |
/port set usb1 baud-rate=4800 parity=none data-bits=8 stop-bits=1 flow-control=none
/system/gps set enabled=yes port=usb1 channel=0
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
| { | |
| "news_sites": [ | |
| "cnn.com", | |
| "bbc.com", | |
| "nytimes.com", | |
| "theguardian.com", | |
| "reuters.com", | |
| "bloomberg.com", | |
| "washingtonpost.com", | |
| "foxnews.com", |
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
| #!/bin/bash | |
| set +e | |
| CURRENT_HOSTNAME=`cat /etc/hostname | tr -d " \ \ | |
| \\r"` | |
| if [ -f /usr/lib/raspberrypi-sys-mods/imager_custom ]; then | |
| /usr/lib/raspberrypi-sys-mods/imager_custom set_hostname raspberrypi | |
| else | |
| echo raspberrypi >/etc/hostname |
. Генерация ключей на Linux / WSL / Mac / Windows (через WSL)
Выполните на клиентской машине с установленным wireguard-tools:
# Сгенерировать приватный и публичный ключ сервера
wg genkey | tee server_private.key | wg pubkey > server_public.key
# Сгенерировать приватный и публичный ключ клиента
wg genkey | tee client_private.key | wg pubkey > client_public.key
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
| stages: | |
| - build_nginx | |
| - dev_nginx | |
| build_nginx: | |
| stage: build_nginx | |
| image: | |
| name: gcr.io/kaniko-project/executor:debug | |
| entrypoint: [""] |
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
| import boto3 | |
| import datetime | |
| client = boto3.client('acm',region_name='eu-central-1') | |
| def list_certificates(): | |
| response = client.list_certificates() | |
| return response['CertificateSummaryList'] | |
| def get_certificate_details(certificate_arn): |
NewerOlder
