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 | |
echo "--------------------------------------------------------------------------------------------" | |
echo "Installing Predis on Ubuntu 18.04" | |
echo "Read more: https://github.com/nrk/predis" | |
echo "Author: Ralf Rottmann | @ralf | http://rottmann.net" | |
echo "--------------------------------------------------------------------------------------------" | |
PHP_CONF_DIR="/etc/php/7.3/apache2/conf.d" | |
echo "Checking prerequisites..." | |
echo "Git available?" | |
[ ! -s /usr/bin/git ] && sudo apt-get -q -y install git || echo "Git already installed." |
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
* -A in SSH enables agent forwarding. | |
* -p 2122 is not needed if you use the default port of 22. | |
* Replace SSH_USER and example.com with your own values. | |
* Example run: $ envoy run deploy_demo | |
* --no-scripts because Laravel composer.json's post-install-cmd includes optimize, which is already done by php artisan dump-autoload | |
@servers(['test' => '-A -p 2122 -l user test.example.com', 'prod' => '-A -p 2122 -l user example.com']) | |
@task('install_test', ['on' => ['test']]) | |
cd project |
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
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk. | |
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config) | |
# -------------------------------- Commands ------------------------------------ | |
# Use "commands" key to execute commands on the EC2 instance. The commands are | |
# processed in alphabetical order by name, and they run before the application | |
# and web server are set up and the application version file is extracted. | |
# ------------------------------------------------------------------------------ | |
commands: | |
01updateComposer: |
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 | |
# this is a work in progress! NOT for production. | |
# requires wp-cli | |
# usage: wp-base-install | |
# or: ./wp-base-install.sh | |
# Bits of inspiration from https://gist.github.com/2853221 | |
# to look at: http://www.servercobra.com/automated-wordpress-install-with-nginx-script/ |
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
.PHONY: install | |
install: clean wordpress phpunit wp-cli | |
git submodule init; | |
@echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:" | |
@echo " mysql -u root -p;" | |
@echo " CREATE DATABASE example_site; \n" | |
wordpress: latest.tar.gz | |
tar -zxvf latest.tar.gz; |
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/sh | |
# WP-CLI Template | |
# @see http://wp-cli.org/ | |
# install | |
curl http://wp-cli.org/installer.sh | bash |
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 | |
class Wedding | |
{ | |
protected $start; | |
protected $end; | |
public function __construct($start = '2013-04-22 09:45', $end = '2013-04-22 10:15') | |
{ | |
$this->start = $start; |