Skip to content

Instantly share code, notes, and snippets.

View ThatLadyDev's full-sized avatar

Lois Onyinyemme Bassey ThatLadyDev

View GitHub Profile
@ThatLadyDev
ThatLadyDev / configuaration.txt
Created January 5, 2022 12:30
How to setup supervisor after installation on centos environment
Run mkdir /etc/supervisor/ to create a directory to save configuration files.
Go to the newly created directory and run touch laravel-worker.conf (This creates a config file called laravel-worker, you can change this to another name of your choosing).
Once the laravel-worker.conf file is created. Edit its content (use sudo vim laravel-worker.conf) and enter the configuration as shown below:
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /*Location to your laravel project*/artisan queue:work --tries=3
autostart=true
autorestart=true
@ThatLadyDev
ThatLadyDev / .htaccess
Created August 4, 2021 03:04
How to disable .env file from showing in the browser publicly (Laravel)
# Make sure you write the following in the htaccess file of the laravel application
<Files .env>
order allow,deny
Deny from all
</Files>
@ThatLadyDev
ThatLadyDev / supervisor.txt
Last active January 4, 2022 19:42
How to install supervisor on CentOS 7
## yum install supervisor
The above command gave an error at first, the error is found below:
======================================================================================
- Loaded plugins: fastestmirror, universal-hooks
- Loading mirror speeds from cached hostfile
* EA4: 104.219.172.10
* cpanel-addons-production-feed: 104.219.172.10
* cpanel-plugins: 104.219.172.10
* base: mirrors.sonic.net
@ThatLadyDev
ThatLadyDev / GuzzleController.php
Last active July 10, 2021 03:01
How to make a GET request using guzzle with basic authentication (Laravel)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use GuzzleHttp\Client;
class GuzzleController extends Controller
{