Author: BINIT GHIMIRE
Step 1. Visit https://course.genesecloud.academy/login/signup.php, and create an account! Also, confirm your e-mail, and then login to your account!
| ### Keybase proof | |
| I hereby claim: | |
| * I am hataiit9x on github. | |
| * I am thinkvn9x (https://keybase.io/thinkvn9x) on keybase. | |
| * I have a public key ASDyTkwB3YdMohgegVKc2KKHzz5h0rNzXhBphThTf0sFaAo | |
| To claim this, I am signing this object: |
| #!/bin/sh | |
| # size of swapfile in megabytes | |
| swapsize=1024 | |
| # does the swap file already exist? | |
| grep -q "swapfile" /etc/fstab | |
| # if not then create it | |
| if [ $? -ne 0 ]; then |
| #!/bin/sh | |
| # size of swapfile in megabytes | |
| swapsize=1024 | |
| # does the swap file already exist? | |
| grep -q "swapfile" /etc/fstab | |
| # if not then create it | |
| if [ $? -ne 0 ]; then |
| # Configuration options are limited to SSL/TLS | |
| # Enable SSL session caching for improving performance by avoiding the costly session negotiation process where possible | |
| # SSL Labs doesn't assume that SNI is available to the client, so it only tests the default virtual server | |
| # setting this globally to make it work across all the nginx virtual servers (including the default virtual server) | |
| ssl_session_cache shared:ssl_session_cache:10m; | |
| ssl_session_timeout 10m; | |
| server { | |
| listen 443 ssl; |
| <?php | |
| public function pushLogs($msg, $post_data) | |
| { | |
| //curl実行 | |
| $data = [ | |
| "message" => $msg, | |
| "data" => $post_data | |
| ]; | |
| $ch_exec = curl_init("https://{domain}/api/debug-logs"); |
| # ---------------------------------------------------------------------- | |
| # | Komprimierung und Caching | | |
| # ---------------------------------------------------------------------- | |
| # Serve resources with far-future expires headers. | |
| # | |
| # (!) If you don't control versioning with filename-based | |
| # cache busting, you should consider lowering the cache times | |
| # to something like one week. | |
| # |
| # get total requests by status code | |
| awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
| # get top requesters by IP | |
| awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
| # get top requesters by user agent | |
| awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
| # get top requests by URL |
| <?php | |
| /** | |
| * @license MIT License | |
| * @copyright maartendekeizer | |
| */ | |
| $memcached = new Memcached(); | |
| $memcached->addServer('127.0.0.1', 11211); |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VisualEditor0", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ec2:Start*", | |
| "ec2:Stop*", | |
| "ec2:DescribeInstanceStatus" |
Step 1. Visit https://course.genesecloud.academy/login/signup.php, and create an account! Also, confirm your e-mail, and then login to your account!