This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC] | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
This file contains 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
[idealstack] | |
aws_account_id = 440805312024 | |
[idealstackidentity] | |
role_arn = arn:aws:iam::440805312024:role/IdealstackAdminRole | |
source_profile = idealstack | |
region = us-west-2 | |
color = 3D9970 | |
[idealstacksandpit] |
This file contains 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
[idealstack] | |
aws_account_id = 440805312024 | |
[idealstackidentity] | |
role_arn = arn:aws:iam::440805312024:role/IdealstackAdminRole | |
source_profile = idealstack | |
region = us-west-2 | |
color = 3D9970 | |
[idealstacksandpit] |
This file contains 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
#Install moodle via commandline | |
if [[ -z $5 ]]; then | |
echo "Usage $0 url dbhost dbname dbuser dbpass" | |
exit 1 | |
fi | |
cd ~ | |
curl -O https://download.moodle.org/download.php/direct/stable38/moodle-3.8.1.tgz | |
tar -xzf moodle-3.8.1.tgz | |
shopt -s dotglob nullglob |
This file contains 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 | |
if [[ -z $5 ]]; then | |
echo "Usage $0 url dbhost dbname dbuser dbpass" | |
exit 1 | |
fi | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
mkdir ~/bin |
This file contains 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 | |
#Copyright 2017-2019, Idealstack Limited | |
# | |
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
#documentation files (the "Software"), to deal in the Software without restriction, including without limitation | |
#the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | |
#and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# | |
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# |
This file contains 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
#To run this add something like this to your Vagrantfile: | |
# | |
# | |
# config.vm.provision "shell", inline: <<-SHELL | |
# # Default Vagrant LAMP stack https://gist.github.com/jonathonsim/2cfdafc876984f6a6a0bdb35ebd9a74f | |
# export VAGRANT_DIR=/var/www/html #We mount an nfs share here, along with the regular vagrant share on /vagrant, as nfs is faster. But it has weird behaviour with some apps as well | |
# curl https://gist.githubusercontent.com/jonathonsim/2cfdafc876984f6a6a0bdb35ebd9a74f/raw/ | bash | |
# SHELL | |
# | |
# |
This file contains 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
#To use: | |
# (assuming you trust it): | |
#curl https://gist.githubusercontent.com/jonathonsim/6a5b25a4bebf2badde9a10740476fc3a/raw/ | bash | |
export DEBIAN_FRONTEND=noninteractive | |
#Use local mirrors | |
echo "deb http://nz.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" > /etc/apt/sources.list && \ | |
echo "deb http://nz.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list && \ | |
echo "deb http://nz.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse" >> /etc/apt/sources.list |
This file contains 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 | |
/** | |
* Idealstack Healthcheck. | |
* | |
* This file is checked by the load balancer to see whether the site is healthy. | |
* If it returns a 500 error the site is considered unhealthy, and the site's container | |
* will be rebooted. | |
* | |
* This default check doesn't do much except check that PHP is running. | |
* You can customise this file to check other important resources |
This file contains 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
#To use: | |
# (assuming you trust it): | |
#curl https://gist.githubusercontent.com/jonathonsim/cc286f3baed66faed69e3be2d4608858/raw/ | bash | |
cd ~ | |
chmod 777 ~/bin/* | |
cat > ~/.bash_profile <<'EOF' | |
# source the users bashrc if it exists | |
if [ -f "${HOME}/.bashrc" ] ; then | |
source "${HOME}/.bashrc" |
NewerOlder