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
let colorsSizes = [["Red","Blue","Black"],["M","L","XL"]]; | |
for (let i = 0; i < colorsSizes[0].length; i++) { | |
for (let j = 0; j < colorsSizes[1].length; j++) { | |
console.log(colorsSizes[0][i] + " - " + colorsSizes[1][j]); | |
} | |
} | |
Red - M | |
Red - L | |
Red - XL |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> |
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 apt-get install supervisor | |
sudo systemctl stop supervisor | |
sudo systemctl start supervisor | |
sudo systemctl status supervisor | |
sudo nano /etc/supervisor/conf.d/laravel-queue-project1.conf | |
[program:laravel-queue-project1] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php /var/www/project1/artisan queue:work --queue=default --sleep=3 --tries=3 --max-time=3600 |
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
stages: | |
- build | |
- test | |
- deploy | |
variables: | |
APP_NAME: "your-app-name" | |
SERVER_USER: "your-server-user" | |
SERVER_HOST: "your-server-host" | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} |
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
//////////project composer.json//////////// | |
{ | |
"name": "laravel/laravel", | |
"type": "project", | |
"description": "The skeleton application for the Laravel framework.", | |
"keywords": ["laravel", "framework"], | |
"license": "MIT", | |
"repositories": { | |
"demo-package": { |
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
/** | |
* @return JsonResponse | |
* @throws \Exception | |
*/ | |
public function index(Request $request) | |
{ | |
if ($request->ajax()) { | |
$data = Contact::with(['user'])->where('created_by', self::getUserId()) | |
->orderBy('created_at', 'desc'); | |
return Datatables::of($data) |
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
$template = "I am {{name}}, and I work for {{company}}. I am {{age}} years old."; | |
# Your template tags + replacements | |
$replacements = array( | |
'name' => 'Jeffrey', | |
'company' => 'Microsoft Inc Pvt Ltd.', | |
'age' => 27 | |
); | |
function bind_to_template($replacements, $template) { |
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
LEMP Stack Setup - Ubuntu | |
=================================Install Nginx ========================== | |
sudo apt update | |
sudo apt install nginx | |
sudo ufw status | |
sudo ufw app list | |
i. sudo ufw allow 'Nginx Full' | |
ii. sudo ufw allow 'OpenSSH' |
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
{ | |
"id": 22, | |
"full_name": "Azizul Hakim", | |
"email": "provider1@gmail.com", | |
"phone": "01711111111", | |
"gender": "Female", | |
"role_id": 3, | |
"user_slug": "provider-1", | |
"profile_photo": "https://takecare.ltd/storage/uploads/user_file/service1647145932622d73cc4a0a1.jpg", | |
"speciality_id": 2, |
NewerOlder