This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Call this command | |
| updatedb | |
| 2. Locate php bin file | |
| locate bin/php | |
| 3. check directories | |
| ls -l /usr/bin/php | |
| 4. Remove current php linking into bin dirctory | |
| rm /usr/bin/php | |
| 5. Create link for php version you want to use it (here is need to back to 7.4 - it must be installed) | |
| ln -s /usr/bin/php7.4 /usr/bin/php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Apache configuration file | |
| # httpd.apache.org/docs/2.2/mod/quickreference.html | |
| # Note .htaccess files are an overhead, this logic should be in your Apache | |
| # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
| # Techniques in here adapted from all over, including: | |
| # Kroc Camen: camendesign.com/.htaccess | |
| # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
| # Sample .htaccess file of CMS MODx: modxcms.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Load css/js | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/sweetalert2/5.3.8/sweetalert2.css"/> | |
| <script src="https://cdn.jsdelivr.net/sweetalert2/5.3.8/sweetalert2.js"></script> | |
| 2. Define function | |
| const showLoading = function() { | |
| swal({ | |
| title: '', | |
| text: '<b>Be patient.</b><br/>This might take a few moments to load chatbot questions.', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Install mongodb extention - Windows | |
| --- | |
| 1. Download php_mongodb.dll from pecl mongodb php - latest stable dll | |
| 2. Put that DLL to localhost Xampp/php/ext | |
| 3. add line to php.ini - extension=php_mongodb.dll | |
| 4. restart Xampp server. | |
| Download Mongodb Compass for local software to check Data | |
| ------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0. Import this to controller | |
| use Intervention\Image\ImageManagerStatic as Image; | |
| use Storage; | |
| use File; | |
| 1. Use this function to convert to specific ratio | |
| // path like /var/www/html/testproject/storage/app/public/item_images/64c100497075c4c6c1075b89 | |
| // filename - jatin.png | |
| // $width, $height - pass to required size | |
| // $maintain_ratio - same image size is require or not - other wise it will give $height * $image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. **************************************** Import CSV ************************************* | |
| public static function importCsv() | |
| { | |
| $file = public_path('file/test.csv'); | |
| $customerArr = $this->csvToArray($file); | |
| echo "<pre>"; | |
| for ($i = 0; $i < count($customerArr); $i ++){ | |
| print_r($customerArr[$i]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error: | |
| dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. | |
| Errors we re encountered while processing: mysql-server-8.0 mysql-server E: Sub-process /usr/bin/dpkg returned an error code | |
| Step to encount the error: | |
| 1. sudo apt-get clean | |
| 2. sudo apt-get purge mysql* | |
| 3. sudo apt-get updateYou10:58 | |
| 4. sudo apt-get purge mysql* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. create repo to bitbucket. | |
| 2. Enable pipeline from repo settings. | |
| 3. create 2 files to current repo. (bitbucket-pipelines.yml and execute.sh) | |
| 4. Now commit any push to local pc and you can navigate to pipeline page to repo. | |
| Create repo pipeline environment variables to repository settings. | |
| ****************************************************************** | |
| 1. DEPLOY_USER_J -> write server username for login | |
| root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Here are basic steps to integrate Bitbucket pipeline - where project is already setuped to server. | |
| *********Here is test to yml validtor - https://bitbucket-pipelines.atlassian.io/validator | |
| Create varibles into bitbucket repo settings | |
| ************************************************* | |
| REPO_ORIGIN_URL -> url to git pull with username and password | |
| https://username:[email protected]/workspace/projectreponame.git | |
| DEPLOY_USER_J -> server username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to set-up your Google reCAPTCHA account? | |
| Before you can use reCAPTCHA, you need to set-up an account. | |
| Once you have your account, you need to add your website domain and obtain a site key and a secret key. | |
| Step 1. Go to the "Admin" page (click the admin button on the top right of the page). | |
| Step 2. Click on the + (plus) symbol on the top bar to create a new site | |
| Step 3. Add a label, for example, add your domain name. | |
| Step 4. Pick the reCAPTCHA type. Pick 'reCAPTCHA v3'. | |
| Step 5. Enter your website domain name |