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_hostname: "test-colsis-jp" | |
root_email: "hogehoge@colsis.co.jp" | |
letsencrypt: True | |
apache: True | |
nginx: False | |
php: True | |
owner: "{% if apache | bool %}apache{% else %}nginx{% endif %}" | |
basic: | |
auth: True | |
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
server_hostname: "test-colsis-jp" #サーバの名前に変更 | |
root_email: "yourname@example.com" #サーバからのログなど通知メールの送信先に変更 | |
letsencrypt: True #今回はLet'sEncryptでSSLを自動で取得しますのでTrueとしています | |
apache: True #.htaccessなどを利用したい場合はapacheをTrueとする | |
nginx: False #nginxを利用したい場合はTrue。Apacheの場合はFalse | |
php: True #PHPを利用したコンテンツを公開する場合はTrue | |
#ImageMagick: True #PHPなどからImageMagickを利用する場合はTrueとする。MTのDynamicPublishingはGDなので基本的にこの行は削除して問題ない | |
owner: "{% if apache | bool %}apache{% else %}nginx{% endif %}" #ここはいじらない | |
basic: #Basic認証を任意の場所に設定します。今回はサイト全体をBasic認証で保護しているのでコメントアウトを解除 | |
auth: True #Basic認証を利用しない場合はFalse |
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
4月の祝日を取得し判定する例は以下になります。 | |
<mt:JPHoliday month="201804"> | |
<mt:IfJPHoliday date="2018-04-29"> | |
今日は<$mt:JPHolidayName date="2018-04-29"$>の日です | |
</mt:IfJPHoliday> | |
</mt:JPHoliday> | |
MTCalenderと組合わせて利用する例 |
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
# -*- coding: utf-8 -*- | |
import oss2 | |
import os | |
import subprocess | |
from datetime import datetime as dt | |
path = '/tmp/mysqldump.sql.gz' | |
result = subprocess.run('mysqldump --defaults-extra-file=/root/.my.cnf --single-transaction --default-character-set=utf8 --all-databases | /usr/bin/gzip > ' + path, shell=True) |
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
#!/usr/bin/env bash | |
export PATH=$PATH:/usr/local/bin/:/usr/bin | |
while getopts r: OPT | |
do | |
case $OPT in | |
"r" ) | |
REGION=$OPTARG | |
;; |