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
--- | |
- hosts: wordpress-server | |
vars: | |
root_directory: /var/www/html | |
theme_name: your-theme-name | |
theme_repo: https://yourtheme.git.url.git | |
locale: it_IT | |
url: http://absolute-url.tld | |
title: Worpdress | |
admin_user: admin |
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 | |
ADMIN="[email protected]" | |
# set alert-level % | |
ALERT=85 | |
MAILER=/usr/bin/mail | |
df -Ph | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $6 }' | while read output; | |
do | |
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) | |
partition=$(echo $output | awk '{ print $2 }' ) |
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
env |
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 | |
composer install --no-dev | |
for DEP in $(composer show -N); do | |
echo | |
echo "*** downgrading ${DEP} ***" | |
echo | |
composer update $DEP --prefer-lowest --prefer-stable | |
composer test | |
TEST_FAILED=$? | |
if [[ $TEST_FAILED -gt 0 ]]; then |
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 | |
$defaultIncludes = []; | |
$composerAutoload = getcwd() . DIRECTORY_SEPARATOR . '/vendor/autoload.php'; | |
if (is_file($composerAutoload)) { | |
$defaultIncludes[] = $composerAutoload; | |
} | |
return [ |
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 | |
declare(strict_types=1); | |
use Amp\ByteStream\Message; | |
use Amp\Loop; | |
use Amp\Process\Process; | |
use function Amp\coroutine; | |
use function Amp\Promise\all; |
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 | |
# ** usage ** | |
# initialize a MYSQL_DATABASES env variable in the container with space separated db names | |
# e.g. MYSQL_DATABASES="foo bar" | |
# assumes that MYSQL_ROOT_PASSWORD and MYSQL_USER are set | |
function create_database() { | |
local DATABASE=$1 |
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 | |
use Psr\Http\Message\ServerRequestInterface as Request; | |
use Psr\Http\Message\ResponseInterface as Response; | |
use Psr\Http\Server\RequestHandlerInterface as Handler; | |
use Psr\Http\Server\MiddlewareInterface as Middleware; | |
$middleware = function(Request $req, callable $next): Response { | |
$res = $next($req); | |
return $res->withHeader('X-Foo', 'Bar'); |
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
{ | |
"require": { | |
"psr/http-server-middleware": "^1.0", | |
"zendframework/zend-diactoros": "^1.7" | |
} | |
} |
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 -euo pipefail | |
export PATH=$PATH:/usr/local/bin:/usr/local/sbin | |
echo "*****" | |
date +%F\ %T | |
echo "stopping gitlab-runner service..." |