Categories
Apache Technical

How to install Jmeter on a macBook ?

Here is the command line used to install Jmeter on my macbook

brew install jmeter

and here is how to open Jmeter

jemter

Categories
Technical

How to fix wooCommerce gallery images not showing on Chrome browsers ?

My solution was to deactivate all wordpress plugins except WooCommerce and WooComerce Admin. It turns out that WP Super Cache and maybe WP-Optimize – Clean, Compress, Cache were breaking the image gallery

Categories
Technical

My Cronjob (restart database and apache clean logs cronjob configuration)

Find below cronjob that restart apache server, mysql server and clean httpd logs

 SHELL=/bin/bash
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 MAILTO=root
 HOME=/
 

 # For details see man 4 crontabs
 

 # Example of job definition:
 # .---------------- minute (0 - 59)
 # |  .------------- hour (0 - 23)
 # |  |  .---------- day of month (1 - 31)
 # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
 # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
 # |  |  |  |  |
 # *  *  *  *  * user-name command to be executed
   */30  *  *  *  *       root /etc/init.d/httpd restart > /dev/null 2>&1
   */30  *  *  *  *       root /etc/init.d/mysqld restart > /dev/null 2>&1
   */30  *  *  *  *       root /bin/find  /var/log/httpd/*.log -mtime +7 -exec rm -f {} \; 
Categories
Technical

brew Error: Directory not empty @ dir_s_rmdir – /private/tmp/d20210315-27447-1b2auy5

chown davidr:wheel /private/tmp/

fixed my issue

Categories
Technical

How to fix ? Symfony\Component\Debug\Exception\FatalErrorException Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs)

How to fix ?

Symfony\Component\Debug\Exception\FatalErrorExceptionDeclaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs)

#1 – I removed from composer.json the following line

"doctrine/dbal": "^2.10",

#2 – Run composer upgrade

#3 – Run composer upgrade

Voila Job Done !

Categories
Technical

How to switch PHP version on a mac with brew?

$ brew unlink [email protected] 

$ brew install [email protected]
$ brew link [email protected] --force --overwrite
Categories
Technical

Install MacOs softwares From Scratch for PHP developer

Install Composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

php composer-setup.php

php -r "unlink('composer-setup.php');"

Make Composer Global

mv composer.phar /usr/local/bin/composer

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Valet

To get started, you first need to ensure that Homebrew is up to date using the update command:

brew update

Next, you should use Homebrew to install PHP:

brew install php

After installing PHP, you are ready to install the Composer package manager. In addition, you should make sure the ~/.composer/vendor/bin directory is in your system’s “PATH”.

export PATH="$PATH:$HOME/.composer/vendor/bin"

After Composer has been installed, you may install Laravel Valet as a global Composer package:

composer global require laravel/valet

Finally, you may execute Valet’s install command. This will configure and install Valet and DnsMasq. In addition, the daemons Valet depends on will be configured to launch when your system starts:

valet install

Once Valet is installed, try pinging any *.test domain on your terminal using a command such as ping foobar.test. If Valet is installed correctly you should see this domain responding on 127.0.0.1.

Valet will automatically start its required services each time your machine boots.

PHP Versions

Valet allows you to switch PHP versions using the valet use [email protected] command. Valet will install the specified PHP version via Homebrew if it is not already installed:

valet use [email protected]

valet use php
Categories
Technical

+10,000 Downloads QuickLogs – Log Parser ! Yoohooo !

Demo : quicklogs.raleche.com

quicklogs

Useful if you are working from scratch on some projects and you find yourself without a quick interface to review the error logs produced. This package yana/dr comes with a quick authentication system called QuickAuth.

In 3 steps :

#1 – Install composer Package

composer require yana/dr

#2 – Update configuration file to read the log from [Yana/Logs/conf.php]

'error_log_path' => '/var/log/php-fpm/www-error.log',

#3 – Create the path/directory to visualize your logs and copy the following files

/public/log

Download here : https://packagist.org/packages/yana/dr

Quick Auth

David Raleche QuickAuth
David Raleche QuickAuth
david raleche quicklogs
david raleche quicklogs
quickAuth by David Raleche
quickAuth by David Raleche
Categories
Technical

High 5 Games – Innovation

I had fun innovating directly with the facebook team at Menlo Park ! These many travels between high5games office located at the time in the world trade center 59th floor in New York and Facebook headquarter in Menlo Park were not lost ! Many years later our work still speaks volume ! Customer Experience was paramount in our unstoppable success !

Facebook API

Facebook Api, Facebook Payment, Facebook Authentication

Categories
Technical

Amazon Principles

— This is great for other companies to be inspired —

Leadership Principles

We use our Leadership Principles every day, whether we’re discussing ideas for new projects or deciding on the best approach to solving a problem. It is just one of the things that makes Amazon peculiar.

Customer Obsession

Leaders start with the customer and work backwards. They work vigorously to earn and keep customer trust. Although leaders pay attention to competitors, they obsess over customers.

Ownership

Leaders are owners. They think long term and don’t sacrifice long-term value for short-term results. They act on behalf of the entire company, beyond just their own team. They never say “that’s not my job.”

Invent and Simplify

Leaders expect and require innovation and invention from their teams and always find ways to simplify. They are externally aware, look for new ideas from everywhere, and are not limited by “not invented here.” As we do new things, we accept that we may be misunderstood for long periods of time.

Are Right, A Lot

Leaders are right a lot. They have strong judgment and good instincts. They seek diverse perspectives and work to disconfirm their beliefs.

Learn and Be Curious

Leaders are never done learning and always seek to improve themselves. They are curious about new possibilities and act to explore them.

Hire and Develop the Best

Leaders raise the performance bar with every hire and promotion. They recognize exceptional talent, and willingly move them throughout the organization. Leaders develop leaders and take seriously their role in coaching others. We work on behalf of our people to invent mechanisms for development like Career Choice.

Insist on the Highest Standards

Leaders have relentlessly high standards — many people may think these standards are unreasonably high. Leaders are continually raising the bar and drive their teams to deliver high quality products, services, and processes. Leaders ensure that defects do not get sent down the line and that problems are fixed so they stay fixed.

Think Big

Thinking small is a self-fulfilling prophecy. Leaders create and communicate a bold direction that inspires results. They think differently and look around corners for ways to serve customers.

Bias for Action

Speed matters in business. Many decisions and actions are reversible and do not need extensive study. We value calculated risk taking. 

Frugality

Accomplish more with less. Constraints breed resourcefulness, self-sufficiency, and invention. There are no extra points for growing headcount, budget size, or fixed expense.

Earn Trust

Leaders listen attentively, speak candidly, and treat others respectfully. They are vocally self-critical, even when doing so is awkward or embarrassing. Leaders do not believe their or their team’s body odor smells of perfume. They benchmark themselves and their teams against the best.

Dive Deep

Leaders operate at all levels, stay connected to the details, audit frequently, and are skeptical when metrics and anecdote differ. No task is beneath them.

Have Backbone; Disagree and Commit

Leaders are obligated to respectfully challenge decisions when they disagree, even when doing so is uncomfortable or exhausting. Leaders have conviction and are tenacious. They do not compromise for the sake of social cohesion. Once a decision is determined, they commit wholly.

Deliver Results

Leaders focus on the key inputs for their business and deliver them with the right quality and in a timely fashion. Despite setbacks, they rise to the occasion and never settle.