brew install redis
Set up launchctl to auto start redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)
| #!/bin/bash | |
| # Get your TOKEN https://yandex.ru/dev/api360/doc/concepts/access.html | |
| # Need access level for app "directory:manage_dns" | |
| YANDEX_TOKEN="<paste your yandex token>" | |
| ORG_ID="<paste your org id>" | |
| # Strip only the top domain to get the zone id | |
| DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)') | |
| SUBDOMAIN=$(expr match "$CERTBOT_DOMAIN" '\(.*\)\..*\..*') |
| --- | |
| hosts: all | |
| tasks: | |
| - name: add github ssh key | |
| copy: > | |
| src=files/id_rsa.github | |
| dest=/root/.ssh/id_rsa.github | |
| owner=root | |
| group=root |
| { | |
| "registry-mirrors" : [ | |
| "https://cr.yandex/mirror", | |
| "https://dockerhub.timeweb.cloud", | |
| "https://huecker.io", | |
| "https://noohub.ru", | |
| "https://dcr-px.ru", | |
| "https://mirror.gcr.io", | |
| "https://quay.io", | |
| "https://registry.access.redhat.com", |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
Устанавливаем gitlab-runner: https://docs.gitlab.com/runner/install/linux-manually.html
Регистрируем runner: https://docs.gitlab.com/runner/register/
Добавляем ssh ключ в deploy keys (для доступа к репозиториям): https://docs.gitlab.com/ee/ci/ssh_keys/
Добавляем своего пользователя и пользоватея gitlab-runner в группу, которая будет иметь доступ к /var/www:
/**
* Превращает массив PHP, в массив Postgres
* @param array $pgArray
* @return Expression
*/
static function createPgArray(array $pgArray): Expression
{
$pgArray = json_encode($pgArray, JSON_UNESCAPED_UNICODE);
$pgArray = "'".preg_replace("#^\[(.*)\]$#", '{\1}', $pgArray)."'";| # See your sequence name inside psql console with \ds command. | |
| ALTER SEQUENCE seq RESTART WITH 1; | |
| # Update sequence | |
| UPDATE table_name SET id=nextval('seq'); |
Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.
for 64bit:
"C:\Program Files\Git\bin\sh.exe" --login -ifor 32bit:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i