Skip to content

Instantly share code, notes, and snippets.

@stijnh92
stijnh92 / S3v2ServiceProvider.php
Last active April 16, 2018 08:04
S3 version 2 compatible storage driver for Laravel 5.1+
<?php
/**
* @file
* Usage:
* 1. remove the V3 AWS PHP sdk when present
* composer remove "league/flysystem-aws-s3-v3"
* 2. install the V3 AWS PHP sdk when present
* composer require "league/flysystem-aws-s3-v2"
* 3. Add the provider to your config/app.php:
@stijnh92
stijnh92 / .lando.yml
Last active March 27, 2019 09:35
Lando YAML configuration for Odoo 8.0
# ---
# Update your odoo code so the root user check is disabled. (openerp/cli/server.py:52 (check_root_user())
#
# Before running `lando start` comment the `command` line.
# When this is done, uncomment the `command` line and then run `lando restart`.
#
# Next, run `docker ps` to check on what external port the odoo service (internal 8069) is running.
# ---
name: odoo
services:
@stijnh92
stijnh92 / config - app.php
Last active May 16, 2018 10:55
Laravel logging configuration to send logs to PHP error log. (<= Laravel 5.5)
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
@stijnh92
stijnh92 / logging.php
Last active May 16, 2018 10:56
Laravel logging configuration to send logs to PHP error log. (>= Laravel 5.6)
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
@stijnh92
stijnh92 / .htaccess
Created July 19, 2018 14:51
Redirect non-www to www url
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ %{HTTP:X-Forwarded-Proto}://www.%{HTTP_HOST}/$1 [R=301,L]
@stijnh92
stijnh92 / config.yml
Last active October 15, 2020 18:47
Logging configuration to send monolog logs to PHP error log
# By default, Symfony logs will not appear by default in the logs on the DeltaBlue.Cloud platform.
# When using Monolog, you can add a handler with type set to `error_log`.
# This will send all logs to the PHP error logs, and will let the platform indext it to show them.
monolog:
handlers:
main:
type: error_log
level: debug