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
-- DB to use | |
use Puzzles; | |
-- Remove the Table and the SP if it already exists | |
drop table dbo.generated_table; | |
drop procedure dbo.addRows; | |
-- Define the Table to be populated with generated data | |
CREATE TABLE dbo.generated_table ( | |
id int --PRIMARY KEY |
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
Get-ChildItem -Recurse | Select-String -Pattern 'abc' -List | Select-String -Pattern 'pqr' -List | | Select-String -Pattern 'xyz' -List | Select Path | |
# With pipes '|', we are filtering the result set with additional search terms thus acing like the search for terms are AND conditional. |
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
Get-ChildItem -Recurse | Select-String -Pattern 'abc', 'pqr', 'xyz' -List | Select Path | |
# Select-String commandlet can take an array list of strings that it can search for existence and returns all files that has any of those strings in its content. |
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
Get-ChildItem -Recurse | Select-String -Pattern 'abc' -List | Select 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
StartServers 10 | |
MinSpareServers 10 | |
MaxSpareServers 10 | |
MaxRequestWorkers 80 | |
MaxConnectionsPerChild 0 |
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
<IfModule mod_evasive20.c> | |
DOSHashTableSize 3097 | |
DOSPageCount 1 | |
DOSSiteCount 3 | |
DOSPageInterval 1 | |
DOSSiteInterval 1 | |
DOSBlockingPeriod 10 | |
#DOSEmailNotify geek@codonomics.com | |
#DOSSystemCommand "su - someuser -c '/sbin/... %s ...'" | |
#DOSLogDir "/var/log/mod_evasive" |
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
apachectl -M | grep evasive | |
# Output: | |
# [Mon Jan 27 13:55:35.707317 2020] [so:warn] [pid 29031] AH01574: module dav_module is already loaded, skipping | |
# evasive20_module (shared) |
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
SetEnvIf Remote_Addr "::1" loopback | |
SetEnvIf Remote_Addr "127\.0\.0\.1" loopback | |
CustomLog /var/log/apache2/access.log combined env=!loopback |
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
logging: | |
receivers: | |
mywebserver: | |
type: files | |
include_paths: | |
- /var/log/apache*/access.log | |
- /var/log/apache*/error.log | |
- /var/www/logs/any-other-custom-logs-of-your-app-*.log | |
service: | |
pipelines: |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
RewriteEngine on | |
RewriteMap hosts-deny "txt:/etc/apache2/blacklist" | |
RewriteCond "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR] | |
RewriteCond "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND" | |
RewriteRule .* - [F] |