This file contains 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 Add the Ondrej PPA Repository | |
PHP 7.4 is the default PHP version in Ubuntu 20.04 repositories at the time of writing this tutorial. We will use the Ondrej PPA repositories to install the latest version of PHP. This repository contains multiple PHP versions and PHP extensions. | |
First, let’s update your Ubuntu system packages and install some dependencies as shown below. | |
$ sudo apt update | |
$ sudo apt upgrade | |
# Allow apt to use the repository via HTTPS |
This file contains 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’s a simple example of how to use axios.all to make simultaneous HTTP requests: | |
// execute simultaneous requests | |
axios.all([ | |
axios.get('https://api.github.com/users/mapbox'), | |
axios.get('https://api.github.com/users/phantomjs') | |
]) | |
.then(responseArr => { | |
//this will be executed only when all requests are complete | |
console.log('Date created: ', responseArr[0].data.created_at); |
This file contains 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
createTag: function (params) { | |
return { | |
id: params.term, | |
text: params.term, | |
newOption: true | |
} | |
}, | |
templateResult: function (data) { | |
var $result = $("<span></span>"); |
This file contains 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
unzip the sql file then upload directory to the database using pipeline command | |
gunzip -c /filepath.gz | mysql -u username -p database_name |
This file contains 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
A bit late, but to anyone who is wondering why they are getting the "Warning: Cannot use a scalar value as an array" message; | |
the reason is because somewhere you have first declared your variable with a normal integer or string and then later you are trying to turn it into an array. | |
hope that helps |
This file contains 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
const { isArray } = require("lodash"); | |
$('select').each(function() { | |
let _this = $(this) | |
let selected = $(this).data('selected'); | |
if (isArray(selected)) { | |
selected.forEach(element => { | |
_this.val(element).prop('selected', 'selected') |
This file contains 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
sudo usermod -a -G www-data $USER | |
sudo chown root:root /var/www | |
sudo chmod -R 755 /var/www | |
sudo chown -R www-data:www-data /var/www/* | |
You can do the all the recommended steps in just 3 commands instead of 8 commands: |
This file contains 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
<Directory /var/www/html/xgroup> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> |
This file contains 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
Complete Installation and Configuration of Apache2, Multiple PHP, MariaDB, phpMyAdmin, LetsEncrypt, | |
HTTP/2, IonCube, Postfix, Dovecot, SPF, DKIM, Roundcube Webmail and | |
Files Permission Commands on Ubuntu 18.04 and 18.10 Web Server | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
This is a complete Ubuntu Linux based web server for Website, PHP, SSL, TLS, Database and Email hosting purpose. | |
Built with the below components for good performance. Also, I tried to make it as secure as possible. |
This file contains 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
$districts = array( | |
array('id' => '1','created_by' => '1','updated_by' => '1','name' => 'Natore','created_at' => '2021-09-08 17:11:24','updated_at' => '2021-09-08 17:11:24'), | |
array('id' => '2','created_by' => '1','updated_by' => '1','name' => 'Naogan','created_at' => '2021-09-08 17:11:24','updated_at' => '2021-09-11 18:16:11'), | |
array('id' => '3','created_by' => '1','updated_by' => '1','name' => 'Chuadanga','created_at' => '2021-09-08 17:11:24','updated_at' => '2021-09-08 17:11:24'), | |
array('id' => '4','created_by' => '1','updated_by' => '1','name' => 'Chittagong','created_at' => '2021-09-08 17:11:24','updated_at' => '2021-09-08 17:11:24'), | |
array('id' => '5','created_by' => '1','updated_by' => '1','name' => 'Bogra','created_at' => '2021-09-08 17:11:24','updated_at' => '2021-09-08 17:11:24'), | |
array('id' => '6','created_by' => '1','updated_by' => '1','name' => 'Sylhet','created_at' => '2021-09-08 17:11:24','updated_at' => '2021-09-08 17:11:24'), | |
array('id' => '7','created_by' => '1','updated_by' => |
NewerOlder