Web Servers & Tools
Use Token to use Github
Use Token to use Github
1- first create your token from this link "https://github.com/settings/tokens"
2- you need to add the token into the repo URL like this
git remote set-url origin https://{githubtoken}@github.com/{username}/{repositoryname}.git
while
While cloning:
git clone https://{username}:{githubtoken}@github.com/{username}/{repositoryname}.git
update composer to specifc version
You can use this command to update the composer into a specifc version
composer self-update 1.4.1
Block Some Bots using htaccess
A lot of time we get many requests from some bots we do not need here you can block them from htaccess file
<IfModule mod_setenvif.c> SetEnvIfNoCase User-Agent (SemrushBot|Semrush|python-requests|sqlmap|wordpress|apachebench) bad_user_agents Order Allow,Deny Allow from all Deny from env=bad_user_agents </IfModule>
Install Certbot on nginx with Centos 8
Step 1 — Installing the Certbot Let’s Encrypt Client
To use Let’s Encrypt to obtain an SSL certificate, you first need to install Certbot and mod_ssl
, an Apache module that provides support for SSLv3 encryption.
Install Certbot on apache with Centos 8
Step 1 — Installing the Certbot Let’s Encrypt Client
To use Let’s Encrypt to obtain an SSL certificate, you first need to install Certbot and mod_ssl
, an Apache module that provides support for SSLv3 encryption.
Optimize File Classes with Composer: A Comprehensive Guide
Are you seeking optimal performance for your files and classes within your PHP projects? Look no further than Composer, your go-to tool for seamless optimization.
Check if the Elasticsearch is installed
To display the status of the Elasticseach please use this command
curl -X GET 'localhost:9200/_cat/health?v&pretty'
Display Elasticsearch plugins SSH Command Line
to display the current installed Elasticsearch plugin use this command
curl -X GET "localhost:9200/_cat/plugins?v&s=component&h=name,component,version,description&pretty"
Ignore whole Directory and allow only some folders
This wiki will help you add specific directories in the parent directory
Lets say you have two directories
- app
- vendor
in "app" directory there are three folders
app/dir1
app/dir2
app/dir3
app/etc
in "vendor" directory there are three folders as well
vendor/dir1
vendor/dir2
vendor/dir3
you would like to add to GIT repository only these directory
How to update a single library with Composer?
To install `package/module-name` with version `1.1.*` and minimum stability `@dev` use this:
php composer.phar require package/module-name:1.1.*@dev
then to update only this single package:
php composer.phar update package/module-name
you can use "--ignore-platform-reqs" to ignore installing the dependencies