Categories
General

How to see files that have been resolved with GIT ?

Here is the command

git log -p -c or git log -p --cc

Categories
General

on a MAC with Valet : How to fix *18 upstream timed out (60: Operation timed out) ?

2022/07/31 01:38:52 [error] 4425#0: *18 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: “GET /v1/facilitycountdown HTTP/1.1”, upstream: “fastcgi://unix:/Users/davidr/.config/valet/valet.sock”, host: “web.test”

SOLUTION

System permision issues and fasCgi fix in nginx conf file

start valet with SUDO

sudo valet start

Start your unit test with SUDO

sudo vendor/bin/phpunit

NGINX FIX

vim /usr/local/etc/nginx/valet/valet.conf
location ~ [^/]\.php(/|$) {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;
            fastcgi_read_timeout 600;
            fastcgi_send_timeout 600;
            fastcgi_connect_timeout 600;
            fastcgi_buffers 8 32k;
            fastcgi_buffer_size 32k;
            include fastcgi_params;

.........
Categories
General

How to restart/start pgbouncer on a mac?

brew services restart pgbouncer

Categories
General

How to fix : PHP Fatal error: Call to undefined function yaml_parse_file() ?

remove the double quote ” in php.ini

REPLACE

extension=”yaml.so”

WITH

extension=yaml.so

Categories
General

How to install ext-yaml on Mac?

How to solve following problem ?

Problem 2
– Root composer.json requires PHP extension ext-yaml * but it is missing from your system. Install or enable PHP’s yaml extension.
Problem 3
– Root composer.json requires fourover/sdk 0.1.3 -> satisfiable by fourover/sdk[v0.1.3].
– fourover/sdk v0.1.3 requires ext-yaml * -> it is missing from your system. Install or enable PHP’s yaml extension.

Execute 2 commands below

brew install libyaml
pecl install libyam
l

Result of the execution of the commands above

Build process completed successfully
Installing '/usr/local/Cellar/[email protected]/8.0.21/pecl/20200930/yaml.so'
install ok: channel://pecl.php.net/yaml-2.2.2
Extension yaml enabled in php.ini

Categories
General

GIT Trunk based strategy for merging ticket/branches

So as a tech lead, we ahve to review code before deployment

The challenges are

  • How to have clean merges up to prod (higher environment)?

The solution found was to use GIT SQUASH instead of git merge as it combines all sub commits to only one final commit in the log history

  • How to have clean merges, down to the development branch ?

The solution found, is to use GIT MERGE instead of git squash against the dev environment after successful deployment to PROD

as the git log history stays intact and merging keep records straight

Categories
General

How to see files changed in a git commit ?

git show –stat –oneline <commitNumber>

Categories
General

Why The response is not a valid JSON response. ? when trying to upload image on wordpress ?

The response is not a valid JSON response.

The file is too big

You need to compress/export the file in a lighter weight

such as

Categories
General

Why macBook pro does not detect 2nd / 3rd monitor ?

Check how many displays you can connect

If you’re connecting multiple displays to your Mac, use the Tech Specs page to find out how many external displays your Mac supports.

  1. Choose Apple menu  > About This Mac, double-click your serial number, then press Command-C to copy it.
  2. Go to the Tech Specs page, click the Search Tech Specs bar, press Command-V to enter your computer’s serial number, then click Search.
  3. Click the specs page for your Mac. The number of displays your Mac supports appears under Video Support or Graphics.
Categories
General

Laravel how to resolve search_path ?

Illuminate\Database\QueryException
SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at end of input LINE 1: SET search_path TO ^ (SQL: SET search_path TO )

solution add to config/database.php

    'default' => env('DB_CONNECTION', 'pgsql-raleche'),

    'search_path' => 'mapi_admin_tool,api,product,public,trade,ws,eddm',