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
# Delete everything we don't need. | |
ls | egrep -v 'AmazeeLabs|patches|down.sh|up.sh' | xargs rm -rf | |
# Kill any D8 router processes. | |
PID=$(ps -ef | grep d8-rs-router.php | grep -v grep | awk '{print $2}') | |
echo $PID | |
if [ "$PID" ]; then | |
kill $PID | |
fi | |
# Clear the Composer cache so we get the latest patches etc. | |
COMPOSER_MEMORY_LIMIT=-1 composer clear-cache |
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 | |
require_once dirname(__DIR__) . '/vendor/autoload.php'; | |
use Silex\Application; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
$app = new Silex\Application(); |
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 | |
sudo apt-get update | |
echo ' | |
/$$$$$$ /$$ /$$ | |
/$$__ $$ | $$ | $$ | |
| $$ \__/ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ | |
| $$$$$$ /$$__ $$| $$__ $$ /$$__ $$ | $$__ $$| $$ | $$ /$$__ $$ /$$__ $$ /$$_____/ | |
\____ $$| $$$$$$$$| $$ \ $$| $$ | $$ | $$ \ $$| $$ | $$| $$ | $$| $$$$$$$$| $$$$$$ |
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
Jamies-MBP:gdms jamiehollern$ vagrant up | |
Bringing machine 'gdms' up with 'virtualbox' provider... | |
==> gdms: Importing base box 'geerlingguy/ubuntu1604'... | |
==> gdms: Matching MAC address for NAT networking... | |
==> gdms: Checking if box 'geerlingguy/ubuntu1604' is up to date... | |
==> gdms: Setting the name of the VM: gdms.dev | |
==> gdms: Clearing any previously set network interfaces... | |
==> gdms: Preparing network interfaces based on configuration... | |
gdms: Adapter 1: nat | |
gdms: Adapter 2: hostonly |
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
jamiemacbook:test-cms-fork jamie.hollern$ vagrant up | |
Bringing machine 'test-cms' up with 'virtualbox' provider... | |
==> test-cms: Cloning VM... | |
==> test-cms: Matching MAC address for NAT networking... | |
==> test-cms: Setting the name of the VM: test-cms.local | |
==> test-cms: Clearing any previously set network interfaces... | |
==> test-cms: Preparing network interfaces based on configuration... | |
test-cms: Adapter 1: nat | |
test-cms: Adapter 2: hostonly | |
==> test-cms: Forwarding ports... |
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 | |
// Config import shortcuts. | |
$dirs = array( | |
'base', | |
'dev', | |
'stage', | |
'prod', | |
); | |
foreach ($dirs as $dir) { |
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 | |
// Sample user agent strings available at http://www.webapps-online.com/online-tools/user-agent-strings/dv/operatingsystem51849/ios. | |
$user_agent = 'Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B511 Safari/9537.53'; | |
// Returns 7.0 with the above user agent string. | |
$version = preg_replace("/(.+)(iPhone|iPad|iPod)(.+)OS[\s|\_](\d)\_?(\d)?[\_]?(\d)?.+/i", "$4.$5", $user_agent); |