netdata
Cloning into 'collectors/go.d.plugin'...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 5127 (delta 15), reused 35 (delta 5), pack-reused 5064
Receiving objects: 100% (5127/5127), 4.80 MiB | 716.00 KiB/s, done.
Resolving deltas: 100% (2876/2876), done.
This file contains hidden or 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
| #!/bin/bash | |
| echo "This script will update Node to the latest version using NVM" | |
| # Fix `nvm: command not found` error on macOS | |
| echo "Sourcing nvm to make it available" | |
| . ~/.nvm/nvm.sh |
This file contains hidden or 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
| #!/bin/bash | |
| LOG="/var/log/cache-clean.log" | |
| #Check if the /run directory size is above 100MB | |
| run_size=`du -sh /run | awk '{print $1}' | grep -Eo '[0-9]{3}'` | |
| if [[ $run_size -gt 100 ]]; then |
This file contains hidden or 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
| #!/bin/bash | |
| # Or create the custom log path | |
| LOG="/var/log/redis-clean.log" | |
| #Check if Redis used memory is above 100MB | |
| used_size=`su -s /bin/bash -c "wp redis info --path=/var/www/htdocs" www-data | grep used_memory | awk '{print $2}' | cut -d'M' -f1 | cut -d "." -f 1` |
This file contains hidden or 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
| #!/bin/bash | |
| ## Check for the exact site's Redis container | |
| is_redis_running=`grep -w sitenamecom_redis_1`; | |
| if [[! $is_redis_running ]]; then | |
| ee site refresh sitename.com; | |
| fi | |
This file contains hidden or 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
| version: '2' | |
| services: | |
| rocketchat: | |
| image: rocketchat/rocket.chat:latest | |
| restart: unless-stopped | |
| volumes: | |
| - ./uploads:/app/uploads | |
| environment: | |
| - PORT=3000 |
This file contains hidden or 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
| # BEGIN All In One WP Security | |
| #AIOWPS_BASIC_HTACCESS_RULES_START | |
| <Files .htaccess> | |
| <IfModule mod_authz_core.c> | |
| Require all denied | |
| </IfModule> | |
| <IfModule !mod_authz_core.c> | |
| Order deny,allow | |
| Deny from all | |
| </IfModule> |
- Use
curlto get the JSON response for the latest release - Use
grepto find the line containing file URL - Use
cutandtrto extract the URL - Use
wgetto download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
This file contains hidden or 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
| # command to generate dhparams.pen | |
| # openssl dhparam -out /etc/nginx/conf.d/dhparams.pem 2048 | |
| limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m; | |
| limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=5r/s; | |
| limit_req_status 444; | |
| limit_conn_status 503; | |
| proxy_cache_path /var/lib/nginx/proxy levels=1:2 keys_zone=backcache:8m max_size=50m; | |
| proxy_cache_key "$scheme$request_method$host$request_uri$is_args$args"; |
NewerOlder