Skip to content

Instantly share code, notes, and snippets.

@reyvhernandez
reyvhernandez / gist:fd15229b84d5f064d7a765b168c7e6a7
Created July 28, 2022 08:22
Laravel Valet : fix timeout error
# Very large cookies/headers may throw errors without the following (extremely generous) settings:
fastcgi_buffer_size 4096k;
fastcgi_buffers 128 4096k;
fastcgi_busy_buffers_size 4096k;
@reyvhernandez
reyvhernandez / gist:f9743c3938d6ad540be9810aa48cb0a7
Created September 22, 2021 02:14
Valet NGINX error: 504 Gateway Time-out
Solving this issue is easy: just open the file /usr/local/etc/nginx/valet/valet.conf and add the following lines to the block location ~ \.php$ { }
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
fastcgi_read_timeout 300;
fastcgi_buffers 8 128k;
fastcgi_buffer_size 256k;
@reyvhernandez
reyvhernandez / troubleshooting.md
Created March 23, 2018 12:02 — forked from adamwathan/troubleshooting.md
Troubleshooting Valet on macOS Sierra

Troubleshooting Valet on Sierra

Common Problems

Problem: I just see "It works!"

Apache is running on port 80 and interfering with Valet.

  1. Stop Apache: sudo /usr/sbin/apachectl stop
  2. Restart Valet: valet restart
@reyvhernandez
reyvhernandez / gist:d499c1abc5d8ba85a8785706b180cd90
Last active April 11, 2018 01:14
install / update php via brew
#with oci8 / update friendly
#fix LDAP_OPT_X_SASL_AUTHCID
brew install php72 -with-fpm --with-pear --without-ldap
brew reinstall --build-from-source [email protected] -with-fpm --with-pear --without-ldap
@reyvhernandez
reyvhernandez / ErrorInterceptor.kt
Created January 20, 2018 05:50 — forked from yitz-grocerkey/ErrorInterceptor.kt
Retrofit RxJava global error handling in Kotlin
// for any errors that should be handled before being handed off to RxJava.
// In other words global error logic.
// An example might be 401 when not logging in
import okhttp3.Interceptor
import okhttp3.Response
class ErrorInterceptor: Interceptor {
override fun intercept(chain: Interceptor.Chain?): Response {
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
@reyvhernandez
reyvhernandez / macosx-install-php-oracle-oci8-pdo_oci.md
Created September 26, 2017 05:32 — forked from krisanalfa/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew

Installation

This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).

PHP 5.6 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@reyvhernandez
reyvhernandez / macosx-install-php-oracle-oci8.md
Created September 26, 2017 05:16 — forked from yajra/macosx-install-php-oracle-oci8.md
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8 - homebrew environnement

Installation

This procedure is tested on Mac OS X 10.8 with Developpers tools installed (xCode).

PHP 5.4 installed with Homebrew.

Update: I wrote a blog post about this.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):