Skip to content

Instantly share code, notes, and snippets.

<?php
// This class creates a custom Hamcrest matcher to match on the attributes of a laravel model
// Can be used with mockery in order to verify that the expected model is used with calling a function
//
//
// Usage:
//
// ClassYouWantToTest::shouldReceive('functionToTest')
// ->withArgs([laravelModelEquals($laravelModelToVerify)])
// ->times(1);
@harshpatel991
harshpatel991 / https-instance.config
Last active August 2, 2017 14:08
AWS Elastic Beanstalk config for signed SSL certificate using a single instance with Lets Encrypt certbot and apache.
# This will setup a hardened SSL/TLS for an Elastic Beanstalk application configured to use a single EC2 instance using Apache
# This configuration should get you an A on the Qualys SSL Server Test.
# This configuration will continue to serve unsecure requests on port 80.
# Be sure to verify you are using the latest version of your platform in Elastic Beanstalk.
# The following Environment Properties are *required* to be set:
# CERT_EMAIL - this is the email address passed to certbot-auto
# SERVER_DOMAIN - the DNS name that will be assoicated with the certificate (ex: domain.com)