Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
config.trigger.before :up do |trigger| | |
trigger.ruby do |env, machine| | |
if machine.name.to_s == app1 | |
trigger.info = "Disabling DNS reverse lookup in SSHD." | |
if Vagrant::Util::Platform.windows? | |
pid = spawn("ping -n 61 127.0.0.1 > nul && for /F \"tokens=1,2 delims= \" %i in ('\"VBoxManage list runningvms | findstr /R /C:\"#{machine.name}\"\"') do VBoxManage --nologo guestcontrol %j --username root --password vagrant start --exe \"/usr/bin/sh\" -- sh/arg0 -c \"/usr/bin/sed -ie 's/\\(#\\)\\{0,1\\}UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config && /usr/bin/systemctl restart sshd\" --wait-stdout\" ") | |
else | |
pid = spawn("sleep 30 && VBoxManage --nologo guestcontrol $(VBoxManage list runningvms | grep \"#{machine.name}\" | cut -d \" \" -f 2) --username root --password vagrant start --exe \"/usr/bin/sh\" -- sh/arg0 -c \"/usr/bin/sed -ie 's/\\(#\\)\\{0,1\\}UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config && /usr/bin/systemctl restart sshd\" --wait-stdout ") | |
end | |
puts "UseDNS=no an |
#!/usr/bin/env bash | |
log_name='log_prefix' | |
for f in /var/log/nginx/${log_name}*.log; do | |
pattern="(.*)($log_name)(.*)" | |
[[ "$f" =~ $pattern ]] | |
/bin/gzip ${f} && /bin/kill -USR1 $(cat /run/nginx.pid) && /bin/mv ${f}.gz /var/log/nginx/$(date +%F-%T)${BASH_REMATCH[3]}.gz | |
done |
@ECHO OFF | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
CLS | |
ECHO. | |
ECHO Generating Self-Signed Certificate | |
ECHO ================================== | |
map $http_origin $cors_origin_header { | |
default ""; | |
"~(^|^http:\/\/)(localhost$|localhost:[0-9]{1,4}$)" "$http_origin"; | |
"~^https://test-.-dev.example.pl$" "$http_origin"; # https://test-7-dev.example.pl | |
"https://test.example.com" "$http_origin"; | |
} | |
map $http_origin $cors_cred { | |
default ""; | |
"~(^|^http:\/\/)(localhost$|localhost:[0-9]{1,4}$)" "true"; |
-- SQL SERVER | |
-- change values inserted in @schema_list to the schemas you want to drop the objects from | |
SET NOCOUNT ON; | |
DECLARE | |
@sql NVARCHAR(MAX); | |
SET @sql = ''; | |
DECLARE |