su - worker
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
<?php | |
$array = | |
[ | |
[ 'filename' => 'mno.jpg', 'description' => 'do' ], | |
[ 'filename' => '005.jpg', 'description' => 'amet' ], | |
[ 'filename' => 'abc.jpg', 'description' => 'consectetur' ], | |
[ 'filename' => '001.jpg', 'description' => 'lorem' ], | |
[ 'filename' => 'jkl.jpg', 'description' => 'sed' ], | |
[ 'filename' => '003.jpg', 'description' => 'dolor' ], |
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
# Redirect to maintenance page, deny all but allow some IP | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REMOTE_HOST} !^1.2.3.4 | |
RewriteCond %{REMOTE_ADDR} !^10.20.30.40 | |
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|svg) [NC] | |
RewriteCond %{REQUEST_URI} !/maintenance/index.html$ [NC] | |
RewriteRule .* /maintenance/index.html [R=302,L] | |
RewriteCond %{REQUEST_FILENAME} !-d |
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
# https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-debian-9 | |
LogLevel debug | |
ErrorLog /proc/self/fd/2 | |
CustomLog /proc/self/fd/1 combined | |
<VirtualHost *:80> | |
Redirect permanent "/" "https:/localhost" | |
</VirtualHost> |
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
# https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-debian-9 | |
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH | |
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 | |
SSLHonorCipherOrder On | |
Header always set X-Frame-Options DENY | |
Header always set X-Content-Type-Options nosniff | |
SSLCompression off | |
SSLUseStapling on | |
SSLStaplingCache "shmcb:logs/stapling-cache(150000)" | |
SSLSessionTickets Off |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>DEMO Clock App</title> | |
<meta charset="utf-8"> | |
<meta name="description" content="DEMO Clock App"> | |
<meta name="author" content="András Szabácsik"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link href="https://fonts.googleapis.com/css?family=Bowlby+One+SC" rel="stylesheet"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> |
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
function randomString ( $minimum_length = 3, $maximum_length = 30 ) | |
{ | |
$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
$length = rand ( $minimum_length, $maximum_length ); | |
$string = ''; | |
for ( $i = 0; $i < $length; $i++ ) | |
{ | |
$string .= $characters [ rand ( 0, strlen ( $characters ) - 1 ) ]; | |
} | |
return $string; |
Copies new and modified files from the source to the target
Ignores file's size and time of last modification and detects changes by checksum
%1 /path/to/source/
%2 /path/to/target/
rsync -rclpogImvh --stats %1 %2
rsync -rclImvh --no-perms --no-owner --no-group --stats --chown=user:group --chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r "/path/to/source" "/path/to/target" 2>> error.log 1>> output.log