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
| <?php | |
| /** | |
| * Получить число из строки | |
| * @param string $string Исходная строка | |
| * @param int $min Минимальная граница (0 по умолчанию) | |
| * @param int $max Максимальная граница (100 по умолчанию) | |
| * @param int $precision Точность от 1 до 32 (16 по умолчанию) | |
| * @return int | |
| */ |
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
| version: '2' | |
| services: | |
| shadowsocks: | |
| image: shadowsocks/shadowsocks-libev:latest | |
| environment: | |
| - TZ=Europe/Moscow | |
| - PASSWORD=<password> | |
| - METHOD=chacha20-ietf-poly1305 | |
| - DNS_ADDRS=1.1.1.1,1.0.0.1 | |
| - ARGS=--fast-open --no-delay --reuse-port |
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 | |
| # Install Go | |
| sudo pacman -S --noconfirm go | |
| # Build MailHog and mhsendmail from source in GitHub | |
| go get github.com/mailhog/MailHog | |
| go get github.com/mailhog/mhsendmail | |
| # Copy execucate files |
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 | |
| curl -fsSL https://get.docker.com -o get-docker.sh | |
| sudo sh get-docker.sh | |
| sudo usermod -aG docker $USER | |
| newgrp docker |
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 | |
| xfreerdp /u:user /p:password /f /v:server:port +clipboard |
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/sh | |
| # Developer deploy, if change in dev branch then run deploy_dev.sh | |
| cd /path/to/site && git fetch | |
| if [[ $(git log --oneline -n1 dev..origin/dev) ]]; then | |
| echo Delpoy dev... | |
| ./deploy_dev.sh | |
| fi | |
| # Prodaction deploy, if change in master branch then run deploy_prod.sh |
OlderNewer