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
| # Force non-www to www redirect | |
| if ($host !~* ^www\.) { | |
| rewrite ^(.*)$ $scheme://www.$host$1 permanent; | |
| } | |
| # Turn on SSL | |
| # protip: https://mozilla.github.io/server-side-tls/ssl-config-generator/ | |
| ssl on; | |
| add_header Strict-Transport-Security max-age=15768000; |
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
| proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off; | |
| server { | |
| listen 443 ssl http2 default_server; | |
| listen [::]:443 ssl http2 default_server; | |
| server_name example.com; | |
| location /api/ { | |
| # Rate Limiting | |
| limit_req zone=reqlimit burst=20; # Max burst of request |
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 | |
| version="0.9.4 from 2010-09-13" | |
| # Always download the latest version here: http://www.eurosistems.ro/back-res | |
| # Thanks or questions: http://www.howtoforge.com/forums/showthread.php?t=41609 | |
| # | |
| # CHANGELOG: | |
| # ----------------------------------------------------------------------------- | |
| # version 0.9.4 - 2010-09-13 | |
| # -------------------------- | |
| # Small fix: - Corrected small bug replaced tar with $TAR in the recovery line |
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
| # jan/29/2018 22: 4:17 by RouterOS 6.41 | |
| # | |
| /interface list | |
| add name=public comment="public network" | |
| add name=local comment="local network" | |
| add name=guest comment="guest network" | |
| # Change the interfaces below to your own | |
| /interface list member | |
| add list=public interface=ether1 |
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
| for i in rpcbind nfslock lldpad fcoe rpcidmapd; do service $i stop; chkconfig $i off; 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
| echo "update mysql.user set plugin = 'mysql_native_password' where user='root';" | mysql -u root |
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
| UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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
| CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'some_password'; | |
| GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION; | |
| FLUSH PRIVILEGES; |
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
| service mysql stop | |
| mysqld_safe --skip-grant-tables > /dev/null 2>&1 & | |
| mysql -u root -e "use mysql; update user set password=PASSWORD('NEW-PASSWORD') where User='root'; flush privileges;" | |
| service mysql restart |