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
## Cài đặt ab | |
```bash | |
apt-get install apache2-utils -y | |
``` | |
Cấu trúc truy vấn | |
``` | |
ab [ -A auth-username:password ] [ -c concurrency ] [ -h ] [ -H custom-header ] [ -k ] [ -n requests ] [ -P proxy-auth-username:password ] [ -r ] [ -t timelimit ] [ -v verbosity] [ -w ] [ -X proxy[:port] ] [http[s]://]hostname[:port]/path |
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
ngrok http -hostname=ideasvn.dev 8000 |
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
<?php | |
Collection::macro('maxBy', function ($callback) { | |
$callback = $this->valueRetriever($callback); | |
return $this->reduce(function ($result, $item) use ($callback) { | |
if ($result === null) { | |
return $item; | |
} | |
return $callback($item) > $callback($result) ? $item : $result; |
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
Step tham khảo | |
https://0.s3.envato.com/files/94682367/form-wizard-with-icon.html |
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
php artisan queue:work default --sleep=3 --tries=3 --daemon 2>&1 >> /var/log/laravel/queue.log | |
Please note that /etc/init.d is a symbolic link to /etc/rc.d/init.d | |
chkconfig --level 345 laravel_queue on | |
laravel_queue.sh | |
#!/bin/bash |
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
Hiển thị tất cả các IP đang kết nối và số lượng kết nối từ mỗi IP: | |
netstat -an|grep :80 |awk '{print $5}'|cut -d":" -f1|sort|uniq -c|sort -rn | |
Nếu muốn kiểm tra IP nào mở nhiều SYN thì thêm vào: | |
netstat -an|grep :80|grep SYN |awk '{print $5}'|cut -d":" -f1|sort|uniq -c|sort -rn | |
- Đối với server có nhiều IP, để kiểm tra IP nào đang bị tấn công: | |
netstat -plan | grep :80 | awk '{print $4}'| cut -d: -f1 |sort |uniq -c | |
- Hiển thị tất cả các IP đang kết nối và số lượng kết nối từ mỗi IP: |
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
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer --version=1.0.0-alpha11 | |
composer update --ignore-platform-reqs | |
composer create-project laravel/laravel laracms dev-develop --prefer-dist |
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
mysqldump --all-databases > all_databases.sql --events --ignore-table=mysql.event | |
mysql --one-database database_name < all_databases.sql | |
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'YOUR_PASS' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; | |
GRANT ALL PRIVILEGES ON hunganh.* TO 'hunganh'@'%' IDENTIFIED BY '********' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; | |
GRANT ALL PRIVILEGES ON `vnoss\_%` . * TO 'vnoss'@'%'; |
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
chmod -R o+w storage | |
chown -R www-data:www-data storage |
OlderNewer