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 | |
# create {year} folder if it doesn't exist | |
mkdir -p /home/web/db/$(date +%Y) | |
# dump database into {year} folder | |
mysqldump --opt -uweb -pPASSWORD DATABASE_NAME | gzip > /home/web/db/$(date +%Y)/DATABASE_NAME_$(date +%Y%m%d-%H%M).sql.gz |
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 | |
BACKUP_DIR=/home/web/db | |
DB_FILE=$(ls $BACKUP_DIR -tp |grep -v /$ | head -1) | |
s3cmd put $BACKUP_DIR/$DB_FILE s3://{BUCKET_NAME}/db/$DB_FILE 2>&1 | |
#echo $DB_FILE |
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
Host github-{repo} | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa_{deploy_key} | |
`git remote add origin github-{repo}:username/repo.git` |
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
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
listen 443 ssl; | |
root /home/PATH/public_html; | |
index index.php index.html index.htm; | |
server_name DOMAINNAME.ca; | |
ssl_certificate /etc/letsencrypt/live/DOMAINNAME.ca/fullchain.pem; |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:PutObjectAcl" | |
], |
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
# Case sensitive | |
rewrite ^/[Nn][Ff][Pp]romo/?$ /now-fresh-offer/ redirect; | |
rewrite ^/(?i)GatherDog/?$ /for-dogs/gather/ permanent; | |
# URL params | |
location /some/path$ { | |
if ($query_string ~* "page=(.*)$") { | |
rewrite ^(.*)$ /destination? permanent; | |
} | |
} |
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://wiki.apache.org/httpd/RewriteQueryString | |
# Enforce HTTPS | |
RewriteCond %{HTTPS} off | |
RewriteCond %{REQUEST_URI} ^/secure-me-1 [NC,OR] | |
RewriteCond %{REQUEST_URI} ^/secure-me-2 [NC] | |
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] | |
# re-use variable | |
RewriteCond %{QUERY_STRING} zoom_query=(.*)$ |
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
### | |
# SSL Detection | |
### | |
# This header would be set if an upstream source (such as an ELB) has negotiated an SSL connection. | |
if ( $http_x_forwarded_proto = 'https' ) { | |
set $ssl_enabled true; | |
} | |
# This would be set if nginx is handling the SSL connection directly. |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "s3:ListAllMyBuckets", | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ | |
"Effect": "Allow", |
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
diff a/lib/classes/KcSeoHelper.php b/lib/classes/KcSeoHelper.php | |
43,45c43,45 | |
< array( | |
< '_builtin' => true | |
< ) | |
--- | |
> // array( | |
> // '_builtin' => true | |
> // ) |