Skip to content

Instantly share code, notes, and snippets.

@5818959
5818959 / gitsync.sh
Last active August 7, 2017 13:59
Sync git repos in subfolders
#!/bin/sh
# Colours
red="\033[00;31m"
RED="\033[01;31m"
green="\033[00;32m"
GREEN="\033[01;32m"
yellow="\033[00;33m"
@5818959
5818959 / gist:87a594c2dc60484eb1f55c17aff12823
Created April 13, 2017 08:21
Hosts and repos status on server
<?php
$hosts = [
[
'name' => 'host1',
'folder' => '/var/www/host1/',
'git' => '/var/www/host1/.git',
],
[
'name' => 'host2',
'folder' => '/var/www/host2/',
@5818959
5818959 / run_tests.sh
Last active December 6, 2017 10:32
Script to run php lint, phpspec, php-cs-fixer, phpcs, phpcpd, phpmd
#!/bin/sh
#Colours
red="\033[00;31m"
RED="\033[01;31m"
green="\033[00;32m"
GREEN="\033[01;32m"
yellow="\033[00;33m"
vendor/bin/phpcs -w
vendor/bin/phpmd ./ text phpmd.xml.dist
vendor/bin/phpcpd --exclude=vendor/ --progress ./
vendor/bin/php-cs-fixer fix --dry-run