Categories
Technical

What is the best practice for naming a REST endpoint ?

Lowercase letters and dashes

By convention, resource names should use exclusively lowercase letters. Similarly, dashes (-) are conventionally used in place of underscores (_).

Example: /users/{id}/pending-orders instead of /users/{id}/Pending_Orders

Source of information

Using a hyphen in your URLs is recommended by Google, because it makes your website easy to read for humans. As an end result, this means that your site will place better on search engines. Are you looking to learn more about how to improve the SEO of your blog?

Categories
General

How to fix wordpress Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /wp-includes/plugin.php on line xxx?

Solution is to add the following line below to this file wp-config.php

define( 'WP_MEMORY_LIMIT', '256M' );
Categories
General

How to access cloud Magento Dasboard ?

Here is the link to access Magento cloud dashboard

https://us-3.magento.cloud/projects

Categories
Satori Architect

How to fix Satori issue 80040421 ?

The problem 80040421 is not always Unable to allocate any sequence numbers

This time the problem was missing permits to execute the presorting of the requests

The solution is to make sure these permits exists and the problem will go away

Also, If you have already done the configuration in the past know that the configuration file exists in the following folder C:/WINDOWS

The file name is mrtk.ini 

Categories
AWS

How to make AWS Snapshot backup ?

The top priority of a developer is to have backups at any point of time.

To have peace of mind I suggest the followingsteps proposed by Amazon AWS when having an EC2 instance

https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/TakeScheduledSnapshot.html

Categories
Technical

How to Make your websites stronger against DDOS ?

I found myself dealing with web server being down, being daily attacked online. My remedy to all of these problems is cloudfare

cloudfare
cloudfare
cloudfare ddos
cloudfare ddos
Categories
Unix

How to start a httpd service when rebooting linux ?

How to make sure your service starts when you server reboot? It is practical so you do not have to ssh into your machine everytime you want to start your web server. Find below the command used for that effect

sudo chkconfig --levels 0123456 httpd on

Here explanation of levels

0   Halt
1   Single-User mode
2   Multi-user mode console logins only (without networking)
3   Multi-User mode, console logins only
4   Not used/User-definable
5   Multi-User mode, with display manager as well as console logins (X11)
6   Reboot

Make it happen – Automate things become a senior software engineer

Categories
General

How to Force/change default homepage of Laravel Nova ?

To Force the redirect of Laravel Nova I proceeded with modifications

#1 – Remove the default route definition

routes/web.php
routes/web.php

#2 – Address the ‘/nova’ path to just ‘/’

config/nova.php
config/nova.php
Categories
Technical

How to check the Health Status of your servers for free ?

It has been on my mind for a long time … How to get notified when one of my web properties go down . I found this amazing free website tool called UPTIME ROBOT – Get notified for free and stay on the top of your business

https://uptimerobot.com/

uptimerobot
uptimerobot moniotor server health

Categories
Laravel

How to force Laravel to return SSL connection calls ?

It has been a pretty long day as I was struggling to get a Laravel application to return SSL or HTTPS connections. I was put in this situation because the SysOp team of my company placed the laravel app behind a loadbalancer accepting SSL connections but converting these connection to HTTP.

It seems trivial but it did mess with the laravel application that relies on the incoming protocol to define login/logout url pages for instances

After messing up and discovering TrustProxies I found an easy solution with

Here is my solution , open the file app/Providers/AppServiceProvider.php

And add the following line URL::forceScheme('https');

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
      URL::forceScheme('https');
    }
}