Programming

Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result.

Programming involves tasks such as: analysis, generating algorithms, profiling algorithms’ accuracy and resource consumption, and the implementation of algorithms in a chosen programming language (commonly referred to as coding).

Convert given MySQL date string into a different format.

Convert from MySQL datetime to another format with PHP $format should be a PHP date format string. ‘U’ and ‘G’ formats will return a sum of timestamp with timezone offset. $date is expected to be local time in MySQL format (Y-m-d H:i:s). Historically UTC time could be passed to the function to produce Unix timestamp. If $translate is true then …

Convert given MySQL date string into a different format. Read More »

Basic composer cheatsheet

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Updating packages composer update Updates all packages composer update –with-dependencies Updates all packages and its dependencies composer update vendor/package Updates a certain package from vendor composer update vendor/* Updates all …

Basic composer cheatsheet Read More »

Reusable Laravel Routing patterns

If you would like a route parameter to always be constrained by a given regular expression, you may use the pattern method. You should define these patterns in the boot method of your App\Providers\RouteServiceProvider class: Below are handy list of patterns that you can reuse them everywhere: make more of your own to suit your needs: email, password Once the pattern …

Reusable Laravel Routing patterns Read More »

How to integrate the AWS SDK with other HTTP clients

The http_handler option is used to integrate the SDK with other HTTP clients. An http_handler option is a function that accepts a Psr\Http\Message\RequestInterface object and an array of http options applied to the command, and returns a GuzzleHttp\Promise\PromiseInterface object that is fulfilled with a Psr\Http\Message\ResponseInterface object or rejected with an array of the following exception data: exception – (\Exception) the exception that was encountered. response – (Psr\Http\Message\ResponseInterface) the response …

How to integrate the AWS SDK with other HTTP clients Read More »

How to use scheme in aws S3Client

URI scheme to use when connecting. The SDK uses “https” endpoints (i.e., uses SSL/TLS connections) by default. You can attempt to connect to a service over an unencrypted “http” endpoint by setting scheme to “http”. See the AWS Regions and Endpoints for a list of endpoints and whether a service supports the http scheme.

How to Remove Directories and Files Using Linux Command Line

How to Remove Directories (Folders) You can remove or delete directories or folder  with the rmdir and rm in in linux,. Here are examples to help you delete either file or folder. Enjoy. To remove an empty directory, use either rmdir or rm -d followed by the directory name: To remove non-empty directories and all the files within them, use the rm command with the-r (recursive) …

How to Remove Directories and Files Using Linux Command Line Read More »