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
#!/bin/bash | |
if ps -ylC apache2 >/dev/null | |
then | |
ps -ylC apache2 | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' | |
else | |
ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' | |
fi |
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
... | |
# формат логирования с отслеживанием времени ответа от бэкенда | |
log_format timed_combined '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" ' | |
'$request_time $upstream_response_time $pipe'; | |
# http://nginx.org/ru/docs/http/ngx_http_limit_req_module.html |
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
#!/bin/bash | |
if [[ -z "$1" ]]; then | |
SHUTDOWN_TIMEOUT="60" | |
else | |
SHUTDOWN_TIMEOUT="$1" | |
fi | |
echo $SHUTDOWN_TIMEOUT ; exit 0 | |
SHUTDOWN_DELAY="5" |
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
# check WindowsAzurePowerShell is present | |
if (-not(Get-Module Azure)){ | |
# find chocolatey executable | |
$CHOCO = $env:PATH.Split(';') | % {Get-ChildItem -Path $_ -Filter chocolatey.exe} | |
# install WindowsAzurePowerShell | |
if ($CHOCO.Exists){Start-Process -FilePath $CHOCO.FullName -ArgumentList "install -y WindowsAzurePowerShell" -Wait} | |
} else {Write-Warning -Verbose "WindowsAzurePowerShell Exists."} | |
# connect to Azure | |
Add-AzureAccount |
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
#!/bin/bash | |
docker build https://raw.githubusercontent.com/atricore/atricore-josso-playground/master/oracle-java8/Dockerfile |
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
version: '2' | |
services: | |
db: | |
container_name: shop-db | |
image: mysql:5.5 | |
restart: always | |
ports: | |
- 13306:3306/tcp | |
environment: |
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
# block by user-agent that contain 'WordPress' | |
iptables -A INPUT -p tcp --dport 80 -m string --string 'WordPress' --algo kmp -j DROP |
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
# define folders being used | |
$tmpdir = "c:\tmp_pdf" | |
$inputdir = "c:\in_pdf" | |
$signeddir = "c:\signed_pdf" | |
$outdir = "c:\out_pdf" | |
$x = "C:\sign_policy_cades_cleanCopy.bat" | |
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
<# | |
ОЧИСТКА АТРИБУТА "msNPAllowDialin" У ПОЛЬЗОВАТЕЛЕЙ ДОМЕНА | |
#> | |
Function Clear-DialinAttrubuteFromADUsers ($Name) { | |
<# | |
.SYNOPSIS | |
Clear 'msNPAllowDialin' attribute from Users in Active Directory. | |
.PARAMETER Name |
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
cd /repo/dir | |
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' --prune-empty --tag-name-filter cat -- --all |