Skip to content

Instantly share code, notes, and snippets.

## 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
ngrok http -hostname=ideasvn.dev 8000
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<div class="hide" id="errorBox"></div>
<input type="hidden" name="button" value="buynow">
<input type="hidden" name="amount" value="100">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Paypal - Test">
<input type="hidden" name="item_number" value="ABC305AAA">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
@vinacms
vinacms / maxBy.php
Created June 24, 2016 02:02 — forked from adamwathan/maxBy.php
maxBy/minBy macros
<?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;
Step tham khảo
https://0.s3.envato.com/files/94682367/form-wizard-with-icon.html
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
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:
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
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'@'%';
chmod -R o+w storage
chown -R www-data:www-data storage