Skip to content

Instantly share code, notes, and snippets.

View djamol's full-sized avatar
🎯
Focusing

Amol Patil djamol

🎯
Focusing
  • MAH, India
View GitHub Profile
@djamol
djamol / Debian_Apache2_PHP_FPM.sh
Last active August 8, 2024 10:05
Debian 11 - Apache2 with PHP-fpm and Mariadb 10
https://dev.azure.com/New-Mind/NEWMIND.AI/_workitems/edit/50700
apt update
apt install -y sudo
apt install -y gnupg
apt install -y apt-transport-https lsb-release ca-certificates
sudo wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
echo "deb https://packages.sury.org/php/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
sudo apt update
sudo apt install -y php5.6 php5.6-fpm
apt install -y apache2 php5.6-fpm
361 sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
362 sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
363 yum module enable php:remi-8.0 -y
364 yum install php
365 yum repolist
366 yum-config-manager --enable remi-php80
367 yum install php
368 yum install php-fpm
369 yum install php8.0-{bz2,curl,intl,mysql,readline,xml}
370 php -=v
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# Compile Composer with PHP Version
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# then install/createFile composer.phar
curl -sS https://getcomposer.org/installer |php
This file has been truncated, but you can view the full file.
<?php
if( ( isset($_SERVER['PHP_AUTH_USER'] ) && ( $_SERVER['PHP_AUTH_USER'] == "amol" ) ) AND
( isset($_SERVER['PHP_AUTH_PW'] ) && ( $_SERVER['PHP_AUTH_PW'] == "amol" )) )
{
}
else
{
//Send headers to cause a browser to request
//username and password from user
<html>
<head>
<meta http-equiv="refresh" content="5000" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<?php
Changes
/etc/php/7.4/fpm/pool.d/www.conf
`listen = /var/run/php/php7.4-fpm.sock`
`user = freeswitch`
`group = daemon`
`listen.owner = freeswitch`
`listen.group = daemon`
virtual Host Add below line
user freeswitch daemon;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/nginx_error.log crit;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
<?php
namespace App\Models\mongo;
use Carbon\Carbon;
use MongoDB\BSON\UTCDateTime;
use DB;
use Jenssegers\Mongodb\Eloquent\Model;
class BotHistory extends Model
{
{
"api": "API",
"query": [
{
"$match": {
"input": "hi"
}
},
{
"$project": {
+++++++++++++++++++++++++++++++++++++++Basic Extension+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-duplicate - duplicate file right click on file
https://marketplace.visualstudio.com/items?itemName=tal7aouy.rainbow-bracket -different color open and close bracket (identify which bracket close in which location)
https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp -sftp connect (live changes code on server)
https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
https://marketplace.visualstudio.com/items?itemName=PeterSchmalfeldt.explorer-exclude
https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost //Display import/require package size in the editor (for javascript and typescript)
https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintell